View Source:
MakeBootableCds
!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|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). 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
Please enable JavaScript to view the
comments powered by Disqus.
HollenbackDotNet
Home Page
Popular Pages
All Categories
Main Categories
General Interest
Geek Stuff
DevOps
Linux Stuff
Pictures
Search
Toolbox
RecentChanges
RecentNewPages
What links here
Printable version
AllPages
RecentChanges
Recent Changes Cached
No changes found
Favorite Categories
ActionPage
(150)
WikiPlugin
(149)
GeekStuff
(137)
PhpWikiAdministration
(102)
Help/PageList
(75)
Help/MagicPhpWikiURLs
(75)
Blog
(69)
Pictures
(60)
GeneralInterest
(44)
LinuxStuff
(38)
Views
View Page
View Source
History
Diff
Sign In