Review your favorite Linux distribution.
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-04-2005, 10:15 AM   #1
Senior Member
Registered: Apr 2003
Posts: 3,672

Rep: Reputation: 55
Where can I find instruction to build BLFS LiveCD

Hi folks,

I have been searching around for step by step instrution to build LiveCD from BLFS. What I can find is following document;

There are documents re building LiveCD from LFS. However I need from BLFS.

Any advice? TIA

Old 10-04-2005, 10:34 AM   #2
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389Reputation: 2389

I don't think there is such a document. Well, there is, but you migth not like the answer

All packages in LFS must be installed, packages from BLFS don not have to be installed. It's a well thought up collection of add ons for LFS, some you will and some you won't install. It's all up to you.

The link you gave provides in adding packages from BLFS (2 Add wanted additional packages with the help of BLFS.).

Hope this helps.
Old 10-04-2005, 02:43 PM   #3
LQ Newbie
Registered: Mar 2005
Posts: 15

Rep: Reputation: 0
It appears that you're not grasping some of the fundamental concepts behind LFS and BLFS. A BLFS system *is* an LFS system, just extended with packages of your choice. Almost no one runs a LFS system as is, in the condition the LFS book leaves you. And for a LiveCD to function properly or to be of any real use, you will most certainly want to put some BLFS packages on it.

Therefore, as my (granted, brief - and out of date) document says (the one you linked to), to build your own customized LiveCD based on LFS, you first build a LFS system, *then you add any BLFS packages to that system you need*. You can do that while still in chroot - no need to reboot into that LFS system.

Once you've got all that done then you can add custom bootscripts and a customized init script.

What you really need to do, then, is follow the existing hints for creating your own LFS LiveCD (and in case you've missed this point, that *is* a BLFS CD). Try this one:

If you don't like that one, there are a couple of others in the dir:

Old 10-04-2005, 06:40 PM   #4
Senior Member
Registered: Apr 2003
Posts: 3,672

Original Poster
Rep: Reputation: 55
Hi jhuntwork,

Tks for your advice.

I have a running BLFS ready for building LiveCD

I read this document before.

Under " Why it is what it is, and it ain't what it ain't "
  ........... Creating an install CD, or using 
  filesystems such as squashfs, may require more info than a beginner might 
  have, and attempting to include all of it might make this hint more 
  confusing than helpful.
The space taken up by the BLFS exceeds 1 gb. I must compress it using squashfs. Therefore I started searching for more relevent documents before start.

Others noted with tks.

Old 10-05-2005, 12:08 AM   #5
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204

Rep: Reputation: 30
It sounds like you want to make a Live CD with all the BLFS packages installed. While this may be possible on multiple disks it would be tricky, and rely on you being able to switch disks.

If on the other hand you wan't to make a Live CD with one disk you can take a look at DSL (Damn Small Linux), Knoppix, and SLAX list of packages they have used.

Here is a useful link to see a list of other distros, and their packages
Old 10-05-2005, 04:01 AM   #6
Senior Member
Registered: Apr 2003
Posts: 3,672

Original Poster
Rep: Reputation: 55
Hi shotokan,

Tks for your URL

It sounds like you want to make a Live CD with all the BLFS packages installed.....
No, I'm not prepared to install all BLFS packages. I have a BLFS 6.1 running with full function. It takes up about 1.2-1.3 gb approx. So I must use squashfs compressing it. I have some documents in my possession which wiil guide me building LFS LiveCD of small size capable to be burnt on a 700MB CD. I'm now searching document on the compressing part.

Others noted with tks.

Old 10-05-2005, 10:00 AM   #7
Senior Member
Registered: Apr 2003
Posts: 3,672

Original Poster
Rep: Reputation: 55
Building BLFS LiveCD

Hi folks,

I'm prepared to learn building LiveCD from BLFS 6.1.

Acccording to;
LFS LiveCD Documentation

The process of making an LFS livecd ......into six basic steps:

1. Build a base LFS system according to the usual procedure.
2. Add wanted additional packages with the help of BLFS.
3. Modify your bootscripts and tweak system settings to meet your needs.
4. Create an initial script/program that will set up your special environment.
5. Configure your bootloader.
6. Package it all up into an iso.

I already completed steps 1. and 2. having a BLFS 6.1 box running with all essential functions similar to other Linux distro. It is a dual boot system coexisting with FC3, the host, in separate partitions

/dev/hda2 FC3 root
/dev/hda5 FC3 home
/dev/hda6 BLFS 6.1 taking up about 1.5 gb

/dev/hda7 for building LiveCD
# df -hT /dev/hda7
Filesystem Type Size Used Avail Use% Mounted on
/dev/hda7 ext3 1.8G 35M 1.6G 3% /mnt/livecd

I can manage step 5. to configure the bootloader and steps 6. creating ISO image.

What I don't understand are
1) step 3 and step 4
2) whether copy BLFS 6.1 from /dev/hda6 on /dev/hda7 with "dd" command and use
"Squashfs" to compress it on /dev/hda7

