* docs/grub.texi (Making a GRUB bootable CD-ROM): Update to describe

grub-mkrescue.
This commit is contained in:
Colin Watson 2011-01-28 17:01:28 +00:00
parent 3281d3d6d4
commit 800f188183
2 changed files with 28 additions and 25 deletions

View file

@ -1,3 +1,8 @@
2011-01-28 Colin Watson <cjwatson@ubuntu.com>
* docs/grub.texi (Making a GRUB bootable CD-ROM): Update to describe
grub-mkrescue.
2011-01-24 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkimage.c (generate_image): Refuse to create the images

View file

@ -651,15 +651,22 @@ using BIOS functions.}. This means that you can use the whole CD-ROM
from GRUB and you don't have to make a floppy or hard disk image file,
which can cause compatibility problems.
For booting from a CD-ROM, GRUB uses a special Stage 2 called
@file{stage2_eltorito}. The only GRUB files you need to have in your
bootable CD-ROM are this @file{stage2_eltorito} and optionally a config file
@file{grub.cfg}. You don't need to use @file{stage1} or @file{stage2},
because El Torito is quite different from the standard boot process.
For booting from a CD-ROM, GRUB uses a special image called
@file{cdboot.img}, which is concatenated with @file{core.img}. The
@file{core.img} used for this should be built with at least the
@samp{iso9660} and @samp{biosdisk} modules. Your bootable CD-ROM will
usually also need to include a configuration file @file{grub.cfg} and some
other GRUB modules.
Here is an example of procedures to make a bootable CD-ROM
image. First, make a top directory for the bootable image, say,
@samp{iso}:
To make a simple generic GRUB rescue CD, you can use the
@command{grub-mkrescue} program:
@example
$ @kbd{grub-mkrescue -o grub.iso}
@end example
You will often need to include other files in your image. To do this, first
make a top directory for the bootable image, say, @samp{iso}:
@example
$ @kbd{mkdir iso}
@ -671,33 +678,24 @@ Make a directory for GRUB:
$ @kbd{mkdir -p iso/boot/grub}
@end example
Copy the file @file{stage2_eltorito}:
@example
$ @kbd{cp /usr/lib/grub/i386-pc/stage2_eltorito iso/boot/grub}
@end example
If desired, make the config file @file{grub.cfg} under @file{iso/boot/grub}
(@pxref{Configuration}), and copy any files and directories for the disc to the
directory @file{iso/}.
Finally, make a ISO9660 image file like this:
Finally, make the image:
@example
$ @kbd{mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
-boot-load-size 4 -boot-info-table -o grub.iso iso}
$ @kbd{grub-mkrescue -o grub.iso iso}
@end example
This produces a file named @file{grub.iso}, which then can be burned
into a CD (or a DVD). @kbd{mkisofs} has already set up the disc to boot
from the @kbd{boot/grub/stage2_eltorito} file, so there is no need to
setup GRUB on the disc. (Note that the @kbd{-boot-load-size 4} bit is
required for compatibility with the BIOS on many older machines.)
into a CD (or a DVD), or written to a USB mass storage device.
You can use the device @samp{(cd)} to access a CD-ROM in your
config file. This is not required; GRUB automatically sets the root device
to @samp{(cd)} when booted from a CD-ROM. It is only necessary to refer to
@samp{(cd)} if you want to access other drives as well.
The root device will be set up appropriately on entering your
@file{grub.cfg} configuration file, so you can refer to file names on the CD
without needing to use an explicit device name. This makes it easier to
produce rescue images that will work on both optical drives and USB mass
storage devices.
@node Device map