I am wanting to install ubuntu 10.10/mint 9 onto my existing system, while allowing the old distros to boot.
My setup is mirrored mdraid.
Never had any issues before with grub picking up my old systems, but grub2 just isn't working.
I've installed mint OK and it boots fine. But the main grub menu doesn't show, it just boots straight into mint.
This includes the rescue entries in the menus - it neither shows them or any custom entries.
If I run a test in virtualbox without using raid it picks up my old suse distro no problem and gives me an entry at boot.
But using md it wont.
When installed on /dev/sda there are no custom entries in etc/grub.d, so it must be picking them up dynamically.
The /boot/grub/grub.cfg from the working sda install is:
Code:
at grub.cfg
#
# 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="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 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,msdos3)'
search --no-floppy --fs-uuid --set 83185308-ed97-4f53-b090-406e20e26a3e
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,msdos3)'
search --no-floppy --fs-uuid --set 83185308-ed97-4f53-b090-406e20e26a3e
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/06_mint_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 83185308-ed97-4f53-b090-406e20e26a3e
insmod png
if background_image /boot/grub/linuxmint.png ; then
set color_normal=white/black
set color_highlight=white/light-gray
else
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Linux Mint 10, 2.6.35-22-generic (/dev/sda3)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 83185308-ed97-4f53-b090-406e20e26a3e
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=83185308-ed97-4f53-b090-406e20e26a3e ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Linux Mint 10, 2.6.35-22-generic (/dev/sda3) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 83185308-ed97-4f53-b090-406e20e26a3e
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=83185308-ed97-4f53-b090-406e20e26a3e ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###
### 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,msdos3)'
search --no-floppy --fs-uuid --set 83185308-ed97-4f53-b090-406e20e26a3e
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 83185308-ed97-4f53-b090-406e20e26a3e
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "openSUSE 11.2 - 2.6.31.5-0.1 (on /dev/sda2)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set fdb32d3c-7b54-4017-b518-85cdd2e971e9
linux /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/disk/by-id/ata-VBOX_HARDDISK_VB63670e8f-5e367267-part2 resume=/dev/disk/by-id/ata-VBOX_HARDDISK_VB63670e8f-5e367267-part1 splash=silent quiet showopts vga=0x314
initrd /boot/initrd-2.6.31.5-0.1-default
}
menuentry "Failsafe -- openSUSE 11.2 - 2.6.31.5-0.1 (on /dev/sda2)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set fdb32d3c-7b54-4017-b518-85cdd2e971e9
linux /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/disk/by-id/ata-VBOX_HARDDISK_VB63670e8f-5e367267-part2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 x11failsafe vga=0x314
initrd /boot/initrd-2.6.31.5-0.1-default
}
### 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 ###
If I run an update-grub it finds and lists suse again, so all is well.
Moving on to the mdadm install, when I run a update-grub it will not find the old suse install, but it does put the other entries in grub.cfg.
Even if I manually add an entry to a custom file in /etc/grub.d is still doesn't display it when running a update-grub.
I can mount the appropriate md0 filesystem OK, so that is working OK.
On boot, even the rescue etc options are not shown, and it boots straight into Mint.
Here is the grub.cfg file generated on the md install, which doesn't work. Nothing is picked up on the search section, and even custom entries I've added are not found on update-grub or shown at boot (nothing is shown, its just a black screen then boots into Mint).
Code:
cat grub.cfg
#
# 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="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 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 raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 7313b7d2-81d5-4589-ab29-42cfc30098ce
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 7313b7d2-81d5-4589-ab29-42cfc30098ce
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/06_mint_theme ###
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 7313b7d2-81d5-4589-ab29-42cfc30098ce
insmod png
if background_image /boot/grub/linuxmint.png ; then
set color_normal=white/black
set color_highlight=white/light-gray
else
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
fi
### END /etc/grub.d/06_mint_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Linux Mint 10, 2.6.35-22-generic (/dev/md2)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 7313b7d2-81d5-4589-ab29-42cfc30098ce
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=7313b7d2-81d5-4589-ab29-42cfc30098ce ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Linux Mint 10, 2.6.35-22-generic (/dev/md2) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 7313b7d2-81d5-4589-ab29-42cfc30098ce
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=7313b7d2-81d5-4589-ab29-42cfc30098ce ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###
### 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 raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 7313b7d2-81d5-4589-ab29-42cfc30098ce
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 7313b7d2-81d5-4589-ab29-42cfc30098ce
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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.
menuentry 'copyMint 10, 2.6.35-22-generic (/dev/md2)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md2)'
search --no-floppy --fs-uuid --set 7313b7d2-81d5-4589-ab29-42cfc30098ce
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=7313b7d2-81d5-4589-ab29-42cfc30098ce ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Suse (/dev/md0)' --class gnu-linux --class gnu --class os {
recordfail
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
search --no-floppy --fs --set /dev/md0
linux /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/md0 ro splash
initrd /boot/initrd-2.6.31.5-0.1-default
}
menuentry 'Suse2 (/dev/md0)' {
recordfail
insmod raid
insmod mdraid
insmod part_msdos
insmod part_msdos
insmod ext2
set root='(md0)'
linux /boot/vmlinuz-2.6.31.5-0.1-default root=/dev/md0 ro splash
initrd /boot/initrd-2.6.31.5-0.1-default
}
### 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 ###
/etc/mdadm/mdadm.cfg is setup and I can mount OK.
Code:
cat mdadm.conf
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=8ea2ef6d:9764842c:7bd6ae87:413a3ae4
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=16cf184f:50461f3b:b5ce49ec:e8e6efa5
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=99743c63:948a0c3e:8bdd08bc:3384c9f3
What am I doing wrong? It can't be anything too fundamental as surely mint wouldn't boot?
Can anyone out there help with this, its driving me crazy.
Thanks