Can any folk shed me some light? TIA

seems not relevent to my test.

Old 10-07-2005, 06:38 AM   #8
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

I have merged your threads. In future, please either edit your original post or reply to your own post with the extra info.
Old 10-15-2005, 05:35 PM   #9
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 154

Rep: Reputation: 32
Creating a live-cd from scratch isn't easy, I think.
What you could do, is look on the net for a live cd and than look at it.
Luckily for you I have a Knoppix live-CD and looked at it a bit.

The CD is boot able like all boot able CDs: it uses and boot.img to be bootable.
You need to specify both when making the iso using mkisofs. All looks complicated though.

But however WHEN it boots it starts the kernel and it loads a initrd(hopefully that sounds at least a little familiar).
The initrd contains a script, linuxrc, and a simple linux-fs with /dev,/mnt,/bin and so more basic directories.
Look in your /boot directory. There will at least be one initrd file. Have a look at it:
copy it to a temporary location, gunzip if necessary and than mount using: mount -o loop /path/file /mnt/somewhere
If that doesn't work try it with mount -t cramfs -o loop /path/file /mnt/somewhere.
The file should give you a basic idea of a linuxsystem for one task: loading the actual linuxsystem

The script linuxrc is started when the initrd is loaded and makes sure the system boots step by step. The linuxrc is just like any other shellscript. The only thing you must keep in mind is that the resources you can use are limited to what is included in your initrd's filesystem.
Knoppix solved this with using ash. This shell has built-in mount/umount, test and some other neat functions(they even built in insmod/rmmod).

