summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@oz.(none)>2010-05-09 08:40:56 +0200
committerroot <root@oz.(none)>2010-05-09 08:40:56 +0200
commit311126663391137547e9cffafc8e29ba2667c00e (patch)
treee7b17d36602c29625ff382abbe98cdf6f8d1ee68
parent233b397411812d7c0105fad58522f5ae396c805d (diff)
downloadminilinux-311126663391137547e9cffafc8e29ba2667c00e.tar.gz
minilinux-311126663391137547e9cffafc8e29ba2667c00e.tar.bz2
trying to upgrade to grub 2, currently broken
-rw-r--r--Makefile21
-rw-r--r--grub.cfg17
-rw-r--r--menu.lst19
3 files changed, 31 insertions, 26 deletions
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