Reinhard Moosauer IT Beratung

How to make a 2.88Meg Boot-CD with GRUB

There is a description from Mohamed Kamil Nizam Mansor on 08-July-2002. Find it here: http://linux-sxs.org/grubcdboot.html

This document is an updated version with some enhancements:
It shows how to create a bootable CD with GRUB. It uses a 2.88Meg image, because kernel and initrd will not fit into a 1.44meg image.

1. create an image file using dd with size 2.88Mb

# dd if=/dev/zero of=/tmp/cdboot.288 bs=1k count=2880

2. get associate with loop device (my case, I using /dev/loop1)

# losetup /dev/loop1 /tmp/cdboot.288

3. create msdos file system

# mkfs -V -t msdos /dev/loop1

4. mount the image file (I use /mnt as mountpoint)

# mount /dev/loop1 /mnt

5. Copy grub's files into the image

# mkdir /mnt/boot
# mkdir /mnt/boot/grub
# cd /boot/grub
# cp stage1 stage2 splash.xpm.gz menu.lst /mnt/boot/grub

6. Copy kernel and initrd into the image (add more files as needed)

# cd /boot
# cp vmlinuz initrd /mnt/boot/

7. Edit the menu-file, insert something like:
title Linux from CD
kernel (fd0)/boot/vmlinuz
initrd (fd0)/boot/initrd

# vi /mnt/boot/grub/menu.lst
# umount /mnt

8. Install grub in the image (umount /mnt first!)

# grub (Start the grub shell, then enter:)
device (fd0) /dev/loop1
root (fd0)
setup (fd0)
quit

9. Don't forget to divorce the loop-Device:

# losetup -d /dev/loop1

9. Write the image to a CD, for example with mkisofs & cdrecord: (have to insert the correct dev=?,?,? with cdrecord)

# mkdir /tmp/mycd
# cp /tmp/cdboot.288 /tmp/mycd
# mkisofs -b cdboot.288 -c boot.catalog -J /tmp/mycd | cdrecord speed=8 dev=0,0,0


I will be grateful for any feedback to this article. Email: rm@moosauer.de


Letzter Update: Tue Jul 01 14:24:24 CEST 2003


News
NetMeeting over
Linux Firewall

Special NAT software
for Linux
www.m1b.de

x509, Zertifikate, CA
Kostenlose
Zertifikatsverwaltung
www.m1b.de

VPN for Linux
Die neueste Version
mit allen Patches
www.m1b.de

Home
Kontakt
Leistungen
Schlagworte
Testlabor
Know-How
Open Source
Links
Vorlesungen