[NBLUG/talk] bootable cd from iso image

Andrew argonaut at gmx.co.uk
Wed Dec 5 09:55:11 PST 2007


Glen Gunsalus wrote on Mon, 3 Dec 2007 21:19:06 -0800
(GMT-08:00):

> I have an iso image for which I don't have access to the file
> system from which it was built.  I would like to make it
> bootable.
> 
> I have used it on machines with both floppy and cd drives -
> just use a bootable floppy and then reference the cd for
> system load.

You'll need to re-master the CD, adding an image of the boot
floppy to it. I believe you can do it this way:

Before we begin, some assumptions:
* You will be doing most of this on a Linux box that has plenty
  of free space (more than twice the size of the data on the CD);
* mkisofs is installed;
* Data CDs get mounted at /media/cdrom0;
* You have access to a machine (Linux or Windows) that has a
  floppy drive.

First, copy the contents of your existing CD to your hard drive.
Place the CD in the drive, then run these commands in a terminal
("$" is the bash prompt):
$ cd               (this takes you to your home directory)
$ mkdir my_cd
$ mount /media/cdrom0
$ cp -R /media/cdrom0/* my_cd/
$ umount /media/cdrom0
Remove the CD and set it aside.

Make a new directory called "boot_floppy". This is where you
will put the image of the floppy disk that you've been using to
boot the CD.
$ mkdir my_cd/boot_floppy

Now you'll need to make an image of that boot floppy. Go to a
machine that has a floppy drive and insert the floppy disk.

If the machine runs Linux, do this:
$ dd if=/dev/fd0 of=/tmp/boot.img bs=10k count=144
(You may need to do this as root if your regular user doesn't
have permission to access the floppy device.) The image will be
deposited in the /tmp/ directory.

If the machine runs Windows, use a program called RawWrite for
Windows. You can get it at http://www.chrysocome.net/rawwrite
The "Read" tab will let you make an image of the floppy and save
it to the hard drive. Give it a name of "boot.img".

Remove the floppy disk from the drive. Set it aside. Copy or
move (by any means at your disposal) the floppy image you just
made into your my_cd/boot_floppy directory.

And make a new .iso of your CD:
$ mkisofs -r -b my_cd/boot_floppy/boot.img -c my_cd/boot_floppy/boot.catalog -o new_cd.iso my_cd/

The new .iso will be called new_cd.iso, and will be in your home
directory. Just burn it to a CD-ROM, cross your fingers and try
to boot from it.

I got a lot of information from
http://tldp.org/HOWTO/Bootdisk-HOWTO/CD-roms.html .  Credit goes
to that page's author. I recommend you read it. There is a
caveat about initial ramdisks.

Hope this helps.

A.



More information about the talk mailing list