Fedora 16 grub2
Nicolae Ghimbovschi
xfreebird at gmail.com
Thu Nov 3 09:26:55 UTC 2011
Hello,
I need help with a GRUB2 issue.
Yesterday I did a preupgrade from F15 to F16.
I've added a new custom menu entry for grub in /etc/grub.d/40_custom
After running grub2-mkconfig -o /boot/grub2/grub.cfg, I saw that
/boot/grub2/grub.cfg was not updated.
grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.1.0-5.fc16.x86_64
Found initrd image: /boot/initramfs-3.1.0-5.fc16.x86_64.img
No volume groups found
Found Windows 7 (loader) on /dev/sda1
Found Mac OS X on /dev/sda3
Instead /boot/grub2/grub.cfg.new was created, and it did not contain
my custom menu entry.
What am I doing wrong ? Am I missing a step ?
Below you can see the contents of the following files:
/boot/grub2/grub.cfg, /boot/grub2/grub.cfg.new and
/etc/grub.d/40_custom
cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# 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.
menuentry "Mac OS X 10.6.8" {
set root=(hd0,3)
chainloader +1
}
cat /boot/grub2/grub.cfg.new
#
# 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="${saved_entry}"
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=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.1.0-5.fc16.x86_64' --class
fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
linux /boot/vmlinuz-3.1.0-5.fc16.x86_64
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro rd.md=0 rd.lvm=0
rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0
LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.0-5.fc16.x86_64 (recovery
mode)' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
linux /boot/vmlinuz-3.1.0-5.fc16.x86_64
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro single rd.md=0
rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb
rd.luks=0 LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.0-5.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 ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 5C3EB3CE3EB39F86
chainloader +1
}
cat /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
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 {
true
}
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux, with Linux 3.1.0-5.fc16.x86_64' --class
fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
linux /boot/vmlinuz-3.1.0-5.fc16.x86_64
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro rd.md=0 rd.lvm=0
rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0
LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Linux 3.1.0-5.fc16.x86_64 (recovery
mode)' --class fedora --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
linux /boot/vmlinuz-3.1.0-5.fc16.x86_64
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro single rd.md=0
rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb
rd.luks=0 LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
initrd /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
submenu "Xen 4.1" {
menuentry 'Fedora Linux, with Xen 4.1 and Linux 3.1.0-5.fc16.x86_64'
--class fedora --class gnu-linux --class gnu --class os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Xen 4.1 ...'
multiboot /boot/xen-4.1.gz placeholder
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
module /boot/vmlinuz-3.1.0-5.fc16.x86_64 placeholder
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro rd.md=0 rd.lvm=0
rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0
LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
module /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Xen 4.1 and Linux 3.1.0-5.fc16.x86_64
(recovery mode)' --class fedora --class gnu-linux --class gnu --class
os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Xen 4.1 ...'
multiboot /boot/xen-4.1.gz placeholder
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
module /boot/vmlinuz-3.1.0-5.fc16.x86_64 placeholder
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro single rd.md=0
rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb
rd.luks=0 LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
module /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
}
submenu "Xen 4.1.1" {
menuentry 'Fedora Linux, with Xen 4.1.1 and Linux 3.1.0-5.fc16.x86_64'
--class fedora --class gnu-linux --class gnu --class os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Xen 4.1.1 ...'
multiboot /boot/xen-4.1.1.gz placeholder
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
module /boot/vmlinuz-3.1.0-5.fc16.x86_64 placeholder
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro rd.md=0 rd.lvm=0
rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0
LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
module /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Xen 4.1.1 and Linux 3.1.0-5.fc16.x86_64
(recovery mode)' --class fedora --class gnu-linux --class gnu --class
os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Xen 4.1.1 ...'
multiboot /boot/xen-4.1.1.gz placeholder
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
module /boot/vmlinuz-3.1.0-5.fc16.x86_64 placeholder
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro single rd.md=0
rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb
rd.luks=0 LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
module /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
}
submenu "Xen syms-4.1.1" {
menuentry 'Fedora Linux, with Xen syms-4.1.1 and Linux
3.1.0-5.fc16.x86_64' --class fedora --class gnu-linux --class gnu
--class os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Xen syms-4.1.1 ...'
multiboot /boot/xen-syms-4.1.1 placeholder
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
module /boot/vmlinuz-3.1.0-5.fc16.x86_64 placeholder
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro rd.md=0 rd.lvm=0
rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0
LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
module /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Xen syms-4.1.1 and Linux
3.1.0-5.fc16.x86_64 (recovery mode)' --class fedora --class gnu-linux
--class gnu --class os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Xen syms-4.1.1 ...'
multiboot /boot/xen-syms-4.1.1 placeholder
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
module /boot/vmlinuz-3.1.0-5.fc16.x86_64 placeholder
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro single rd.md=0
rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb
rd.luks=0 LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
module /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
}
submenu "Xen xen" {
menuentry 'Fedora Linux, with Xen xen and Linux 3.1.0-5.fc16.x86_64'
--class fedora --class gnu-linux --class gnu --class os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Xen xen ...'
multiboot /boot/xen.gz placeholder
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
module /boot/vmlinuz-3.1.0-5.fc16.x86_64 placeholder
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro rd.md=0 rd.lvm=0
rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb rd.luks=0
LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
module /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
menuentry 'Fedora Linux, with Xen xen and Linux 3.1.0-5.fc16.x86_64
(recovery mode)' --class fedora --class gnu-linux --class gnu --class
os --class xen {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root
a935b93d-51a2-4057-80ab-841a5699bf17
echo 'Loading Xen xen ...'
multiboot /boot/xen.gz placeholder
echo 'Loading Linux 3.1.0-5.fc16.x86_64 ...'
module /boot/vmlinuz-3.1.0-5.fc16.x86_64 placeholder
root=UUID=a935b93d-51a2-4057-80ab-841a5699bf17 ro single rd.md=0
rd.lvm=0 rd.dm=0 KEYTABLE=us quiet SYSFONT=latarcyrheb-sun16 rhgb
rd.luks=0 LANG=en_US.UTF-8
echo 'Loading initial ramdisk ...'
module /boot/initramfs-3.1.0-5.fc16.x86_64.img
}
}
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 5C3EB3CE3EB39F86
chainloader +1
}
### 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 ###
More information about the users
mailing list