View previous topic :: View next topic |
Author |
Message |
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Sun Feb 12, 2017 11:20 pm Post subject: Entering the new environment: incorrect - I think :) |
|
|
Entering the new environment
Now that all partitions are initialized and the base environment installed, it is time to enter the new installation environment by chrooting into it. This means that the session will change its root (most top-level location that can be accessed) from the current installation environment (installation CD or other installation medium) to the installation system (namely the initialized partitions). Hence the name, change root or chroot.
This chrooting is done in three steps:
The root location is changed from / (on the installation medium) to /mnt/gentoo/ (on the partitions) using chroot
Some settings (those in /etc/profile) are reloaded in memory using the source command
The primary prompt is changed to help us remember that this session is inside a chroot environment.
Code: |
root #chroot /mnt/gentoo /bin/bash
root #source /etc/profile
root #export PS1="(chroot) $PS1"
|
From this point, all actions performed are immediately on the new Gentoo Linux environment. Of course it is far from finished, which is why the installation still has some sections left!
Code: |
{
# Mounting the boot partition
# Now that the new environment has been entered, it is necessary to create and mount the /boot partition. This will # be important when it is time to compile the kernel and install the bootloader:
root #mkdir /boot
root #mount /dev/sda2 /mnt/gentoo/boot
}
|
Guys/Gals, i think this is incorrect and note needed.
Please let me know if i'm making a mistake |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Sun Feb 12, 2017 11:54 pm Post subject: |
|
|
kkinkouu,
You must make and mount all your partitions while still outside the chroot.
will fail from inside the chroot.
/boot is provided in the stage3 tarball so it already exists.
If you want to mount boot, you need to do it from outside the chroot. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Mon Feb 13, 2017 12:00 am Post subject: |
|
|
NeddySeagoon,
that's what i'm saying, it was previously done in steps before.
the following above in the "Guide" is incorrect.... just noticed it while building another machine and thought i'd point it out |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Mon Feb 13, 2017 12:05 am Post subject: |
|
|
ah ok, so in stage 4, /boot (the folder, i'm assuming is present in stage 3 after "tar stage..... --xattrs") is not present i'm assuming, after "tar stage....... --xattrs". thanks for letting know. i haven't used stage 4 yet, but nice to know
sorry if i sound like i've missed something, this is just a bit confusing |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Mon Feb 13, 2017 12:19 am Post subject: |
|
|
hold on, i still don't get this...... you create it in the beginning of your partition schema, so why would you need to re-create it in chroot? its already mounted to /mnt/gentoo/boot?
Last edited by kkinkouu on Mon Feb 13, 2017 12:21 am; edited 1 time in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Mon Feb 13, 2017 12:20 am Post subject: |
|
|
kkinkouu,
Make an entry in the Wiki talk page or file a bug at bugs.gentoo.org
Your contribution here may be missed by the handbook maintainers. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Mon Feb 13, 2017 12:24 am Post subject: |
|
|
this is not a bug....... |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Mon Feb 13, 2017 12:27 am Post subject: |
|
|
kkinkouu,
Please post a link to the page.
If its incorrect, its a bug in the documentation. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
Posted: Mon Feb 13, 2017 12:28 am Post subject: |
|
|
WHat i'm trying to say is this part shouldn't be here:
Entering the new environment
Now that all partitions are initialized and the base environment installed, it is time to enter the new installation environment by chrooting into it. This means that the session will change its root (most top-level location that can be accessed) from the current installation environment (installation CD or other installation medium) to the installation system (namely the initialized partitions). Hence the name, change root or chroot.
This chrooting is done in three steps:
The root location is changed from / (on the installation medium) to /mnt/gentoo/ (on the partitions) using chroot
Some settings (those in /etc/profile) are reloaded in memory using the source command
The primary prompt is changed to help us remember that this session is inside a chroot environment.
Code: |
root #chroot /mnt/gentoo /bin/bash
root #source /etc/profile
root #export PS1="(chroot) $PS1"
|
From this point, all actions performed are immediately on the new Gentoo Linux environment. Of course it is far from finished, which is why the installation still has some sections left!
----------------------------------------------------------This Part Start:
Mounting the boot partition
Now that the new environment has been entered, it is necessary to create and mount the /boot partition. This will be important when it is time to compile the kernel and install the bootloader:
Code: |
root #mkdir /boot
root #mount /dev/sda2 /mnt/gentoo/boot
|
-----------------------------------------------------------This Part End:
*(Its a bit confusing)*
Configuring Portage
Installing a Portage snapshot
Next step is to install a Portage snapshot, a collection of files that inform Portage what software titles are available to install, which profiles the administrator can select, etc.
The use of emerge-webrsync is recommended. This will fetch the latest Portage snapshot (which Gentoo releases on a daily basis) from one of Gentoo's mirrors and install it onto the system.
Code: |
root #emerge-webrsync
|
Note
During this operation, emerge-webrsync might complain about a missing /usr/portage/ location. This is to be expected and nothing to worry about - the tool will create the location.
etc..... |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Mon Feb 13, 2017 12:34 am Post subject: |
|
|
kkinkouu,
Please post a link to the page where you see that.
I agree that it looks to be incorrect. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
kkinkouu Tux's lil' helper
Joined: 17 Aug 2015 Posts: 95 Location: United Kingdom
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54578 Location: 56N 3W
|
Posted: Mon Feb 13, 2017 1:38 am Post subject: |
|
|
kkinkouu,
As you say, that's incorrect. The command even uses /mnt/gentoo/boot for the mount point - from inside the chroot.
Make a post at the bottom of the discussion page or file a bug against the handbook at bugs.gentoo.org _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
AZeth n00b
Joined: 25 May 2017 Posts: 1
|
Posted: Thu May 25, 2017 7:30 pm Post subject: |
|
|
Well im a first time user of gentoo linux, I have been playing a bit with debian and ubuntu from before, but this seems more fun Im a total noob tho.
I just wanted to say i encounterd the same problem and if not for this thread i would probably not have proceeded, as I i did, because I suddenly became very unsure whet enviorment I was in, since it was allready there and could not figure out what I had done wrong.
This should to be corrected since I guess it can easily scare away noobs like me. |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Fri May 26, 2017 7:29 pm Post subject: |
|
|
Looks like there are TWO versions of the Handbook.
https://wiki.gentoo.org/wiki/Handbook:AMD64
Notice that this link is different.
You can reach this by going to "www.gentoo.org" and then:
support > documentation>Handbook.
Following the instructions will NOT bring up the error mentioned by OP.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
Frautoincnam Guru
Joined: 19 May 2017 Posts: 324
|
Posted: Fri May 26, 2017 8:05 pm Post subject: |
|
|
gerard27 wrote: | You can reach this by going to "www.gentoo.org" and then:
support > documentation>Handbook.
Following the instructions will NOT bring up the error mentioned by OP.
Gerard. |
?
It depend which handbook you choose next.
If you choose AMD64 Handbook, you'll get https://wiki.gentoo.org/wiki/Handbook:AMD64 which is the same. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Fri May 26, 2017 8:52 pm Post subject: |
|
|
Sorry the information is correct for me.
Prior to entering chroot you have prepare it, and in the preparation you mount /dev to the new chroot /dev
So inside the chroot, trying to access /dev/sda2 (or any disks or partitions) is valid because the chroot /dev is a mirror of livecd /dev and so, disks and partitions are usable.
I think that even before chrooting, you were ask to setup fstab, because of this, even a simple mount /boot is valid
Guys, the need to create /boot outside chroot, and mount it outside chroot, is no more a problem while /dev is bind.
Or do i miss the issue? |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6780
|
Posted: Sat May 27, 2017 2:31 am Post subject: |
|
|
krinn wrote: | Sorry the information is correct for me. |
I think that krinn is right, essentially. However, the solution is not ideal for two reasons:
1. Mounting a device twice is not recommended (though I never had problems with it; it might be an issue with historical kernels, only).
2. Unless /etc/mtab is a symlink to ../proc/self/mounts (and proc is mounted inside of the chain root), there might be issues with umount (e.g. umount -a at reboot).
The better and "cleaner" solution would be a "mount --bind" from outside the chroot. |
|
Back to top |
|
|
|