Making bootable CDs (was: Re: [plug] Raid rescue)

Cameron Patrick cameron at patrick.wattle.id.au
Wed Jan 7 12:37:30 WST 2004


Adam Hewitt wrote:

| I can get the kernel image from a non-raid partition, but how can I go 
| about making a boot *cd* and get it to use my kernel image? this server 
| doesn't have a floppy drive and if I am going to go to this effort I 
| may as well do it properly and make a CD so I can quickly fix issues 
| such as this in the future.

First, you'll need a GRUB boot floppy image.  You can find one in the
Debian grub-disk package.  Ungzip it somewhere, mount it as loopback,
and copy your kernel image into it.  If you want you can set up a
Grub menu.lst file; otherwise you'll have to specify the kernel image
name and parameters on the Grub command line when you boots.  Once
you've got the floppy image set up, test it on a machine with a floppy
drive and make sure it comes up with a 'grub>' prompt (or your menu, if
you set one up).

You can make that into an ISO image by using mkisofs.  e.g.:

	mkisofs -r -b boot_floppy.img -o ../grub_boot_cd.iso .

There are other mkisofs options that you might want to use but I /think/
that's all you'll need to get a bootable CD.  Then you can burn that
with cdrecord as per usual, and with any luck you should have a working
rescue CD.

This method works in general for making a bootable CD given a bootable
floppy.  You can even use a 2.88M floppy image, e.g. if your kernel is
too big to fit on a 1.44M floppy[1].  Of course, that has the
disadvantage that you can't test it without blowing a CD-R.

Cameron.

[1] This will become increasingly common with 2.6, I suspect.




More information about the plug mailing list