cvs commit: hints boot-cd_easy.txt

ian at linuxfromscratch.org ian at linuxfromscratch.org
Wed Apr 24 09:59:55 MDT 2002


ian         02/04/24 08:59:55

  Modified:    .        boot-cd_easy.txt
  Log:
  Updates by Author
  
  Revision  Changes    Path
  1.6       +359 -157  hints/boot-cd_easy.txt
  
  Index: boot-cd_easy.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/boot-cd_easy.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- boot-cd_easy.txt	2 Mar 2002 02:36:25 -0000	1.5
  +++ boot-cd_easy.txt	24 Apr 2002 15:59:55 -0000	1.6
  @@ -1,13 +1,14 @@
   TITLE:          Easy Boot CD of your LFS
  -LFS VERSION:    3.1
  +LFS VERSION:    3.3
   AUTHOR:	        Thomas Foecking <thomas at foecking.de>
  +		Christian Hesse <mail at earthworm.de>
   
   SYNOPSIS:
   	How to create an easy Boot CD of your working LFS system.
   
   HINT:
  -Version 0.1f
  -26/02/2002
  +Version 0.2
  +23/04/2002
   
   Contents
   --------
  @@ -16,22 +17,28 @@
       2. Configure & compile Kernel
       3. Move /dev /var /tmp /root /home to /fake/needwrite
       4. Create symlinks /... -> /fake/needwrite/...
  -    5. Create boot script which mounts the RAM disk
  -    6. Create boot disk & test your system
  -    7. Burn the Boot CD
  -    8. Reboot and enjoy
  +    5. Create boot script which mounts the ramdisk
  +    6. Install the bootloader isolinux
  +    7. Create initial ramdisk
  +    8. Burn the Boot CD
  +    9. Reboot and enjoy
   
   
   1. What do you need and what is the idea?
  -   ------------------------------------
  +   --------------------------------------
   
   	What do you need?
  -	- LFS system (which you want to burn on CD)
  -	- another linux/unix system (to create some stuff and burn the CD)
  -	- floppy drive (for boot disk and image)
  -	- CD-R(W) drive (to burn your LFS system and boot image on CD)
  -	- 1 floppy disk
  -	- 1 CD-R (+ 1 CD-RW is very recommend for saving money)	
  +	- LFS system which you want to burn on CD
  +	- another linux/unix system to create some stuff and burn the CD
  +	- CD-R(W) drive to burn your LFS system and boot image on CD
  +	- 1 CD-R + 1 CD-RW is very recommended for saving money
  +	- additional software:
  +		syslinux: (contains isolinux to boot the LFS kernel on CD)
  +http://freshmeat.net/redir/syslinux/10177/url_bz2/syslinux-1.67.tar.bz2
  +
  +		isoinfo: (optional to detect the LFS CD without mounting it)
  +http://www-tet.ee.tu-berlin.de/solyga/linux/isoinfo-0.03.01.tar.gz
  +
   
   	First of all you need a running LFS system, which you want to burn
   	on CD. You may want to have a LFS CD for creating new LFS systems
  @@ -42,7 +49,7 @@
   	xfree86 & windowmaker)
   
   	What is the idea?
  -	- Create kernel with RAM disk support
  +	- Create kernel with ramdisk and initrd support
   	- Move /dev /var /tmp /root /home to /fake/needwrite
   	- Set symlinks
   		/dev  -> /fake/needwrite/dev
  @@ -53,7 +60,7 @@
   	- Remount /dev/ram0 to /fake/needwrite
   
   	We'll have read-write access on /dev /var /tmp /root /home
  -	because they point to /fake/needwrite which is then a RAM disk
  +	because they point to /fake/needwrite which is then a ramdisk
   
   	You are able to do the most things from the other linux/unix
   	system by setting LFS to your LFS mountpoint. LFS=/path/to/lfs
  @@ -69,26 +76,51 @@
   
   	Boot your LFS system or chroot to it.
   
  -	Configure your kernel:
  +--- optional ---
  +
  +	As we're just here we first install isoinfo which we use laster. I
  +	assume the tarball isoinfo-0.03.01.tar.gz is placed in /usr/src.
  +
  +	Skip this step if you have already installed cdrtools! These cdrtools
  +	also contain a program named isoinfo which we'll use then.
  +
  +cd /usr/src
  +zcat isoinfo-0.03.01.tar.gz | tar x
  +cd isoinfo
  +
  +./configure --prefix=/usr
  +sed "s/\/usr\/local\//\/usr/g" Makefile > Makefile.new
  +mv Makefile.new Makefile
  +make
  +
  +make install
  +
  +--- end of optional ---
  +
  +
  +	Ok, now let's configure your kernel:
   
   cd /usr/src/linux
   make mrproper && make menuconfig
   
  -	You need RAM disk support!
  -		"Block devices" -> "RAM disk support"
  -		"16384" KB should be your standard
  -		(you can change this value on lilo prompt by setting
  -		"ramdisk_size=n" kB if you need more or less than 16 MB)
  +	You need ramdisk support!
  +		"Block devices  --->" 
  +			"<*> RAM disk support"
  +			"(4096)   Default RAM disk size"
  +			"[*]   Initial RAM disk (initrd) support"
  +
   	You need ISO 9660 CDROM file system support!
  -		"File systems" -> "ISO 9660 CDROM file system support"
  +		"File systems  --->"
  +			"<*> ISO 9660 CDROM file system support"
   
   	You should also think about building some other drivers into
  -	kernel or as modules. e.g. You plan to have network support
  +	your kernel or as modules which is much better.
   
   	If you want to be able to boot the CD on a lot of PCs with
  -	different CPUs (e.g. 468, Pentium, PII, PIII, Athlon) you have to
  -	complile the kernel for 486 (then it runs on >= 486).
  -	"Processor type and features" -> "Processor Family" -> "486"
  +	different CPUs (e.g. 486, Pentium, PII, PIII, Athlon) you have to
  +	compile the kernel for 486 (then it runs on >= 486).
  +		"Processor type and features  --->"
  +			"(486) Processor Family"
   
   	Save config and compile your kernel:
   
  @@ -96,14 +128,15 @@
   
   	Then you should copy the new built kernel to /boot:
   
  -cp arch/i386/boot/bzImage /boot/lfskernel
  +cp arch/i386/boot/bzImage /boot/lfskernel && cp System.map /boot/
   
  -	Run Lilo:
  +	Run Lilo (or update the bootloader you're using):
   
   /sbin/lilo
   
  -	Try to boot the new kernel in order to test RAM disk support:
  -	(if you're using devfs you must change: dev_ram=/dev/rd/0)
  +	Try to boot the new kernel in order to test ramdisk support:
  +	If you're using devfs you must change: dev_ram=/dev/rd/0
  +	
   
   dev_ram=/dev/ram0
   mke2fs -m 0 $dev_ram
  @@ -111,13 +144,13 @@
   	If this fails like
   	> The device apparently does not exist;
   	> did you specify it correctly?
  -	you have no RAM disk support in your kernel.
  +	you have no ramdisk support in your kernel.
   	You should read this chapter again ;-)
   
   	Otherwise you have done your work very well!
   
  -	You can check the size of your RAM disk by mounting it to
  -	/mnt and doning an "df -h"
  +	You can check the size of your ramdisk by mounting it to
  +	/mnt and doing an "df -h"
   
   mount $dev_ram /mnt
   df -h
  @@ -131,7 +164,7 @@
   	We move all stuff needing write access to /fake/needwrite.
   
   	First we have to create this directory
  -	and the mountpoint for the RAM disk:
  +	and the mountpoint for the ramdisk:
   
   mkdir -p $LFS/fake/{needwrite,ramdisk}
   
  @@ -156,59 +189,59 @@
   ln -s fake/needwrite/home home
   
   	"ls -l" says:
  -	 dev -> fake/needwrite/dev
  +	 dev  -> fake/needwrite/dev
   	 home -> fake/needwrite/home
   	 root -> fake/needwrite/root
  -	 tmp -> fake/needwrite/tmp
  -	 var -> fake/needwrite/var
  +	 tmp  -> fake/needwrite/tmp
  +	 var  -> fake/needwrite/var
   
   
  -5. Create boot script which mounts the RAM disk
  +5. Create boot script which mounts the ramdisk
      --------------------------------------------
   
  -	Ok, we have /dev /var /tmp /root /home pointed to
  +	Ok, we have /dev /var /tmp /root /home linked to
   	/fake/needwrite which is first read-only.
   	To be able to login (and to run services on runlevel x
   	which need write access to /dev /var /tmp /root or /home)
  -	we must call a script from our /etc/init.d/ directory which
  -	creates a RAM disk to /fake/needwrite with write access.
  +	we must call a script from our /etc/rc.d/init.d/ directory which
  +	creates a ramdisk to /fake/needwrite with write access.
   
   	I suggest to boot in runlevel 3 for multi user with network.
   	If you don't want to enable network you can remove the link
   	/etc/rc3.d/S200ethnet and start network manualy after
  -	login with /etc/init.d/ethnet start. This is what I prefer.
  +	login with /etc/rc.d/init.d/ethnet start. This is what I prefer.
   
  -	The following script creates a RAM disk to /fake/ramdisk and
  +	The following script creates a ramdisk to /fake/ramdisk and
   	will copy everything of /fake/needwrite to /fake/ramdisk.
  -	Then it remounts the RAM disk to /fake/needwrite.
  +	Then it remounts the ramdisk to /fake/needwrite.
   
  -cat > $LFS/etc/init.d/create_ramdisk << EOF
  +cat > $LFS/etc/rc.d/init.d/create_ramdisk << "EOF"
   #!/bin/sh
   
   dev_ram=/dev/ram0
   dir_ramdisk=/fake/ramdisk
   dir_needwrite=/fake/needwrite
   
  -source /etc/init.d/functions
  +source /etc/rc.d/init.d/functions
   
  -case "\$1" in
  +case "$1" in
           start)
  -                echo -n "Creating ext2fs on \$dev_ram ... "
  -                /sbin/mke2fs -m 0 -i 1024 -q \$dev_ram
  +                echo -n "Creating ext2fs on $dev_ram ... "
  +                /sbin/mke2fs -m 0 -i 1024 -q $dev_ram > /dev/null 2>&1
                   evaluate_retval
                   sleep 1
  -                echo -n "Mounting RAM disk on \$dir_ramdisk ... "
  -                mount \$dev_ram \$dir_ramdisk
  +                echo -n "Mounting ramdisk on $dir_ramdisk ... "
  +                mount -n $dev_ram $dir_ramdisk
                   evaluate_retval
                   sleep 1
  -                echo -n "Copying files to RAM disk ... "
  -                cp -dpR \$dir_needwrite/* \$dir_ramdisk
  +                echo -n "Copying files to ramdisk ... "
  +                cp -dpR $dir_needwrite/* $dir_ramdisk > /dev/null 2>&1
                   evaluate_retval
                   sleep 1
  -                echo -n "Remount RAM disk to \$dir_needwrite ... "
  -                umount \$dir_ramdisk
  +                echo -n "Remount ramdisk to $dir_needwrite ... "
  +                umount -n $dir_ramdisk > /dev/null 2>&1
                   sleep 1
  -                mount \$dev_ram \$dir_needwrite
  +                mount -n $dev_ram $dir_needwrite
                   sleep 1
                   ;;
           *)
  @@ -220,124 +253,284 @@
   
   	Make it executable:
   
  -chmod u+x $LFS/etc/init.d/create_ramdisk
  +chmod 0755 $LFS/etc/rc.d/init.d/create_ramdisk
   
   	create_ramdisk should be the first script excecuted by init,
   	so we set this link:
  -	/etc/rcS.d/S000create_ramdisk -> ../init.d/create_ramdisk
  +	/etc/rc.d/rcsysinit.d/S00create_ramdisk -> ../init.d/create_ramdisk
  +
  +cd $LFS/etc/rc.d/rcsysinit.d
  +ln -s ../init.d/create_ramdisk S00create_ramdisk
   
  -cd $LFS/etc/rcS.d
  -ln -s ../init.d/create_ramdisk S000create_ramdisk
   
  +6. Install the bootloader isolinux
  +   -------------------------------
  +
  +	We also need a bootloader on the CD to boot the kernel and ramdisk.
  +	lilo and grub are all nice but perfect for a CD is isolinux (it comes
  +	with syslinux). I assume the tarball syslinux-1.67.tar.bz2 is
  +	already placed in $LFS/usr/src.
  +
  +cd $LFS/usr/src
  +bzcat syslinux-1.72.tar.bz2 | tar x
  +
  +mkdir $LFS/isolinux
  +cp syslinux-1.72/isolinux.bin $LFS/isolinux/
  +
  +	If all files associated with the boot process should be in one
  +	directory we have to move kernel and the Rest of /boot to /isolinux.
  +
  +mv $LFS/boot/* $LFS/isolinux
  +
  +	Now we create a symlink from boot to isolinux.
  +
  +cd $LFS/
  +rmdir boot
  +ln -s isolinux boot
  +
  +	Kernel & co can again be found in /boot.
  +	But isolinux still needs a config-file, so we create it now:
  +
  +cat > $LFS/isolinux/isolinux.cfg << "EOF"
  +default bootcd
  +
  +label bootcd
  +  kernel lfskernel
  +  append initrd=initrd.gz boot=/dev/ram0 init=/linuxrc ramdisk_size=16384
  +EOF
  +
  +	isolinux is now installed completely.
   
  -6. Create boot disk & test your system
  -   -----------------------------------
   
  -	Now we'll create a boot disk.
  +7. Create initial ramdisk
  +   ----------------------
   
   	!!! But first we have to change /etc/fstab of LFS !!!
   	Delete all entries you don't need. (e.g. all /dev/hd*)
  -	We don't want to mount anything automaticly on boot.
  -	(do you?)
  +	You only need proc (and maybe devfs, devpts)
  +
  +vi $LFS/etc/fstab
   
   	Don't worry about mounting root filesystem "/".
  -	This will be mounted read-only by kernel.
  +	This will be mounted by linuxrc from initrd fs.
  +
  +	The best is to remove also the following links:
  +
  +rm $LFS/etc/rc.d/rc3.d/S20network
  +rm $LFS/etc/rc.d/rc0.d/K80network
  +rm $LFS/etc/rc.d/rcsysinit.d/S40mountfs
  +rm $LFS/etc/rc.d/rcsysinit.d/S30checkfs
   	
  -	The best is to remove also the following links in /etc/rcS.d:
  -	S100localnet, S200checkfs, S300mountfs
  +	Now we create the initrd image file and filesystem.
  +
  +dd if=/dev/zero of=$LFS/boot/initrd count=4k bs=1k
  +mke2fs -m 0 -i 1024 -F $LFS/boot/initrd
  +
  +mount -o loop $LFS/boot/initrd $LFS/mnt
  +cd $LFS/mnt
  +mkdir bin lib dev proc mnt
  +cp $LFS/bin/{bash,mount,grep,umount,echo} bin/
  +cp $(find $LFS -name "test") bin/
  +cp $(find $LFS -name "chroot") bin/
  +cp $(find $LFS -name "pivot_root") bin/
  +cp $LFS/lib/{libncurses.so.5,libdl.so.2,libc.so.6,ld-linux.so.2} lib/
  +cp -dR $LFS/dev/{console,hd?,scd*,null,ram*} dev/
  +ln -s bash bin/sh
  +ln -s test bin/[
  +
  +	If you wish to use isoinfo instead of mount to detect the LFS CD you
  +	must also copy isoinfo into the initial ramdisk.
   
  -	Create ext2 system on floppy and mount it to $LFS/mnt
  +cp $(find $LFS -name "isoinfo") bin/
   
  -/sbin/mke2fs -m 0 /dev/fd0
  -/bin/mount /dev/fd0 $LFS/mnt
  +	The first program executed by the kernel is /linuxrc. As it does not
  +	exist we create it. Our script will find the CD in the correct
  +	CD-ROM drive and then mount it as rootfs / and run /sbin/init 3.
   
  -	Copy kernel, bootmenu and devices to floppy 
  -	(this process may take some time ...)
  -
  -mkdir $LFS/mnt/{boot,dev}
  -cp $LFS/boot/{lfskernel,boot.b} $LFS/mnt/boot
  -cp -dpR /dev/fd[01]* $LFS/mnt/dev
  -cp -dpR /dev/hd[a-h]* $LFS/mnt/dev
  -
  -	Create lilo.conf at $LFS/mnt
  -
  -cat > $LFS/mnt/lilo.conf << EOF
  -
  -        boot      =/dev/fd0
  -        install   =boot/boot.b
  -        map       =boot/map
  -        timeout   =100
  -        prompt
  -        read-only
  -        backup    =/dev/null
  -        compact
  -
  -### remove this when boot floppy works
  -        image     = boot/lfskernel
  -        label     = cur_lfs
  -        root      =/dev/fd0
  -        append    ="root=/dev/hdXn" # your LFS partion e.g. hda1
  -	read-only
  -###
  -
  -        image     = boot/lfskernel
  -        label     = PRI_MASTER
  -        root      =/dev/fd0
  -        append    ="root=/dev/hda"
  -
  -        image     = boot/lfskernel
  -        label     = PRI_SLAVE
  -        root      =/dev/fd0
  -        append    ="root=/dev/hdb"
  -
  -        image     = boot/lfskernel
  -        label     = SEC_MASTER
  -        root      =/dev/fd0
  -        append    ="root=/dev/hdc"
  -
  -        image     = boot/lfskernel
  -        label     = SEC_SLAVE
  -        root      =/dev/fd0
  -        append    ="root=/dev/hdd"
  +
  +----------- copy & paste -------------
  +
  +cat > $LFS/mnt/linuxrc << "EOF"
  +#!/bin/sh
  +
  +#if you want use devfs and don't have /dev/hd?, /dev/scd* then
  +#you must mout your devfs here:
  +#mount devfs /dev -t devfs //KEINE AHNUNG... bitte ändern, wenn falsch ;-)
  +
  +#ID is the volume id / label of the LFS boot CD if you use /bin/isoinfo
  +#or ID is a file in root of the LFS boot CD
   EOF
   
  -	You can remove "compact" in lilo.conf to make lilo boot faster,
  -	but with "compact" is more failsave when using a floppy.
  +echo "ID=\"LFS_$(date +%Y%m%d)\"" >> $LFS/mnt/linuxrc
   
  -	The Boot CD should work on other systems too!
  -	This is why we set root to /dev/fd0 to let lilo boot
  -	the kernel from floppy and set append="root=/dev/hdx"
  -	to let the kernel mount /dev/hdx as root fs "/"
  -	(/dev/hdx is the cdrom drive)
  -	When you create a bootable CD, the floppy image is copied
  -	to the CD and the BIOS will detect the boot image of the CD
  -	as floppy /dev/fd0.
  +cat >> $LFS/mnt/linuxrc << "EOF"
  +TMP_MOUNT="/mnt"
   
  -	Run lilo from $LFS/mnt
  +PATH="/bin:/sbin:/usr/bin:/usr/sbin"
   
  -cd $LFS/mnt
  -$LFS/sbin/lilo -C lilo.conf -v
  +#this script searches for cdrom devices and then tries to find
  +#the LFS boot CD in order to mount it as / (rootfs)
  +#it detects: IDE devices hda - hdn and SCSI devices scd0 - scd99
  +#or when using devfs: IDE/SCSI devices cdrom0 - cdrom99
  +
  +#you need following programs:
  +#- /bin/isoinfo (optional)
  +#- /bin/sh (e.g. bash)
  +#- echo
  +#- [ (which is linked to test)
  +#- mount
  +#- umount
  +#- grep
  +#- pivot_root
  +#- chroot
  +
  +#you need following devices:
  +#- /dev/hd* or /dev/scd* or /dev/cdrom/cdrom*
  +#- /dev/null
  +
  +#you need following directories:
  +#- /proc
  +#- $TMP_MOUNT (if you don't have /bin/isoinfo)
  +
  +if [ -e "/bin/isoinfo" ]; then
  +  CHECK_TYPE="isoinfo"
  +else
  +  CHECK_TYPE="try_mount"
  +fi
  +
  +if [ ! -d "/proc/" ]; then
  +  mkdir /proc
  +fi
  +
  +mount -n proc /proc -t proc
  +
  +#1. search for cdrom devices and add them to CDROM_LIST
  +
  +CDROM_LIST=""
  +
  +#do we have devfs? (then its very easy)
  +if [ -d "/dev/cdrom/" ]; then
  +  for cdrom_device in /dev/cdrom/cdrom[0-99]
  +  do
  +    if [ -e "$cdrom_device" ]; then
  +      CDROM_LIST="$CDROM_LIST $cdrom_device"
  +    fi
  +  done
  +else #we search in proc tree for ide cdrom devices
  +  for ide_channel in /proc/ide/ide[0-9]
  +  do
  +    if [ ! -d "$ide_channel" ]; then
  +     break
  +    fi
  +    for ide_device in hda hdb hdc hdd hde hdf hdg hdh hdi hdj hdk hdl hdm hdn
  +    do
  +      device_media_file="$ide_channel/$ide_device/media"
  +      if [ -e "$device_media_file" ]; then
  +        grep -i "cdrom" $device_media_file > /dev/null 2>&1
  +        if [ $? -eq 0 ]; then
  +          if [ -e "/dev/$ide_device" ]; then
  +            CDROM_LIST="$CDROM_LIST /dev/$ide_device"
  +          fi
  +        fi
  +      fi
  +    done
  +  done
  +  for scsi_cdrom in /dev/scd[0-99]
  +  do
  +    if [ -e "$scsi_cdrom" ]; then
  +      CDROM_LIST="$CDROM_LIST $scsi_cdrom"
  +    fi
  +  done
  +fi
  +
  +#2. now we try to find the LFS boot CD (we use ID as identification)
  +
  +LFS_CDROM_DEVICE=""
  +echo "Using $CHECK_TYPE"
  +for cdrom_device in $CDROM_LIST
  +do
  +  echo -n "Checking $cdrom_device ... "
  +
  +  if [ "$CHECK_TYPE" = "try_mount" ]; then
  +    mount -n -t iso9660 $cdrom_device $TMP_MOUNT > /dev/null 2>&1
  +    media_found=$?
  +  fi
  +  if [ "$CHECK_TYPE" = "isoinfo" ]; then
  +    isoinfo -d -i $cdrom_device > /dev/null 2>&1
  +    media_found=$?
  +  fi
  +
  +  if [ $media_found -eq 0 ]; then
  +
  +    echo -n "media found"
  +    if [ "$CHECK_TYPE" = "try_mount" ]; then
  +      [ -e "$TMP_MOUNT/$ID" ]
  +      media_lfs=$?
  +    fi
  +    if [ "$CHECK_TYPE" = "isoinfo" ]; then
  +      isoinfo -d -i $cdrom_device | grep -i "Volume id:" | grep "$ID" \
  +      > /dev/null 2>&1
  +      media_lfs=$?
  +      if [ $? -eq 2 ]; then
  +        isoinfo -V $cdrom_device | grep "$ID" > /dev/null 2>&1
  +        media_lfs=$?
  +      fi
  +    fi
  +
  +    if [ "$CHECK_TYPE" = "try_mount" ]; then
  +      umount -n $cdrom_device > /dev/null 2>&1
  +    fi
  +
  +    if [ $media_lfs -eq 0 ]; then
  +      echo ", LFS boot CD found. Ready!"
  +      LFS_CDROM_DEVICE="$cdrom_device"
  +      break;
  +    else
  +      echo ", not LFS boot CD."
  +    fi
  +
  +  else
  +    echo "no media "
  +  fi
  +done
  +
  +
  +#3. mount LFS CD as / (root fs)
  +if [ "$LFS_CDROM_DEVICE" = "" ]; then
  +
  +  echo "No LFS boot CD found!!!"
  +  exit 1
  +
  +else
  +
  +  echo "Booting from $LFS_CDROM_DEVICE ..."
  +
  +  mount -n -o ro $LFS_CDROM_DEVICE $TMP_MOUNT
  +  cd $TMP_MOUNT
  +  pivot_root . mnt
  +  umount -n /mnt/proc >/dev/null 2>&1
  +  exec chroot . sh -c 'umount -n /mnt >/dev/null 2>&1;\
  +  exec -a init.new /sbin/init 3'\
  +  <dev/console >dev/console 2>&1
   
  -	Umount floppy
  +fi
  +EOF
  +
  +--------------------------------------
   
  -cd $LFS/
  -/bin/umount $LFS/mnt
   
  -	Thats it! You can try to boot your system from floppy.
  -	The kernel will mount your LFS partition read-only. This
  -	is the same as if you would boot from CD. Now you will see
  -	if your LFS system boots. It should mount the RAM disk and
  -	go into runlevel 3. Try to login !
  +	To make this script executable run
   
  -	Did the boot disk work? You may want to delete cur_lfs from
  -	$LFS/mnt/lilo.conf and run lilo again, so that you have a clean
  -	boot image.
  -	Now create an image of this disk to /boot/ of the LFS system
  +chmod 0755 $LFS/mnt/linuxrc
   
  -dd if=/dev/fd0 of=$LFS/boot/image bs=1024
  +	Ok, that's it. Unmount the image and compress it.
  +
  +cd $LFS/
  +umount $LFS/mnt
  +gzip $LFS/boot/initrd
   
   
  -7. Burn the Boot CD
  +8. Burn the Boot CD
      ----------------
   
   	If you have a CD-RW you should take this for testing. When
  @@ -348,24 +541,30 @@
   	Before you start burning, check the size of your LFS tree:
   
   du -h $LFS/
  -	
  -	Delete all stuff you don't need on a Boot CD. (/usr/src/linux/)
  +
  +	Delete all the stuff you don't need on a Boot CD. (e.g. /usr/src/*)
  +
  +	Because linuxrc must be able to identify the CD you have to create a
  +	file called "LFS_YYYYMMDD". (But only if you don't use isoinfo)
  +
  +touch $LFS/LFS_$(date +%Y%m%d)
  +
  +	Now burn the LFS system on CD
   
   	Note!
   	dev=0,0,0 is the device number of your CD-Writer
   	Check your SCSI devices with "cdrecord -scanbus"
   	speed=4 should be changed to (max) speed of your CD-Writer.
  +	If you are using a CD-RW add blank=fast to the cdrecord-command!
   
   cd $LFS/
  -mkisofs -bboot/image -cboot/catalog -r -l -D -J -L -VLFS $LFS | \
  -cdrecord -v -eject dev=0,0,0 speed=4 -data -
  -
  -	If this doesn't work you may want to use xcdroast instead of
  -	command line to	burn your CD.
  -	(Set Boot image to "boot/image" and Catalog to "boot/catalog")
  +mkisofs -R -l -L -D -b isolinux/isolinux.bin -c isolinux/boot.cat \
  +-no-emul-boot -boot-load-size 4 -boot-info-table -V "LFS_$(date +%Y%m%d)" \
  +$LFS | \
  +cdrecord -v -eject dev=0,0,0 speed=4 -
   
   
  -8. Reboot and enjoy
  +9. Reboot and enjoy
      ----------------
   
   	Reboot and let your Bios boot from CD.
  @@ -373,5 +572,8 @@
   
   ------------------------------------------------------------------
    If you have any ideas, suggestions or found a bug you can send a
  - mail to me: Thomas Foecking <thomas at foecking.de>
  + mail to:
  + Thomas Foecking <thomas at foecking.de>
  + Christian Hesse <mail at earthworm.de>
   ------------------------------------------------------------------
  +
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list