grub.cfg file in grub2
This is not a question but is being posted to help others make working entries in grub.cfg. This is taken from Ubuntu 10.10 and despite the do not edit warning, I edited it with sudo gedit /boot/grub/cfg. My computer boots into every OS in the list.
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="10"
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 9424b2b0-8e1d-4fc6-9627-f57683611b78
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 9424b2b0-8e1d-4fc6-9627-f57683611b78
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 9424b2b0-8e1d-4fc6-9627-f57683611b78
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=9424b2b0-8e1d-4fc6-9627-f57683611b78 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 9424b2b0-8e1d-4fc6-9627-f57683611b78
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=9424b2b0-8e1d-4fc6-9627-f57683611b78 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 9424b2b0-8e1d-4fc6-9627-f57683611b78
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=9424b2b0-8e1d-4fc6-9627-f57683611b78 ro quiet splash
initrd /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 9424b2b0-8e1d-4fc6-9627-f57683611b78
echo 'Loading Linux 2.6.32-24-generic ...'
linux /boot/vmlinuz-2.6.32-24-generic root=UUID=9424b2b0-8e1d-4fc6-9627-f57683611b78 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 9424b2b0-8e1d-4fc6-9627-f57683611b78
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set 9424b2b0-8e1d-4fc6-9627-f57683611b78
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows Vista (loader) (on /dev/sde1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 6a1826b818268365
chainloader +1
}
menuentry "Windows Vista (loader) (on /dev/sde2)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set b0f2294bf22916de
chainloader +1
}
menuentry "LinuxMint GNU/Linux, with Linux 2.6.32-5-amd64 (on /dev/sde5)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set a0016b35-11c0-43e9-85ac-293d77401ceb
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=a0016b35-11c0-43e9-85ac-293d77401ceb ro quiet
initrd /boot/initrd.img-2.6.32-5-amd64
}
menuentry "LinuxMint GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode) (on /dev/sde5)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set a0016b35-11c0-43e9-85ac-293d77401ceb
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=a0016b35-11c0-43e9-85ac-293d77401ceb ro single
initrd /boot/initrd.img-2.6.32-5-amd64
}
menuentry "MEPIS at sda7, newest kernel (on /dev/sde7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 9817bd73-2aef-444c-932d-ea2ec6571bf7
linux /boot/vmlinuz root=/dev/sda7 nomce quiet splash vga=788
initrd /boot/initrd.img
}
menuentry "MEMTEST (on /dev/sde7)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos7)'
search --no-floppy --fs-uuid --set 9817bd73-2aef-444c-932d-ea2ec6571bf7
linux /boot/memtest86+.bin
}
menuentry "pclinux (on /dev/sde8)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set ce16f506-f7c1-4c16-a666-e0dc3d703cfe
linux /boot/vmlinuz BOOT_IMAGE=linux root=UUID=ce16f506-f7c1-4c16-a666-e0dc3d703cfe splash=silent vga=788
initrd (hd0,8)/boot/initrd.img
}
menuentry "linux-nonfb (on /dev/sde8)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set ce16f506-f7c1-4c16-a666-e0dc3d703cfe
linux /boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=ce16f506-f7c1-4c16-a666-e0dc3d703cfe
initrd (hd0,6)/boot/initrd.img
}
menuentry "FreeBSD 8.0" {
set root='(hd0,msdos3)'
chainloader +1
}
menuentry "Puppy on sda 10" {
set root='(hd0,msdos10)'
linux /boot/vmlinuz root=/dev/sda10 nomce quiet splash vga initrd /boot/initrd.img
}
### END /etc/grub.d/30_os-prober ###
|