Diff: MakeBootableCds

Differences between current version and predecessor to the previous major change of MakeBootableCds.

Other diffs: Previous Revision, Previous Author

Newer page: version 4 Last edited on March 1, 2012 11:09 pm by PhilHollenback
Older page: version 2 Last edited on March 10, 2002 2:22 pm by 165.247.47.93 Revert
@@ -9,17 +9,25 @@
 !!Steps 
  
 * Make a bootable floppy. For example, format a floppy with system files on a DOS system. You could create a single-disk linux floppy, too (maybe [muLinux|http://mulinux.nevalabs.org]). 
 * Put that floppy in the drive on your linux system and turn it into an image file. 
+<pre>  
  dd if=/dev/fd0 of=floppy.img bs=18k 
+</pre>  
 * Create a directory to hold your cd filesystem. Put your floppy image in that directory. 
+<pre>  
  mkdir /tmp/cdimage 
  cp floppy.img /tmp/cdimage 
+</pre>  
 * Place any other files you want on the CD in that directory too. 
 * Turn the directory in to an iso9660 filesystem image 
+<pre>  
  mkisofs -J -r -b floppy.img /tmp/cdimage -o /tmp/cdimage.iso 
+</pre>  
 * Burn a CD containing the new image 
+<pre>  
  cdrecord -v /tmp/cdimage.iso -d 0,0,0 
+</pre>  
  
 !!Discussion 
  
 Bootable CDs are an ugly hack. What really happens is that the BIOS makes a file on the CD look like a floppy disk and causes the system to boot from that floppy. After the system boots, the floppy gets magically removed and you go back to having just a CD-ROM drive. Thus, you have to go through contortions to create that floppy, and you are limited to 1.44MB of data (actually you can probably do 2.88MB too, if you can find a 2.88 drive to create the initial image). 
@@ -27,17 +35,23 @@
 Note that you won't be able to access anything else on the CD unless your floppy boot image makes the CD-ROM drive available (i.e. loads the right drivers) 
  
 Note that you have to have your system set up right to burn CDs. In particular, you need SCSI support (because CD burners act like scsi devices). You need some /etc/modules.conf entries like this: 
  
+<pre>  
  options ide-cd ignore='hdc hde' 
  alias scd0 sr_mod 
  alias scd1 sr_mod 
  pre-install sg modprobe ide-scsi 
  pre-install sr_mod modprobe ide-scsi 
  pre-install ide-scsi modprobe ide-cd 
  post-install scsi_mod modprobe ide-scsi 
+</pre>  
  
 These entries make the ide-cd driver ignore your cdrom drive, and instead load the scsi drivers. This means you have to access your cdrom drives as /dev/scd0, /dev/scd1, etc. 
  
 If you want to be clever, you can feed the output of mkisofs directly to cdrecord and skip the intermediary cd image file on disk. 
  
 --phil 5/11/01 
+  
+CategoryGeekStuff  
+  
+CategoryLinuxStuff  

current version

Create Bootable CDs Under Linux

Software Needed

  • cdrtools-cdrecord
  • cdrtools-mkisofs
  • dd

Steps

  • Make a bootable floppy. For example, format a floppy with system files on a DOS system. You could create a single-disk linux floppy, too (maybe muLinux).
  • Put that floppy in the drive on your linux system and turn it into an image file.
  dd if=/dev/fd0 of=floppy.img bs=18k
  • Create a directory to hold your cd filesystem. Put your floppy image in that directory.
  mkdir /tmp/cdimage
  cp floppy.img /tmp/cdimage
  • Place any other files you want on the CD in that directory too.
  • Turn the directory in to an iso9660 filesystem image
  mkisofs -J -r -b floppy.img /tmp/cdimage -o /tmp/cdimage.iso
  • Burn a CD containing the new image
  cdrecord -v /tmp/cdimage.iso -d 0,0,0

Discussion

Bootable CDs are an ugly hack. What really happens is that the BIOS makes a file on the CD look like a floppy disk and causes the system to boot from that floppy. After the system boots, the floppy gets magically removed and you go back to having just a CD-ROM drive. Thus, you have to go through contortions to create that floppy, and you are limited to 1.44MB of data (actually you can probably do 2.88MB too, if you can find a 2.88 drive to create the initial image).

Note that you won't be able to access anything else on the CD unless your floppy boot image makes the CD-ROM drive available (i.e. loads the right drivers)

Note that you have to have your system set up right to burn CDs. In particular, you need SCSI support (because CD burners act like scsi devices). You need some /etc/modules.conf entries like this:

  options ide-cd ignore='hdc hde'
  alias scd0 sr_mod
  alias scd1 sr_mod
  pre-install sg     modprobe ide-scsi
  pre-install sr_mod modprobe ide-scsi
  pre-install ide-scsi modprobe ide-cd
  post-install scsi_mod modprobe ide-scsi

These entries make the ide-cd driver ignore your cdrom drive, and instead load the scsi drivers. This means you have to access your cdrom drives as /dev/scd0, /dev/scd1, etc.

If you want to be clever, you can feed the output of mkisofs directly to cdrecord and skip the intermediary cd image file on disk.

--phil 5/11/01

CategoryGeekStuff

CategoryLinuxStuff



Our Founder
ToolboxClick to hide/show