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.
I have a slightly configured version of LFS 7.7, and would like to make an iso image using it. I've managed to copy the files to a separate directory called CD_root using cp -a, and have set up isolinux as described in the Syslinux wiki. When I try to run it in a virtual machine, it starts isolinux, but can't find my kernal. Right now, my isolinux.cfg file is as follows:
Code:
DEFAULT linux
SAY Now booting the kernel from SYSLINUX...
LABEL linux
KERNEL /boot/vmlinuz-3.19
APPEND ro root=/dev/sda1
My kernal image is stored at /boot/vmlinuz-3.19 as shown above, but it tells me that there is no such file or directory.
If you look at the isolinux compile for Slackware it renames many of the file names to actually have certain extensions like .bin, .s, etc. This is nothing new technically.
You kinda have to anticipate the rename actually and assign the boot as such. Slackware's repository's /sources/installer has some hints as well as /isolinux on how it all works. Use it as a reference if needed.
You have to rock ridge protocol extension while making iso file. Just pass '-r' at begining of mkisofs.
And I don't remember now, but there is help page within syslinux sources about what isolinux supports -iso-level parameter of mkisofs.
I usually run 'mkisofs -r -iso-level 2 ...' to make boot cd. Try it. May be now isolinux gets correct filename. Else change your kernel name to 8 letter name followed by dot followed by 3 letter name. E.g. 'vmlinuz.319'.
I have a slightly configured version of LFS 7.7, and would like to make an iso image using it. I've managed to copy the files to a separate directory called CD_root using cp -a, and have set up isolinux as described in the Syslinux wiki. When I try to run it in a virtual machine, it starts isolinux, but can't find my kernal. Right now, my isolinux.cfg file is as follows:
Code:
DEFAULT linux
SAY Now booting the kernel from SYSLINUX...
LABEL linux
KERNEL /boot/vmlinuz-3.19
APPEND ro root=/dev/sda1
My kernal image is stored at /boot/vmlinuz-3.19 as shown above, but it tells me that there is no such file or directory.
Most distros also keep the kernel in cdrom_root/isolinux, so they just have to specify KERNEL vmlinuz ... Don't use / on a cdrom device, use relative path to cdrom_root/isolinux, ie ../boot/vmlinuzz ...
I got it to start booting the kernel using ReaperX7's recommendation of anticipating the new name. Now my isolinux.cfg file looks like this:
Code:
DEFAULT linux
SAY Now booting the kernel from SYSLINUX...
LABEL linux
KERNEL /BOOT/VMLINUZ_.19
APPEND ro root=/dev/sda1
However, when I try to start it in a virtual machine, the kernel crashes in less than a second.
Code:
[ 0.985154] ---[ end Kernel panic - not syncing: VFS: Unable to mount on unknown-block(8,1)
This leads me to believe that it is having problems figuring out where to mount the live cd filesystem. I've done some research, and it seems that my method for creating a live cd is so primitive and obscure that there really is very little documentation. I feel like like the problem is simple, like changing my /etc/fstab file, but I don't know where it should be mounted. If the problem is more complex than just modifying a file or two, I'm totally up for working through it anyway.
I know that creating the live cd would likely be easier if I used a more traditional method, but I really like this "challenge" for the sake of education. Also, if someone else tries this approach as well, I'd like to have laid a path for them to follow. Thank you guys for your consistent support.
You need to have every file system tool possible included on the CD/DVD in order for it to be usable as well as have the kernel built with all known file system support vectors built-in. The Slackware Huge kernel actually does this well but you also should assign other modules into an initramfs similarly.
You'll honestly want this:
ext2/3/4
ntfs-3g
jfs
btrfs
xfs
If your disk is non-redistribution ZFS and SPL (built into the kernel) are nice additions as well as possibly any other local and non-local file system tools.
As far as anything else, IF you ever get the disk working and wish to create a live disk, and use X, just stick to using the modesetting and fbdev video drivers, the mouse, keyboard, and joystick drivers for input (you can use evdev but only if you use eudev rather than mdev), and use a small networking daemon that's non-impact like netplug. A small UI WM like FluxBox will work wonders also. Most live disks can use BusyBox with additional tools like Bash and such a bit easier than normal tools due to memory usage of the Live Disk.
Though you kernel is loaded from CD/DVD, but this line above states that your LFS filesystem is present in first partition of first hard disk. So it would mount that first.
To make a live cd you would definitely need to have initramfs/initrd plus may be compressed filesystem like squashfs plus a union filesystem like unionfs or unionfs or aufs or unionfs-fuse.
I basically started with a small version of CLFS-sysroot to use for my "get it working" ISO bootdisk and added dropbear, netplug, and extlinux/syslinux.
The bootdisk is just that, a bootdisk. I have yet to try and add a full GCC suite going, but it's on my list after getting 7.9 going.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.