1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377
|
<!--startcut ==============================================-->
<!-- *** BEGIN HTML header *** -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD>
<title>Making a Multiple-Boot CD LG #85</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000">
<!-- *** END HTML header *** -->
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="sandeep.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue85/sipos.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../lg_faq.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="vinayak.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
<!--endcut ============================================================-->
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD WIDTH="380">
<CENTER>
<BIG><BIG><STRONG><FONT COLOR="maroon">Making a Multiple-Boot CD</FONT></STRONG></BIG></BIG>
<BR>
<STRONG>By <A HREF="../authors/sipos.html">Juraj Sipos</A></STRONG>
</CENTER>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
<p>I noticed that the issue of making a multiboot CD is not very much covered
on the Internet, and if so, only sparsely. Commercial Windows vendors include
some possibility to create bootable CD's in their software, but I haven't
yet seen an option to create a multiboot CD in their packages. For me creating
a bootable CD in Linux is much easier than in Windows. There are also many
free utilities that help you create a Linux bootable CD, but having a multiple
boot CD is a delicacy. You can have several versions of Linux boot images
on the CD - versions with support for journaling file systems, repair utilities,
various breeds of Linux or BSD, or even QNX, Plan9 and more. </p>
<p>Why do I thing this may be good for you? Imagine you use Linux and FreeBSD
simultaneously, you have more Linux distributions installed on your hard
disk, but something happened to your system - there is no way to access the
data anymore. Either you use a bootable diskette (but there may be many obstacles
if you work with a specific system like XFS journaling file system, for example,
or encrypted files system, and you find that you must have at least 5 Linux
bootable diskettes to suit you), or you create a multiboot CD on which you
put various breeds of Linux kernels and utilities. A little CD with 10 operating
systems on it is redemption from the illusion of this world that makes you
believe that something is always wrong.</p>
<p>I want this article to be easy, practical and intelligible for beginners,
too, and I'd like to avoid too technical language that is not understood
by many of us. This will help attract readers of various sort.</p>
<p>A bootable CD is based upon the so-called El Torrito standard - but there
are other sites that explain this. Visit, for example, <u><font size="2"
color="#0000ff">http://www.cdpage.com/Compact_Disc_Variations/danaboot.html</font></u></p>
<p>An important information for us will be that we may have up to 10 bootable
operating systems on a CD that we may boot anywhere where the boot ability
is supported by BIOS. The bootable ISO image file may be created with 1.44MB
diskette emulation, 2.88MB diskette emulation, or hard disk emulation.</p>
<b>
<p>Now follows the practical guide on how to prepare a multiboot CD</p>
</b>
<p>First, you must have a bootable DOS or Linux diskette image file. An image
is a file that contains the contents of a disk or diskette. There may be
many types of image files - if you dd (disk dump) your Linux partition with
a command (let's suppose that your Linux partition is on the /dev/hda1 partition):<b>
<p>dd if=/dev/hda1 of=/my_image.file</p>
</b></p>
<p>a file <b>my_image.file</b> will appear in your file system. Not every
image file is bootable - it depends on its contents, so a good idea would
be to prepare some Linux or BSD diskette image files. The simplest way would
be to download such image files from the Internet. Here is the link:</p>
<u><font size="2" color="#0000ff">
<p>http://www.ibiblio.org/pub/Linux/system/recovery/</p>
</font></u>
<p>The Ibiblio archive is very good. The image files you may download from
the above URL are prepared in such a way that they are bootable, so you don't
need to care much about building your own image. However, if you want to
make your own image, at the above URL you may also find some utilities like
Bootkit, CatRescue, SAR, disc-recovery-utils, etc., which will help you create
your own bootable diskettes (or bootable image files). </p>
<p>The files we will need for our work, in order to make a multiboot CD,
are fbsd-flp-1.0.3.bin (a bootable FreeBSD 2.8 MB diskette image), tomsrtbt,
or you may create your own images from the diskettes you already have. Put
your DOS or Linux diskette in the diskette drive and type the following command:</p>
<b>
<p>dd if=/dev/fd0 of=boot.img bs=512 count=2880<br>
</p>
</b><b> </b>
<p>A good idea would also be to visit <u><font size="2" color="#0000ff">http://freshmeat.net</font></u>
and search for a keyword "mini", so you will find even some esoteric mini
Linux distributions you normally don't hear about. </p>
<p>The site <u><font size="2" color="#0000ff">http://www.ibiblio.org/pub/Linux/system/recovery/</font></u>
contains (I deleted some stuff):</p>
<UL>
<LI>Bootkit-1.01.tar.gz
<LI>CatRescue101E.tgz
<LI>SAR-2.25.tar.gz
<LI>banshee-linux.0.61.tar.bz2
<LI>brd-2.0.tar.gz
<LI>disc-recovery-utils-1.0.tgz
<LI>fbsd-iso-1.0.3.bin.gz
<LI>fspace.tgz
<LI>genromfs-0.5.1.tar.gz
<LI>mulinux-5r0.lsm
<LI>mulinux-5r0.tgz
<LI>picoboot-0.95.tar.gz
<LI>rescue02.zip
<LI>resque_disk-2.3.99-pre9-A.tgz
<LI>rip-10.exe
<LI>rip-51.iso.bin
<LI>sash.tar.z
<LI>tomsrtbt-2.0.103.ElTorito.288.img.bz2
<LI>tomsrtbt-2.0.103.dos.zip
<LI>trccs-0.8.1r2.iso.bz2
<LI>trccs-0.8.1r2.tar.bz2
<LI>trccs-0.8.1r2_boot_disk.img.bz2
<LI>yard-2.1.tar.gz
<LI>yard-prefabs-2.tgz
<LI>zdisk-2.14.tar.gz
</UL>
<p>Some other good sites where you can download bootable diskette images:</p>
</b>
<p>LIAP (<u><font size="2" color="#0000ff">http://www.liap.eu.org/</font></u>):
LIAP is a Linux in a Pill - the site contains many 1.44MB diskette images
with various utilities and kernel breeds suitable for recovery of various
types of disasters.</p>
<p> </p>
<p>LEKA RESCUE FLOPPY (<u><font size="2" color="#0000ff">http://leka.muumilaakso.org/</font></u>):
Leka Rescue Floppy is a small 1.44Mb distribution. </p>
<p>TOMSRTBT (<u><font size="2" color="#0000ff">http://www.toms.net/rb/</font></u>):
Tomsrtbt (Tom's Root Boot) is a rescue utility, a very good one. You may also
download the 2.88MB image file from the above site.</p>
<p>You can also download bootable DOS images. Visit, for example, <u><font
size="2" color="#0000ff">http://www.bootdisk.com</font></u> and download
DOS images if you do not have them available. The site contains DOS 5.00
to 6.22, Win 95/98/Me Bootdisks, DOS/Windows 9X/2000/XP bootdisks, Win 95/98/ME
- NT4/NT5 bootdisks, DrDOS 7.X disk for Bios Flashing Basic, etc. You may
also create a FreeDOS boot diskette.</p>
<p>First, some terms. Let's see a difference between a bootable image file
of a diskette or disk and an ISO image file to be burned on a CD. What we
must have are bootable diskette image files from which we will create one
ISO image file. </p>
<p>1) You may prepare your bootable diskette images from diskettes you already
have with the command:
<p><b>dd if=/dev/fd0 of=/my_image.img</b></p>
or you may
download some bootable diskette image files from the Internet (see the links).
Make a directory in your Linux box, for example - /CD, and copy the images
to this directory (remember, you may have not more than ten bootable images).
Make sure you keep the 8.3 format for file names - 8 characters for the file
name and 3 characters for its suffix - this maximum is only for the compatibility
issue with the DOS makebt.exe program we will later use).</p>
<p>2) If you want to make use of the space on the CD (ten images of bootable
diskettes would only require about 14MB), place some other utilities in a
subdirectory, for example, /CD/Soft. An information how to access the CD
is included at the bottom of this article.</p>
<p>3) Run the following command from the /CD directory:</p>
<p> <b>mkisofs -b image.img -c boot.cat -J -l -R -r -o /cd.iso /CD</b></p>
<p> The "boot.cat" or "boot.catalog" file will be automatically created,
so you don't have to have it in your /CD directory - just type the command
as you see it - you can type the name of any image file, as long as its name
corresponds with the names of image files placed in the /CD directory. The
image file included in the above command will be the one you will boot your
CD from. The image files must have the size of 1.44MB or 2.8MB.</p>
<p>4) A cd.iso file will be created in your / directory (/cd.iso). When you
check this file and mount it (mount /cd.iso /mnt -o loop), the contents of
the ISO file should be seen in the directory where you mounted it. This ISO
image, if we burn the CD with it, will be bootable but only one image to
boot from will be available. </p>
<p>5) So we must edit the ISO image to make a multiple boot CD, thus we will
get other images to be included in the menu (0, 1, 2, 3, etc.) we will see
when we boot the CD (we will be welcomed by a multiple boot menu with options
for 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. By pressing the chosen number we will
boot the desirable operating system.</p>
<p>6) After editing it, we may now burn the CD.</p>
<p>Since I don't have the time and effort to create a Perl script that would
edit the ISO image for me and because the editing of the ISO image file may
appear complicated for some (I want this article to be as simple as possible),
it would be a good idea to use some free programs available on the Internet.
One of such free programs is makebt.exe. Some time ago, I found this free
program on some sites, but now I was unlucky to find it on the net, so I
put it on my website <u><font size="2" color="#0000ff"> http://www.tankred.sk/~juro/freebsd/makebt.zip</font></u>
where you can download it from. </p>
<p>You may run makebt.exe in DOSEMU, BOCHS emulator (<u><font size="2"
color="#0000ff">http://bochs.sourceforge.net</font></u>), or you can download
DOS system diskette images available at <u><font size="2"
color="#0000ff">http://www.bootdisk.com</font></u>, or make a FreeDOS bootable
diskette and boot your PC with it in order to run the makebt.exe utility.
If you don't have a DOS partition, the best idea would be to use DOSEMU emulator
- DOSEMU can also access Linux partitions, where you may have your CD.ISO
file waiting to be "grasped in your clever hands".</p>
<p>When you run MAKEBT.EXE at the DOS prompt, it will ask for the full path
and filename of the ISO file to be modified: you will type the name of the
ISO file with multiple boot diskette images in it, for example, CD.ISO, and
you will see the following screen:</p>
<p>-------------------------------------------------------------------------------------------------------</p>
<p>Make Multiple Boot CD-ISO Image Modifier ver 1.02</p>
<p>ISO File path and name: cd.iso</p>
<p> Bootable Disk Image Boot media type Default LBA</p>
<p> ------------------- --------------- ------- --------</p>
<p>BC ) BOOT.CAT</p>
<p> 1 ) FBSD.IMG 1.44M Floppy
Y</p>
<p> 2 ) LINUX.IMG 2.88M Floppy
-</p>
<p> 3 ) PLAN9.IMG 1.44M Floppy
-</p>
<p> 4 ) QNX.IMG 1.44M Floppy
-</p>
<p> 5 ) OPENBSD.IMG 2.88M Floppy -</p>
<p> 6 )</p>
<p> 7 )</p>
<p> 8 )</p>
<p> 9 )</p>
<p> 10 )</p>
<p><TAB> = move between fields, up/down arrows = move between rows,
F1 = Confirm</p>
<p>Press 'y' key to make this image as default boot</p>
<p> ------------------------------------------------------------------------------------------------------</p>
<p>BC stands for Boot Catalog. You just write boot.cat and don't worry about
it anymore, as you already used this string in the above mkisofs command
(it is, however, important that the ISO image file contains the string "boot.cat"
in it). Now you carefully type the names of the images. You have to type
the name of images in the DOS 8.3 format (this is a DOS restriction for file
names - the file may have only 8 characters and suffix 3 characters maximum).
</p>
<p>In the middle of the screen you will choose from 1.44MB floppy emulation,
2.88MB floppy emulation, hard disk emulation, or no emulation. We will only
use 1.44MB and 2.88MB emulation (if you want to make a hard disk emulation,
make a 650MB Linux partition and copy there the filesystem of your Linux
system you booted your hard disk from - experiment...) Use the right keyboard
arrow to select between the types of emulation. On the right of the screen
you have to choose one bootable image as the default one by pressing "Y".
</p>
<p>When you are finished, press F1 (you may try this several times, as the
program may not respond everytime). The program is intelligent - if you
typed the image file name incorrectly, you will receive a warning message
(after pressing F1). Do not include any descriptions for boot images in the
menu that follows after pressing F1, as this feature is mostly exploitable
in SCSI CD-ROMs and I haven't studied it very much. </p>
<p>That's it. Now you may burn your CD.</p>
<b>
<p>cdrecord -v speed=8 dev=0,0,0 /cd.iso </p>
</b>
<p>When you boot the CD, you will not see descriptions for operating systems,
only numbers. The first and the second number will (0,1) usually stand for
the same operating system. I had not much time to experiment with this issue,
but a good idea would be to write down the number, so that you know which
operating system you are going to boot from. </p>
<p>We deal here with diskette images and emulation, so if you boot your images
with the multiple boot CD you just created, you may access your CD-ROM by
typing "mount /dev/hdc /mnt", for example, and have also access to your /Soft
directory, where you may have other utilities you plan to work with later.
In case of a DOS system disk, you should include drivers to access the CD-ROM.</p>
<p>If you want to study or make a Linux program to patch the ISO file, you
can compare an ordinary ISO image file with one boot possibility only with
the ISO file patched by the makebt.exe utility. A good binary patcher is
a diff utility by Giuliano Pochini. Bdiff is a simple and small program for
making what the very common utilities "diff" and "patch" do with text files,
but also works with binary files. It may be downloaded from: <a
href="http://space.virgilio.it/g_pochini@virgilio.it/"><font size="2">http://space.virgilio.it/g_pochini@virgilio.it/</font></a>
- however, both ISO files must be identical. The diff utility (for comparing
files) will show you the place (offsets) where the information with a multiboot
flag was written. It is sector 17 (Boot Volume Descriptor) and the Boot Catalog
Sector. </p>
<p>I created many multiboot CD's with the above information and I have never
experienced a problem. But first, in order to avoid writing unusable CD-Rs -
I had some problems making my own OS/2 images - burn the ISO image on rewritable
CD-RW disks. Enjoy!</p>
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
Copyright © 2002, Juraj Sipos.
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 85 of <i>Linux Gazette</i>, December 2002
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<!--startcut ==========================================================-->
<CENTER>
<!-- *** BEGIN navbar *** -->
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="sandeep.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue85/sipos.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../lg_faq.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="vinayak.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
<!-- *** END navbar *** -->
</CENTER>
</BODY></HTML>
<!--endcut ============================================================-->
|