svlug-making_bootable_cdroms

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Date: Thu, 21 Feb 2002 16:54:40 -0800
From: Lutz Birkhahn <lbirkhahn@adomo.com>
To: "Justin F. Knotzke" <shampoo@cam.org>,
Subject: Re: [svlug] mkisofs

Justin F. Knotzke wrote:
> 	I have an bootable floppy image that I dd'd off a floppy and onto
> a HD and I want to burn a CD that allows me to boot that image.
>
> 	I used:
>
>  mkisofs -r -b boot.img -c boot.catalog -o bootcd.iso .
>
> 	This of course creates an iso image that you can burn onto a CD.
>
> 	Fine, no problem.
>
> 	But it emulates a floppy drive boot. The problem I have (and the
> reason I need to boot off a CD) is I have no floppy drive. As a result
> the machine without a floppy won't boot my CD (it does with a machine
> that has a floppy drive).
>
> 	I've tried the -no-emul-boot option which didn't much help..
>
> 	Anyone know if there is a way that I can get my image to boot?

it's been a long time that I did a bootable CD, but this is an excerpt of
the script that I used to create all the boot CD-ROMs that I use at work:

  MOUNTDIR=/mnt/floppy
  # Format the floppy
  /sbin/mke2fs -q -m 0 -i 2000 /dev/fd0
  # Mount the floppy
  mount /dev/fd0 $MOUNTDIR

  [ create all the necessary files on boot floppy, especially: ]

  # Create lilo.conf
  cat > $MOUNTDIR/etc/lilo.conf <<EOF
  boot    = /dev/fd0
  install = /boot/boot.b
  map     = /boot/map
  backup  = /dev/null
  compact
  timeout = 30
  prompt
  default=linux
 
  image=/boot/vmlinuz
        label=linux
        root=/dev/hdc
        ramdisk=35000
  EOF
  chmod 644 $MOUNTDIR/etc/lilo.conf

  # Create devices
  cp -R /dev/{null,fd0,hdc} $MOUNTDIR/dev
 
  # Copy boot.b
  cp /boot/boot.b $MOUNTDIR/boot

  # Execute lilo to make the changes take effect
  /sbin/lilo -v -C etc/lilo.conf -r $MOUNTDIR
 
  # Set rdev
  /usr/sbin/rdev -r /dev/fd0 0
 
  # Unmount and clean up
  umount $MOUNTDIR
 
  # Make image of the floopy for the cdrom
  dd if=/dev/fd0 of=boot.img bs=1k

This was with Red Hat 6.2, but I don't think too much should have to be
changed for Red Hat 7.x (or other Linuxes??) ... I had to insert a floppy
disk in the machine where I create the boot CD, but I do not have a floppy
drive on the system that *uses* the boot CD, either. Actually I've turned
off floppy support in BIOS, not that I think it matters...

Hope this helps, otherwise let me know. Some more details of your environ-
ment would be nice in that case. The mkisofs command looks OK to me, it is
pretty much the same thing that I usually use.


===



the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu