[mdlug] Booting CD images from a hard drive partition

Drew drew4096 at gmail.com
Fri Mar 20 21:53:46 EDT 2009


I wish to set aside one or more partitions on the new hard drive for 
holding a copy of
a Linux boot CD, such as Knoppix, PC-OS, or RIPLinux, to have a copy ready to
boot without needing to dig out the CD.

I've managed to get Grub, on the MBR and with its config files in 
/dev/sda2, to boot
into another copy of Grub on /dev/sda5 via rootnoverify / chainloader 
+1; with that copy of
grub giving a choice of kernels in Suse. I'm doing the same thing 
with the master Grub
for the CD image.

My menu.lst for the MBR Grub looks (partially) like this:

# Other bootable partition config begins
   title DOS on (/dev/hda1)
   rootnoverify (hd0,0)
   makeactive
   chainloader +1
   title SUSE on (/dev/hda5)
   rootnoverify (hd0,4)
# makeactive
   chainloader +1
   title RIPlinux on (/dev/hda6)
   rootnoverify (hd0,5)
# makeactive
   chainloader +1
# Other bootable partition config ends
# Linux bootable partition config begins
   title Linux on (/dev/hda5)
   root (hd0,4)
   kernel /boot/vmlinuz root=/dev/hda5 ro vga=normal
# Linux bootable partition config ends

Selecting the Suse option that uses the chainloader command works as 
expected. Presumably
it just jumps to the very beginning of /dev/hda5 where the other copy 
of Grub picks up and does
its thing. Now to get the RIPLinux option to do the same thing.

First attempt: Simply dd the CD onto the partition, then try to boot 
it. I got "isolinux.bin missing
or corrupt".

Next I tried map (cd) (hd0,5) and map (hd0,5) (cd) at which commands 
it choked. So I took them
out.

Then I copied the CD to a directory, changed all instances of (cd) to 
(hd0,5) in its boot/grub/menu.lst,
and made a new CD image with mkisofs, following the directions in 
boot/doc/isolinux.txt on the CD.
I dd'd that to the partition and tried booting it. Back to 
"isolinux.bin missing or corrupt".

I then processed the image with the 'isohybrid' script on the CD, 
then again dd'd it to the partition.
Same result. Also same result doing isohybrid on an unchanged iso copy.

Okay, what do I need to do to get it to find the isolinux.bin file?

BTW: I am aware that there is an "install to hard drive" option when 
the CD itself is booted. I'd
rather not use that if I can avoid it; I rather like the 'it's a 
fresh system every reboot' aspect of booting
from the CD. I just want to do it without actually using the CDROM drive.

----

- Drew.





More information about the mdlug mailing list