LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-22-2005, 03:55 PM   #1
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Rep: Reputation: 31
BLFS using LFS Live CD?


Is it possible to use the LFS-Live-CD or any other live cd to install the packages in BLFS.

The reason I'm asking is that it is a God-send to be able to copy and paste from the book. When I print out the pdf version of the book, some characters look too similar and have caused me a lot of grief while doing LFS.

Such as the number 1 & the letter l. Trust me, in the pdf version they look nearly identical as opposed to what you see right here.

This is just a thought and not a major problem other having to print the entire 938 pages of BLFS 6.0 since I can't figure out how else to see it after installing LFS until I install X in BLFS.

Any thoughts?
 
Old 07-23-2005, 04:38 PM   #2
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
Yes, it's quite possible. I've installed X and such in my host (livecd) environments before.
 
Old 07-24-2005, 02:23 PM   #3
shotokan
Member
 
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204

Rep: Reputation: 30
Well, you could install links and gpm (from the BLFS book) it's easy to do this with nALFS and the BLFS profile.

But that assumes you used nALFS to install LFS.
 
Old 07-25-2005, 07:28 AM   #4
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Original Poster
Rep: Reputation: 31
I did not use nALFS to install LFS. I did see mention of using links & gpm at the end of the LFS book. I installed LFS 6.1 and am waiting for the companion BLFS 6.1 to be released before I continue. That should give me enough time to decide on which strategy I will use. I think that the link & gpm will be the best bet.

Thanks!
 
Old 07-25-2005, 03:20 PM   #5
AxXium
Zenwalk Admin
 
Registered: May 2005
Location: Louisiana, U.S.A.
Distribution: Zenwalk Gnu/Linux
Posts: 258

Original Poster
Rep: Reputation: 31
I went back to the LFS 6.1 book and read the following.

Chapter 6 Section 3

Code:
It is important that all the commands throughout the remainder of this chapter and the following chapters are run
from within the chroot environment. If you leave this environment for any reason (rebooting for example),
remember to first mount the proc and devpts file systems (discussed in the previous section) and enter
chroot again before continuing with the installations.
and I put together what I think may be the way to mount the LFS system, assume root & install software while in a live cd enviornment until X and a window manager is installed.

Tell me if this is how you did it kjordan



Code:
Step 1.

# mkdir -p $LFS/{proc,sys}


Step 2.

# mount -t proc proc $LFS/proc

Step 3.

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

Step 4.

# 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

Step 5.

# exec /tools/bin/bash --login +h

Step 6.

# mount -n -t tmpfs none /dev

Step 7.

# 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}


Step 8.

# 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 \
  mkdir /dev/pts \
  mkdir /dev/shm

Step 9.

# mount -t devpts -o gid=4,mode=620 none /dev/pts \
  mount -t tmpfs none /dev/shm
Let me know if this is correct or if there is a short between the chair and the keyboard.

Thanks!
 
Old 07-25-2005, 05:58 PM   #6
kjordan
Member
 
Registered: Jul 2004
Distribution: LFS, I felt the itch and scratched it
Posts: 227

Rep: Reputation: 31
If you're able to get past Chapter 6 in LFS (which you're going to have to to get to installing X), then most of those steps aren't need.

Since tools will no longer be needed, you'll be using the chroot found at the end of Chapter 6
chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login

Then do
/sbin/udevstart

and since you should have an fstab completed (if you finished Chapter 7), do
mount /dev/pts
mount /dev/shm
mount /proc
mount /sys
and they should be mounted as they need to. I never really exited my chroot environment from Chapter 6, so I'm guessing that these steps are correct. They do seem like what would need to be done though to get the environment you need (since this is basically what would be done at boot).
 
Old 07-25-2005, 07:15 PM   #7
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
It seems to me (and I have not done LFS yet, want to) that once you get through LFS and got to a bash prompt with a solo reboot, the live cd functionality is already done, you could burn a cd with the BLFS book and source to do this.
 
  


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
LFS or BLFS masand Linux From Scratch 16 12-02-2004 02:31 PM
Lfs --> Blfs KptnKrill Linux From Scratch 3 10-11-2003 11:19 AM
Beyond BLFS. Pure LFS? SparceMatrix Linux From Scratch 8 06-17-2003 10:38 AM
blfs and lfs? newpenguin Linux From Scratch 7 12-04-2002 07:58 PM
Lfs & Blfs safrout Linux From Scratch 4 07-05-2002 07:27 AM

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

All times are GMT -5. The time now is 06:08 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