Knoppix loads modules for filesystems and then it mounts every cdrom-drive, one at a time, untill it finds the cdrom-drive containing the knoppix itself.
(That's one of the key element of a live-cd: finding your cdrom)
When it has found the cdrom it starts a basic setup and puts the files in the right places.
If you have found your CDROM you can start loading your actual filesystem to some locating ( or in some particular way) and start a bootsequens similar to a harddisk setup.

So finding your CDROM-drive is one of the things you need to do.
Another one is deciding what kind of filesystem to use and where you would like to put your filesystem. Some ideas for that:
  • Load the entire filesystem into ram(easy but slows your system down)
  • Make your filesystem read-only, but load some files into RAM(better)
  • Make your filesystem read-only and save changes on the harddisk(thus assuming you have one, difficult to configure)
  • Use filesystems that loads only needed files into ram and keeps the rest compressed(squasfs)
  • Use a filesystem that mimics being writable, by using the CDROM as filesystem, but when the CDROM is edited the change will be saved in your RAM(no compression will be possible, but is the best way when you only need 650MB, at least that's what I think)

If you have chosen your approach you can start building your filesystem or mkfs your root-directory to the filesystem it needs to be.
It could be possible that you need to create the filesystem first and give it a specified size using dd and than copy all your files onto it.

This is my description of important things concerning live-CD. Keep in mind I have never made one and that this is sort of brainstorming what needs to be done. If you still want to build a live-cd I would be glad to help you out however.

Hope this has given you some ideas and points of interest
Good Luck and ask, because this are nice things to assist in
Old 10-16-2005, 07:02 AM   #10
Senior Member
Registered: Apr 2003
Posts: 3,672

Original Poster
Rep: Reputation: 55
Hi hoes,

Tks for your detail advice.

Luckily for you I have a Knoppix live-CD and looked at it a bit.
I explored Knoppix LiveCD since its first generation and also LFS LiveCD recently. Remastering Knoppix LiveCD will be less complicate. But I'm prepared to learn building a Live-CD on the BLFS 6.1 built by me recently.

According to the documents searched by me on Internet there are several routes in building a Live-CD. Even for building a LFS Live-CD there are at least 2 routes in pursuant to the said documents. I haven't discovered a document describing the complete steps building a Live-CD on BLFS. On scrutinizing the documents it comes to my notice that the later will include following steps;

1) building a Live-CD on BLFS
2) compressing the Live-CD to a total size less than 700MB
3) creating an ISO image on the compressed Live-CD
4) burning the ISO image on CD

Steps 3) and 4) are simple. All of us should be knowledgeable.
Steps 1) and 2) are not so simple, especially the former. After studying the relevant documents I already possess knowledge on both of them to certain extend. But it is only on theory. What will be the outcome??? I don't know unless after trying it. So I started posting to see whehter there are folks having this experience and are willing sharing me some light.

In respect of Step 2) abovementioned I already solved the compression technique. So I'm now ready to start Step 1) based on the information summarized on reading the relevant documents in my possession. I'll let you know of my advancement when available. Tks


Last edited by satimis; 10-16-2005 at 07:05 AM.
Old 10-21-2005, 08:52 PM   #11
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,046
Blog Entries: 4

Rep: Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656Reputation: 2656
I know that a lot of folks would like to see a BLFS live-CD. In other words, a bootable CD that contains the necessary files, documentation, and nALFS scripts needed to install things.

It's very handy to have all of the files you need to accomplish a task, on a CD-ROM that you can insert right into the machine without having to have access to the Internet. In an ideal world, all of the LFS-variations would have one.
Old 10-22-2005, 01:11 PM   #12
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 154

Rep: Reputation: 32
I don't think satimis is trying to build such a live-cd.
It wouldn't even be possible for BLFS because it has too much binaries(too much space required) and you wouldn't even want to install all of them, so I don't see the point of making a BLFS CD. I think however that the LFS live Cd is a super idea, although I didn't use it myself.(Just a good inet-conn)
Old 10-22-2005, 07:31 PM   #13
Senior Member
Registered: Apr 2003
Posts: 3,672

Original Poster
Rep: Reputation: 55
Hi hoes,

I don't think satimis is trying to build such a live-cd.
Sorry, hoes. I'm prepared to build a BLFS Live CD. With recent compressing technique it is possible. "squashfs" is able to compress 1.3G to 344MB. I tested it. 7zip is even more promising. I'll test it later after completing building BLFS 6.1.

I'll post my result when available.



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
build error - can't find kernel source PickledHerring Linux - Newbie 1 11-15-2005 07:29 AM
Where can I find Martin's LiveCD Comparison Page satimis Linux - General 1 10-12-2005 06:17 AM
How to build LiveCD from LFS isilinux Linux From Scratch 1 08-24-2005 03:45 AM
How to find out the instruction pointer of a process? shy Programming 3 10-23-2004 04:01 PM
BLFS 5.0 dpkg build fails (ncurses-related error) bhaskie Linux From Scratch 2 02-07-2004 04:59 AM

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