LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 08-09-2004, 02:03 PM   #1
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Ubuntu, LFS, DSL
Posts: 127

Rep: Reputation: 16
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.
 
Old 08-09-2004, 02:41 PM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
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

Last edited by 320mb; 08-09-2004 at 02:43 PM.
 
Old 08-09-2004, 03:21 PM   #3
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Ubuntu, LFS, DSL
Posts: 127

Original Poster
Rep: Reputation: 16
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
 
Old 08-09-2004, 04:24 PM   #4
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
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........!!

Last edited by 320mb; 08-09-2004 at 04:27 PM.
 
Old 08-09-2004, 10:31 PM   #5
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Ubuntu, LFS, DSL
Posts: 127

Original Poster
Rep: Reputation: 16
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.

Last edited by Engmar; 08-10-2004 at 02:13 AM.
 
Old 10-10-2005, 01:09 PM   #6
kabniel
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Distribution: Debian Squeeze
Posts: 27

Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crash, Crash, Crash, Crash and You Guessed it Crash! little_penguin SUSE / openSUSE 8 07-04-2005 09:34 AM
Resolving <www.some remote host>.... failed: Host not found. koodoo Linux - Newbie 2 06-27-2005 08:48 AM
kde crash, then other crash, now weird problems true_atlantis Linux - Laptop and Netbook 1 04-28-2004 12:01 AM
xmms crash xine crash mplayer crash paledread Linux - Software 9 03-09-2004 07:09 AM
How to configure Host-to-Host IPSec (Free SWAN) gpagedar Linux - Security 2 10-18-2003 05:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 03:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration