Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
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.


  Search this Thread
Old 10-27-2005, 10:22 PM   #1
LQ Newbie
Registered: Oct 2005
Posts: 7

Rep: Reputation: 0
Question reboot during lfs installation?

After having read the FAQ and scrolling down the rest of the posts, I couldn't find anything relevant on rebooting during installing LFS.

I did find something in the LFS BOOK, but didn't find it very clear on the subject.

In several chapters, setting up a temporary environment is necessary. In chapter 4.4 / 6.2 / 6.3 for instance.

I am currently @ chapter 6.11. Glibc-2.3.4, and have just finished the make run. If I reboot my system, will it suffice to just repeat every process mentioned in chapter 6.2 / 6.3 ? That is, besides mounting the harddrive.....
Old 10-28-2005, 04:26 AM   #2
Registered: Sep 2005
Posts: 244

Rep: Reputation: 30
I always do the following in chapter 6
export LFS=/mnt/lfs
mkdir $LFS
mount /dev/hdaX $LFS
# Begin
# Changes root directory for use in LFS 6.1 Chapter 6

# Mount required filesystems
mount -t proc proc $LFS/proc
mount -t sysfs sysfs $LFS/sys

# These "fake mounts" are also needed now
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

echo ""
echo "Do not forget to populate /dev !"
echo ""

# Chroot into the LFS system with a reduced environment
chroot "$LFS" /tools/bin/env -i \
	HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
	PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
	/tools/bin/bash --login +h

# End

# Begin
# Based on LFS 6.1 Chapter 6.8.2
# This mounts a tempfs to /dev and populates
# the /dev directories with a minimal set of device nodes.

mount -n -t tmpfs none /dev

mknod -m 622 /dev/console c 5 1
mknod -m 666 /dev/null c 1 3
mknod -m 666 /dev/zero c 1 5
mknod -m 666 /dev/ptmx c 5 2
mknod -m 666 /dev/tty c 5 0
mknod -m 444 /dev/random c 1 8
mknod -m 444 /dev/urandom c 1 9
chown root:tty /dev/{console,ptmx,tty}

# These symbolic links are required by LFS
ln -s /proc/self/fd /dev/fd
ln -s /proc/self/fd/0 /dev/stdin
ln -s /proc/self/fd/1 /dev/stdout
ln -s /proc/self/fd/2 /dev/stderr
ln -s /proc/kcore /dev/core

# Mount the kernel filesystems within /dev
mkdir /dev/pts
mkdir /dev/shm
mount -t devpts -o gid=4,mode=620 none /dev/pts
mount -t tmpfs none /dev/shm

# Test to see if udev is built yet.  If so, run it.
if [ -f /sbin/usevstart ]; then

# End
In chapter 7 you don't need the tools directory anymore use this instead.
# Chroot into the LFS system with a reduced environment for Chapter 7
chroot "$LFS" /usr/bin/env -i \
	HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
	PATH=/bin:/usr/bin:/sbin:/usr/sbin \
	/bin/bash --login
This is the easiest way to reenter the chroot environment,. so when you want to start you only have to.
# export LFS=/mnt/lfs
# mount /dev/[xxx] $LFS
# $LFS/
# ./
and you can go further where you left.

Last edited by mr_demilord; 10-28-2005 at 04:31 AM.
Old 10-28-2005, 06:44 AM   #3
LQ Newbie
Registered: Oct 2005
Posts: 7

Original Poster
Rep: Reputation: 0
Tnx @ Demilord, I ll give it a try :P.
Old 12-14-2005, 07:35 PM   #4
Registered: Aug 2004
Location: Minneapolis, MN, USA
Distribution: Slackware 13.1
Posts: 82

Rep: Reputation: 15
Thanks, this saves me some worry


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How can I write Installation scripts for my LFS-5.1.1 distribution alihamza Linux From Scratch 2 09-13-2005 04:11 PM
LFS v6-installation of glibc; need help kartheekpn Linux From Scratch 31 04-26-2005 05:13 PM
making a LFS-installation CD/DVD ParticleHunter Linux From Scratch 2 09-17-2004 07:02 AM
Linux installation reboot Peper Linux - Newbie 2 07-14-2003 04:46 PM
remote installation with no reboot born4linux Linux - General 3 09-04-2002 11:58 PM

All times are GMT -5. The time now is 12:47 AM.

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