[PATCH] use GRUB to boot Debian-Installer CD
Hi,
This patch makes it possible to use GRUB to boot the Debian-Installer CD.
Current grub-pc package in unstable will suffice. I've put a temporary
build here for those who want to try it:
http://people.debian.org/~rmh/mini.iso
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
Index: boot/kfreebsd/grub.cfg
===================================================================
--- boot/kfreebsd/grub.cfg (revision 0)
+++ boot/kfreebsd/grub.cfg (revision 0)
@@ -0,0 +1,17 @@
+
+set cd=$root
+
+menuentry "Install Debian GNU/kFreeBSD" {
+ echo "Loading ..."
+ set root=$cd
+ freebsd /boot/kernel/kernel.gz
+ freebsd_module_elf /boot/kernel/acpi.ko
+ freebsd_module /boot/mfsroot.gz type=mfs_root
+ set FreeBSD.vfs.root.mountfrom=ufs:/dev/md0c
+ set FreeBSD.hw.ata.atapi_dma=0
+}
+
+menuentry "Boot from first hard disk" {
+ set root=hd0
+ chainloader +1
+}
Index: config/kfreebsd-i386.cfg
===================================================================
--- config/kfreebsd-i386.cfg (revision 59936)
+++ config/kfreebsd-i386.cfg (working copy)
@@ -12,6 +12,7 @@
INITRD_FS = ufs2
LSB_DISTRIB_DESCRIPTION="Debian GNU/kFreeBSD installer"
+grub_moddir=/usr/lib/grub/i386-pc
arch_boot_screens:
arch_tree:
@@ -21,20 +22,25 @@
.PHONY: arch_miniiso
arch_miniiso: $(TEMP_INITRD) $(TEMP_KERNEL) $(TREE)
-rm -f $(TEMP_CD_TREE)/*
- mkdir -p $(TEMP_CD_TREE)/boot/{kernel,defaults}
+ mkdir -p $(TEMP_CD_TREE)/boot/{kernel,defaults,grub}
cp $(TEMP_KERNEL) $(TEMP_CD_TREE)/boot/kernel/kernel.gz
- cp $(TEMP_INITRD) $(TEMP_CD_TREE)/boot/mfsroot.gz
+ cp $(TEMP_INITRD) $(TEMP_CD_TREE)/boot/mfsroot.gz
cp $(TREE)/lib/modules/*/acpi.ko $(TEMP_CD_TREE)/boot/kernel/
- cp /boot/{cdboot,loader*,*.4th} $(TEMP_CD_TREE)/boot/
- cp /boot/defaults/loader.conf $(TEMP_CD_TREE)/boot/defaults/
- echo "hw.ata.atapi_dma=0" >> $(TEMP_CD_TREE)/boot/loader.conf # TODO: 1
- echo "mfsroot_load=\"YES\"" >> $(TEMP_CD_TREE)/boot/loader.conf
- echo "mfsroot_type=\"mfs_root\"" >> $(TEMP_CD_TREE)/boot/loader.conf
- echo "mfsroot_name=\"/boot/mfsroot\"" >> $(TEMP_CD_TREE)/boot/loader.conf
+ cp boot/kfreebsd/grub.cfg $(TEMP_CD_TREE)/boot/grub/
- genisoimage -r -J -b boot/cdboot -c boot.cat -no-emul-boot \
+ grub-mkimage -o $(TEMP_CD_TREE)/boot/grub/core.img \
+ biosdisk \
+ minicmd normal sh echo \
+ iso9660 \
+ bsd chain \
+ $(NULL)
+ cat $(grub_moddir)/cdboot.img $(TEMP_CD_TREE)/boot/grub/core.img \
+ > $(TEMP_CD_TREE)/boot/grub/grub_eltorito
+
+ genisoimage -r -J -b boot/grub/grub_eltorito -c boot.cat -no-emul-boot \
+ -boot-load-size 4 -boot-info-table \
-o $(TEMP_MINIISO) $(TEMP_CD_TREE)
Reply to: