Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
However, I myself haven't build a liveCD for my LFS. So I can not tell you what difficulties you might encounter.
Thanks for your reply, crts. But that link was about some installers for a linux distro. But I want to build a live cd for my LFS System. Can somebody help me?
Thanks for your reply, crts. But that link was about some installers for a linux distro. But I want to build a live cd for my LFS System. Can somebody help me?
Have you looked at the guide over at LFS? You'll have to change around a few things; but browsing through it, it doesn't seem too difficult to me.
I've wanted to do this since I finished my LFS in '08. I've tried to do just this but had to stop because I was getting bogged down with scripts. I'll tell you the story of how I tried to do it.
(Disclaimer: re-reading this message I realized that I'm not answering anyones question here. However, the info may prove useful.)
I bought an old tablet PC in '09. It had only 32 MB of RAM. I wanted to install a Linux distro on it but it didn't have a CDROM drive and no USB so what was I to do? (You see this problem in a lot of postings.) Anyway, basically a floppy install was the way to go. But since I've built an LFS in the past so I asked myself 'Why can't I use the LFS Live disk'? The idea was to use the LFS Live CD and copy it to a partition and boot from it.
My reason is pretty simple. The LFS Live CD contains a kernel that can boot from CD, it can determine the necessary modules to load (for my particular hardware) and give me a shell prompt. What else do I need? To me the LFS Live CD is a recovery CD as well as the perfect generic system. I felt, a system should exist such that a simple copy operation should install a perfectly usable system, i.e. boot from CD and copy contents of CD to partition of hard drive.
Anyway, the LFS Live CD contains an ISO image that it mounts at boot time. If you do a search of installing LFS off the hard drive you'll see what I mean. I posted a message once on how to do this. So I copied this ISO image to my laptop hard drive, installed GRUB on the hard drive, copied the LFS Live CD kernel and initrd and then rebooted. GRUB will read the EXT2 filesystem for the kernel and initrd and boot. So that works Ok. I could boot from the hard drive. Like I said before, I wanted to copy the system over. I didn't see why it couldn't be done. So I tried. I can't remember all the details so I'll write some points from here on (hope I'm not too misleading).
1. the LFS kernel is compiled to mount ISO9660 filesystems (I forget what it's called) but not EXT2! OR the initrd (from LFS LiveCD) contains only enough tools to mount an ISO image. The kernel and initrd files are created to work in tandem. I tried mixing and matching Damn Small Linux kernel and initrd with LFS LiveCD and it didn't work.
2. Check out the GRUB commands to boot from the hard drive the LFS LiveCD contents. You'll see that the root= parameter is the boot parameter for all kernels. This parameter gets passed to the kernel. Here your going to point to another root filesystem.
3. Read the documents for Root filesystems.
4. Read the documents for Boot disks.
5. Read the documentation for Initial RAM disks.
6. Compile your kernel with support for the filesystem of your choice (notice that there are some USB pendrives around that boot off a FAT32 filesystem)
7. Note: an initrd is nothing more than a pre-root filesystem disk. It's a virtual root filesystem. So that you may not want a "real" filesystem. I have thought of creating an image of a "real" filesystem and just mounting it (through loopback interface)
8. Read the documents for Loopback devices.
9. There is a txt file in the LFS documentation that explains how you can customize your LFS LiveCD.
10. Finally, read about the chroot command. Pretty interesting (this is what happens when the initrd transfers control to your real root filesystem).
Good luck,
ddden
P.s. bottom line is that I didn't finish this because I didn't have the time to read the scripts contained in the initrd file. I didn't want to try and figure out what a generic ISO9660 LFS kernel looks like (what it needs, etc.)
Last edited by ddden; 02-15-2010 at 07:13 AM.
Reason: added a quick note at the end
wow,
me too on a scripto-matic "byol,lfs,ryol,download and compile " ,build with 3x bootstrap bash with colour and curses; including fully automatic modprobe . "what a fun ,enlighting,and rewarding experience to 'get how it works'"
but in doing the footwork and testing the scripts is a monumental task ,i even found out that you can simply and easily "burn a design in the
cd for show off cleverness " (not the label side btw).
dogpile: "bootable cd"; "el torito"; " ISO9660"; "
finish your reading assignment ? --- if you really did build it? -- you did do it right? - this is not stolen or cleaver tricks right ?
when you " cd to shangrilala (/lfs/build ) and switch kernals and mounted file systems " is this not initial ramdisk,scripts,--- consider the care needed to stay below 1.4mb that was necessary along with kernal low and high mem.
historicly yadrasil (sp?) i beleave gets firsty's. first open community one size boots all "a massive coperation of epic global participation"
goes to DEMO LINUX .
there is a "live boot router-- no hd needed"," an ultimate rescue disk " Debian offers a compact tool box (better than any MI plot )
there is at least one "how to",
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.