Working multiboot configuration
Marty Felkler
martyfelker at gmail.com
Thu Sep 1 03:35:52 UTC 2011
My first post as a new thread to this list.
Using 'grub2-mkconfig -o /boot/grub2/grub.cfg' which as I said on
the FedoraForums is the correct way to create a boot grub.cfg
(/boot/grub is empty except for the splash file - no grub.cfg)
------------------------------------------------------begin
/boot/grub2/grub.cfg----------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
set timeout=20
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.1.0-0.rc4.git0.0.fc16.x86_64'
--class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root
d67e2886-3cf1-4690-8bbe-29c23fb9261a
echo 'Loading Linux 3.1.0-0.rc4.git0.0.fc16.x86_64 ...'
linux /vmlinuz-3.1.0-0.rc4.git0.0.fc16.x86_64
root=/dev/mapper/Linux-Fedora ro rd.md=0 rd.dm=0 rd.lvm.lv=Linux/Fedora
KEYTABLE=us SYSFONT=latarcyrheb-sun16 rd.luks=0 LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.1.0-0.rc4.git0.0.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.0-0.rc4.git0.0.fc16.x86_64
(recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root
d67e2886-3cf1-4690-8bbe-29c23fb9261a
echo 'Loading Linux 3.1.0-0.rc4.git0.0.fc16.x86_64 ...'
linux /vmlinuz-3.1.0-0.rc4.git0.0.fc16.x86_64
root=/dev/mapper/Linux-Fedora ro single rd.md=0 rd.dm=0
rd.lvm.lv=Linux/Fedora KEYTABLE=us SYSFONT=latarcyrheb-sun16 rd.luks=0
LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.1.0-0.rc4.git0.0.fc16.x86_64.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply
type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###
--------------------------------------------------------------End
/boot/grub2/grub.cfg------------------------------
Only modification was to remvoe the quiet and rhgb parms
Here is Custom.cfg
--------------------------------------------------begin
/boot/grub2/custom.cfg ----------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
set timeout=20
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.1.0-0.rc4.git0.0.fc16.x86_64'
--class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root
d67e2886-3cf1-4690-8bbe-29c23fb9261a
echo 'Loading Linux 3.1.0-0.rc4.git0.0.fc16.x86_64 ...'
linux /vmlinuz-3.1.0-0.rc4.git0.0.fc16.x86_64
root=/dev/mapper/Linux-Fedora ro rd.md=0 rd.dm=0 rd.lvm.lv=Linux/Fedora
KEYTABLE=us SYSFONT=latarcyrheb-sun16 rd.luks=0 LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.1.0-0.rc4.git0.0.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.0-0.rc4.git0.0.fc16.x86_64
(recovery mode)' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod part_msdos
insmod ext2
set root='(hd1,msdos2)'
search --no-floppy --fs-uuid --set=root
d67e2886-3cf1-4690-8bbe-29c23fb9261a
echo 'Loading Linux 3.1.0-0.rc4.git0.0.fc16.x86_64 ...'
linux /vmlinuz-3.1.0-0.rc4.git0.0.fc16.x86_64
root=/dev/mapper/Linux-Fedora ro single rd.md=0 rd.dm=0
rd.lvm.lv=Linux/Fedora KEYTABLE=us SYSFONT=latarcyrheb-sun16 rd.luks=0
LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
initrd /initramfs-3.1.0-0.rc4.git0.0.fc16.x86_64.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply
type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/90_persistent ###
### END /etc/grub.d/90_persistent ###
[marty at Fedora grub2]$ sudo cat custom.cfg
menuentry "Windows" {
insmod chain
insmod ntfs
set root=(hd0,2)
chainloader +1
}
menuentry 'Ubuntu, with Linux 2.6.38-11-generic' --class ubuntu --class
gnu-linux --class gnu --class os {
set gfxpayload=keep
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root
04236eef-6bbc-4259-9036-ab40eae990c8
linux /vmlinuz-2.6.38-11-generic root=/dev/mapper/Linux-Ubuntu ro
initrd /initrd.img-2.6.38-11-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-11-generic (recovery mode)' --class
ubuntu --class gnu-linux --class gnu --class os {
set gfxpayload=keep
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root
04236eef-6bbc-4259-9036-ab40eae990c8
echo 'Loading Linux 2.6.38-11-generic ...'
linux /vmlinuz-2.6.38-11-generic root=/dev/mapper/Linux-Ubuntu
ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-2.6.38-11-generic
}
menuentry "Desktop -- openSUSE 12.1 Milestone 4 - 3.0.0-4 (on
/dev/mapper/Linux-openSUSE)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos3)'
search --no-floppy --fs-uuid --set=root
1c641257-66a8-485f-805a-94159a708dc8
linux /vmlinuz-3.0.0-4-desktop root=/dev/Linux/openSUSE showopts
initrd /initrd-3.0.0-4-desktop
}
menuentry "Failsafe -- openSUSE 12.1 Milestone 4 - 3.0.0-4 (on
/dev/mapper/Linux-openSUSE)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos3)'
search --no-floppy --fs-uuid --set=root
1c641257-66a8-485f-805a-94159a708dc8
linux /vmlinuz-3.0.0-4-desktop root=/dev/Linux/openSUSE showopts
apm=off noresume edd=off powersaved=off nohz=off highres=off
processor.max_cstate=1 single nomodeset x11failsafe
initrd /initrd-3.0.0-4-desktop
}
-----------------------------------end /boot/grub2/custom.cfg
-----------------------------------------
Windows boots with no problems. Ubunt and openSUSE had to be tweaked
because of permissions problems - fine now.
OpenSUSE menuentry as crated by running 'update-grub' on Ubuntu with
30_os-prober executable.
I now wish to be able to install Fedora Grub2 on a primary partition on
my second hd - /dev/sdb2.
All / partitions are on LV's.
Marty Felker
PS No problems with daily updates from fedora-updates-testing!!
More information about the test
mailing list