LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Host crash (https://www.linuxquestions.org/questions/linux-from-scratch-13/host-crash-215452/)

Engmar 08-09-2004 02:03 PM

Host crash
 
While performing my "make menuconfig" I began to have problems.
My host began to disintegrate. Memory usage spiked, and the (Xfce)
panel vanished. I was able to exit from menuconfig cleanly, then the
system went down.

After the reboot: /mnt/lfs is still there
I'm poring back through the book, but have been unsuccessful in my
attempts to re-enter the chroot environment. This might have to do
with being frustrated, or out of coffee =)

The truth is, I'm not sure what to do to get back to where I was
before I was booted out. I'm close to finishing (my first LFS) and really
don't want to start over at this point.

320mb 08-09-2004 02:41 PM

Chapter 6. Installing basic system software

just after the beginning of Ch 6 is where you chroot.........don't forget to set your $LFS PATH before you chroot or you will get an error about /bin/bash env cannot be found....LOL!! AND dont forget to re-mount proc and devpts

6.6. Mounting the proc and devpts file systems

Engmar 08-09-2004 03:21 PM

Thank you 320mb. I need one more hint though.
I'm afraid I may have done something(s) wrong.

Part of my problem is that I am not sure what information
to provide, while asking my question.

I have just logged in to my host system, as my every day user.
I can log in as user "lfs." I cannot "mount -t proc proc $LFS/proc"
as lfs or root. I am informed that /mnt/lfs/proc does not exist.

If have set $LFS. "echo $LFS" returns /mt/lfs

I have returned to the beginning of chapter 6, but know I
am missing a crucial step.

As /lfs/proc and /lfs/sys already exist, I don't want to
issue the "mkdir -p $LFS/{proc,sys}" again do I? And
what about...

mount -f -t ramfs ramfs $LFS/dev
mount -f -t tmpfs tmpfs $LFS/dev/shm
mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts

320mb 08-09-2004 04:24 PM

does your everyday user have the permissions to access /mnt/lfs..........??.
( read/write/exec ) remember.......lfs/root are user/owner of this directory....you need to give your regular user the same permissions.......

<edit/> OH and the same goes for /mnt/lfs/tools
your regular user needs the same permissions to access that tools directory as the lfs user did........!! :)

Engmar 08-09-2004 10:31 PM

I'm probably going to seem incredibly dense here, but I
don't think I accurately described my situation before. I
am in chapter 8. Everything is set up, but the kernel. It
was at this point that my machine went down.

I have the revised chroot pretty much memorized at this point.
users; me, lfs, and root all have the proper permissions set.
Echo $LFS returns /mnt/lfs.

I switch to root, head into my lfs file system. When I execute this
Code:

chroot "$LFS" /usr/bin/env -i \
    HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    /bin/bash --login

the revised chroot (as /tools no longer exists), the response that
I get is "bash: chroot: command not found"

edit: for some reason i have to now use /usr/sbin/chroot
so, now I get
"/usr/sbin/chroot: cannot run command `/usr/bin/env': No such file or directory"
a quick cd /usr/bin and there is env. hmmm. I have the feeling I am going to
feel silly when this is done.

edit2: odd that /usr/bin/env exists on both my host and in /lfs, yet I am being told
otherwise.

edit 3: Yep, I am slow. It is embarassing to admit, but just in case anyone else ever does
this I will record my mistake here. If you get booted or need to exit from not only the
chroot but have your machine crash - you must remount the partition, not just
parts of its file system. You can mount /proc and /sys all you want, but if the entire
contents of /mnt/lfs do not appear in /lfs you will get nowhere.

kabniel 10-10-2005 01:09 PM

Quote:

Originally posted by Engmar
edit 3: Yep, I am slow. It is embarassing to admit, but just in case anyone else ever does
this I will record my mistake here. If you get booted or need to exit from not only the
chroot but have your machine crash - you must remount the partition, not just
parts of its file system. You can mount /proc and /sys all you want, but if the entire
contents of /mnt/lfs do not appear in /lfs you will get nowhere. [/B]
thanks for posting this, i think my brain crashed along with my box :D


All times are GMT -5. The time now is 12:43 PM.