- You will need a package named
grub-pc-bin
and another one named xorriso
.
sudo apt-get update
sudo apt-get install grub-pc-bin xorriso
mkdir ~/cdrom
mkdir ~/cdrom/boot
mkdir ~/cdrom/boot/grub
nano ~/cdrom/boot/grub/grub.cfg
- Here's an example of a
grub.cfg
file that boots the first hard disk:
set timeout=10
set default=0
menuentry "Boot from Hard Drive" {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
chainloader +1
}
- You will need to use
grub-mkrescue
to create an ISO file that can be burned to a CD.
grub-mkrescue -o bootable.iso ~/cdrom
- You can use a tool like
Brasero
or k3b
to burn the ISO file to a CD. If you prefer to use the command line, you can use cdrecord
(you might need to install it first with sudo apt-get install cdrecord
):
sudo cdrecord -v speed=4 bootable.iso
- Boot from CD.