On 26/09/12 09:10, Thierry Vignaud wrote:
send me what a typical config file would look with the corresponding grub1 conf
file.
I think I can see where you are heading.
Grub2 generates it own grub.cfg using os-prober, so maybe some work not
needed.
Additional entries to the grub2 menu (anything not found by os-prober)
need adding to /etc/grub.d/40_custom and are incuded when the menu is
re-built. If thay are added to grub.cfg they will be overwritten at
kernel update etc.
I have attached grub.cfg and menu.lst from a vbox installation of mga3
running grub2. It is a lot less noisy than those on my desktop.
For basic grub2 commands see my README.Mageia in the package.
Barry
#
# 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 [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if loadfont unicode ; then
set gfxmode=1024x768x32
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_GB
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1
--hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1
6e6a4414-2fff-413b-b224-4675025cb4cf
else
search --no-floppy --fs-uuid --set=root 6e6a4414-2fff-413b-b224-4675025cb4cf
fi
insmod gfxmenu
insmod png
set theme=($root)/boot/grub2/themes/maggy/theme.txt
export theme
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Mageia GNU/Linux' --class mageia --class gnu-linux --class gnu
--class os $menuentry_id_option
'gnulinux-simple-6e6a4414-2fff-413b-b224-4675025cb4cf' {
set gfxpayload=text
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1
--hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1
6e6a4414-2fff-413b-b224-4675025cb4cf
else
search --no-floppy --fs-uuid --set=root
6e6a4414-2fff-413b-b224-4675025cb4cf
fi
echo'Loading Linux desktop ...'
linux /boot/vmlinuz-desktop
root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro splash
echo'Loading initial ramdisk ...'
initrd /boot/initrd-desktop.img
}
submenu 'Advanced options for Mageia GNU/Linux' $menuentry_id_option
'gnulinux-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
menuentry 'Mageia GNU/Linux, with Linux desktop' --class mageia --class
gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-desktop-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
set gfxpayload=text
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1
6e6a4414-2fff-413b-b224-4675025cb4cf
else
search --no-floppy --fs-uuid --set=root
6e6a4414-2fff-413b-b224-4675025cb4cf
fi
echo'Loading Linux desktop ...'
linux /boot/vmlinuz-desktop
root=UUID=6e6a4414-2fff-413b-b224-4675025cb4cf ro splash
echo'Loading initial ramdisk ...'
initrd /boot/initrd-desktop.img
}
menuentry 'Mageia GNU/Linux, with Linux 3.5.4-desktop-1.mga3' --class
mageia --class gnu-linux --class gnu --class os $menuentry_id_option
'gnulinux-3.5.4-desktop-1.mga3-advanced-6e6a4414-2fff-413b-b224-4675025cb4cf' {
set gfxpayload=text
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1
6e6a4414-2fff-413b-b224-4675025cb4cf
else
search --no-floppy --