Tuesday, June 24, 2008

LFS README files are useful

The live CD has a README.txt file with a wealth of information. It seems to be the same as the LFS LiveCD Documentation.
I decided to try this hint:

BOOTING FROM ISO IMAGE
----------------------
If you want to boot this CD on a computer without a CD-ROM drive, follow the steps below.

Store the ISO image of this CD as a file on a partition formatted with one of the following filesystems: vfat, ntfs, ext2, ext3, ext4, jfs, reiserfs, reiser4, xfs

Copy the boot/isolinux/{linux,initramfs_data.cpio.gz} files from the CD to your hard disk

Configure the boot loader to load "linux" as a kernel image and "initramfs_data.cpio.gz"
The following parameters have to be passed to the kernel:

rw root=iso:/dev/XXX:/path/to/lfslivecd.iso rootfstype=fs_type

where /dev/XXX is a partition where you stored the LiveCD image, and fs_type is the type of the filesystem on that partition.
-------------------------

I have the livecd iso image on a hard drive /dev/hde8 in the directory /ISO_S.
I found a way to translate those instructions into action which involved mounting the iso filesystem and then copying the 2 files to the hard drive. Finally, I added the information to the grub configuration file and It booted with the iso image that is on the hard drive.

cd /
mkdir /tmp/livecd
mount /ISO_S/lfslivecd-x86-6.3-r2160.iso /tmp/livecd \
-t iso9660 -o loop
cp /tmp/livecd/boot/isolinux/linux /boot/
cp /tmp/livecd/boot/isolinux/initramfs_data.cpio.gz /boot/
umount /tmp/livecd

Added these lines to /boot/grub/menu.lst

title LFS liveCD
root (hd0,7)
kernel /boot/linux rw \
root=iso:/dev/hde8:/ISO_S/lfslivecd-x86-6.3-r2160.iso \
rootfstype=ext2
initrd /boot/initramfs_data.cpio.gz

Running the livecd this way runs faster than running from the CD-ROM drive.
Or you can add the toram option putting it at the end.
Booting from the livecd in the CD-ROM would look like this
boot: linux toram

The jhalfs has a README.CUSTOM file which I am currently studying. The building can be extended beyond the basic system to add more function before the automated build ends. That sounds like something I would like to try.
I found this note in a mail list that wasn't in the README.CUSTOM file I got:
RUNNING:::
Although your scripts are added to the generated makefile they are not automatically built. You must tell the makefile to build the tools with the cmd make mk_CUSTOM_TOOLS
I'll find out when I try it.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Click blog title for the latest post