From 311126663391137547e9cffafc8e29ba2667c00e Mon Sep 17 00:00:00 2001 From: root Date: Sun, 9 May 2010 08:40:56 +0200 Subject: trying to upgrade to grub 2, currently broken --- Makefile | 21 ++++++++++++++------- grub.cfg | 17 +++++++++++++++++ menu.lst | 19 ------------------- 3 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 grub.cfg delete mode 100644 menu.lst diff --git a/Makefile b/Makefile index 585d29c..e8568ab 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ help: .PHONY: help run all step1 step2 step3 step4 step5 mount-disk umount-disk mount-root umount-root # software versions -GRUB_VERSION=0.97 +GRUB_VERSION=1.97.2 KERNEL_VERSION=2.6.33.3 UCLIBC_VERSION=0.9.31 BUSYBOX_VERSION=1.16.1 @@ -113,9 +113,8 @@ grub: mkdir grub-build && cd grub-build && ../grub-$(GRUB_VERSION)/configure --prefix=`pwd` cd grub-build && make $(PARALLEL) cd grub-build && make install - cp grub-build/lib/grub/i386-pc/stage1 target/boot/grub - cp grub-build/lib/grub/i386-pc/stage2 target/boot/grub - cp menu.lst target/boot/grub + cp grub-build/boot.img target/boot/grub/ + cp grub.cfg target/boot/grub grub-loader: -umount target @@ -124,12 +123,20 @@ grub-loader: -/sbin/losetup -d /dev/loop0 -/sbin/losetup -d /dev/loop1 /sbin/losetup -o 512 /dev/loop1 minilinux.img - ln -s /dev/loop1 /dev/loop01 + mount /dev/loop1 target + ln -s /dev/loop1 /dev/loop0p1 /sbin/losetup /dev/loop0 minilinux.img - grub-build/sbin/grub --batch --no-floppy --device-map=devices.map < grub.install + grub-build/bin/grub-mkimage -o core.img -v + cp core.img /boot/grub + cp core.img target/boot/grub + grub-build/sbin/grub-setup -v \ + -b ../../`pwd`/grub-build/boot.img \ + -r '(hd0,1)' -m devices.map '(hd0)' --force + umount target /sbin/losetup -d /dev/loop0 /sbin/losetup -d /dev/loop1 - rm /dev/loop01 + rm -f /dev/loop0p1 + rm -f /boot/grub/core.img /sbin/losetup -o 512 /dev/loop0 minilinux.img mount /dev/loop0 target diff --git a/grub.cfg b/grub.cfg new file mode 100644 index 0000000..94c37ca --- /dev/null +++ b/grub.cfg @@ -0,0 +1,17 @@ +# GRUB2 config file + +# boot fast, nobody has to edit boot options here! +#set timeout=0 +set timeout=5 + +# by default, boot first entry +set default=0 + +# hide menu per default +#hiddenmenu + +# boot minilinux +menuentry "Minilinux" { + set root=(hd0,1) + linux /boot/bzImage-2.6.33.3 root=/dev/hda1 +} diff --git a/menu.lst b/menu.lst deleted file mode 100644 index dc09cef..0000000 --- a/menu.lst +++ /dev/null @@ -1,19 +0,0 @@ -# GRUB boot file -################ - -# nicer colours -color light-gray/blue black/light-gray - -# by default, boot first entry -default 0 - -# hide menu per default -hiddenmenu - -# boot fast, nobody has to edit boot options here! -timeout 0 - -# boot minilinux -title minilinux -root (hd0,0) -kernel /boot/bzImage-2.6.33.2 root=/dev/hda1 -- cgit v1.2.3-54-g00ecf