From 2a7e213e07a262ccc7e0e86bfe9b9ba3ea00fc17 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 28 Dec 2005 19:32:15 +0000 Subject: [PATCH] Clifford Wolf: Updated grub (1.92) Some fixes for new grub [2005122820315205202] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@6943 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/x86/grub/grub.desc | 4 ++-- package/x86/grub/stone_mod_grub.sh | 28 +++++++++++++++++----------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/package/x86/grub/grub.desc b/package/x86/grub/grub.desc index 4dda03171..555a8cd1f 100644 --- a/package/x86/grub/grub.desc +++ b/package/x86/grub/grub.desc @@ -46,8 +46,8 @@ [L] GPL [S] Stable -[V] 1.91 +[V] 1.92 [P] X -?---5---9 203.900 -[D] 1863347191 grub-1.91.tar.gz ftp://alpha.gnu.org/gnu/grub/ +[D] 762183376 grub-1.92.tar.gz ftp://alpha.gnu.org/gnu/grub/ diff --git a/package/x86/grub/stone_mod_grub.sh b/package/x86/grub/stone_mod_grub.sh index 1e11de0c2..7744dc4e1 100644 --- a/package/x86/grub/stone_mod_grub.sh +++ b/package/x86/grub/stone_mod_grub.sh @@ -24,8 +24,9 @@ create_device_map() { gui_cmd '(Re-)Create GRUB Device Map' "$( cat << "EOT" -rm -vf /boot/grub/device.map -echo quit | grub --batch --device-map=/boot/grub/device.map +( set -x +rm -f /boot/grub/device.map +grub-mkdevicemap --no-floppy; ) EOT )" } @@ -91,30 +92,35 @@ convert_device () { } create_boot_menu() { - cat << EOT > /boot/grub/menu.lst + cat << EOT > /boot/grub/grub.cfg timeout 8 default 0 fallback 1 title ROCK Linux -kernel $bootdrive$bootpath/vmlinuz root=$rootdev ro +linux $bootdrive$bootpath/vmlinuz root=$rootdev ro initrd $bootdrive$bootpath/initrd.img EOT if [ -f /boot/memtest86.bin ] ; then - cat << EOT >> /boot/grub/menu.lst + cat << EOT >> /boot/grub/grub.cfg title MemTest86 (SGI memory tester) -kernel $bootdrive$bootpath/memtest86.bin +linux $bootdrive$bootpath/memtest86.bin EOT fi - gui_message "This is the new /boot/grub/menu.lst file: + gui_message "This is the new /boot/grub/grub.cfg file: -$( cat /boot/grub/menu.lst )" +$( cat /boot/grub/grub.cfg )" } grub_install() { - gui_cmd 'Installing GRUB' "echo -e 'root $bootdrive\\nsetup (hd0)\\nquit' | grub --batch --device-map=/boot/grub/device.map" + gui_cmd 'Installing GRUB' "$( cat << "EOT" +( set -x +grub-mkimage -o /boot/grub/core.img _chain pc ext2 +grub-setup -r $bootdrive '(hd0)'; ) +EOT + )" } grub_init() { @@ -185,8 +191,8 @@ main() { '' '' \ "Edit /boot/grub/device.map (Device Map)" \ "gui_edit 'GRUB Device Map' /boot/grub/device.map" \ - "Edit /boot/grub/menu.lst (Boot Menu)" \ - "gui_edit 'GRUB Boot Menu' /boot/grub/menu.lst" + "Edit /boot/grub/grub.cfg (Boot Menu)" \ + "gui_edit 'GRUB Boot Menu' /boot/grub/grub.cfg" do : ; done }