View previous topic :: View next topic |
Author |
Message |
YouAreTheHat n00b
Joined: 13 Aug 2013 Posts: 2
|
Posted: Tue Aug 13, 2013 10:05 pm Post subject: Exited from chroot during install |
|
|
Hullo, Gentoo community. I am on my first install of a Linux system, ever, and have run into something of a problem.
I had gotten up to 8.a >> Creating /etc/fstab (AMD64) in the handbook, and was unable (probably just due to user error) to create the file. My Ubuntu-using coworker thought he'd helpfully ensure my permissions were high enough by running . I appear to now be outside the chroot environment and have no idea how to get back in.
Does anyone know how I might be able to hop back into my install without blowing everything away? |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Tue Aug 13, 2013 10:29 pm Post subject: |
|
|
Don't worry, it is extremely difficult to make an detrimental mistake during an install. Chances are always fairly good that some or all of your work can be salvaged. Gentoo as a first install. You have my admiration on your courage.
First, if you are using either the system rescue cd or a gentoo minimal CD you are running as root anyway. While I am very sure your coworker has the best intentions, su root wouldn't help in this case because you don't know the password for root and you already are root. If you what to know who the computer thinks you are, there is a command whoami which should return "root" during an install.
You are fine. Here is what you should do. First, run exit, then check whoami to make sure it is root. At this point, you should be back in your familiar chroot environment. Check /mnt/gentoo/ to make sure it is NOT populated. If it is, you are outside the chroot.
If you exit the chroot for any reason (power outage, you want to take a break, gremlins, elves, etc) your work will be preserved exactly as you left it. This is because gentoo isn't installed by a script. You are doing what most installers would do. This means you can pick right back up. To do this, repeat all of the none-optional steps in 6a. If you have not rebooted, or you will not need Internet, you can skip coping the DNS info. If you have rebooted you will need to mount your file systems first. This is particularly handy if you fail to get a bootable system on your first attempt.
I am curious what kind of problems you are having with your fstab. The file should exist and should be populated with dummy entries for common partitions. nano -w /etc/fstab should put you in a file that looks something like this: Code: | # /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/BOOT /boot ext2 noauto,noatime 1 2
/dev/ROOT / ext4 noatime 0 1 |
if it does not check the out put of ls /etc . This command says to list all the files and folders in the /etc directory. It should have several files. If it does not, you may have experienced a problem with unpacking your stage3 tarball. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Wed Aug 14, 2013 12:25 am Post subject: |
|
|
tell your ubuntu friend "su" is sufficient....
exits out of su... and chroot $ su = root in the chroot env.... |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Wed Aug 14, 2013 5:11 am Post subject: |
|
|
exit should exit whatever shell he is in. It should also do it in order, so first out of su and then out of chroot if he does it again, not both at once. You can experiment with using su to enter multiple layers of users to test this, ie, foo to bar to root. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
YouAreTheHat n00b
Joined: 13 Aug 2013 Posts: 2
|
Posted: Wed Aug 14, 2013 1:39 pm Post subject: |
|
|
Oh thank Gallifrey. You have saved the day again, Doctor. And thank you as well, sixes.
Looking back on the /fstab, it looks like that configuration went swimmingly; it was the /hosts I was having trouble with (I was working on the setup on and off fer several hours and I lost my place after the su incident). There didn't seem to be a dummy /hosts file and nano claimed I didn't have permissions to write one. Now that I am back in the chroot, through, I'm able to pull up the file and edit it with no issue.
Well, it looks like everything is back on track thanks to your help. It's heartening to know there is such a knowledgeable and helpful gentoo community here. |
|
Back to top |
|
|
666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Wed Aug 14, 2013 9:11 pm Post subject: |
|
|
you can completely exit out of chroot and back into live cd... then re chroot by chroot /mnt/gentoo /bin/bash
if you restart the system, then
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
mount -t proc none /mnt/gentoo/proc
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
yeah, you can restart mid install and resume installing.... neddyseagoon says "there is no failure of a gentoo install, just varying levels of success" paraphrased. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|