grub2 boot menu didn't change on install of 13.1

grub2 boot menu didn’t change on install of 13.1, 13.1 is installed, but
I can’t get into it yet

I have installed openSUSE 13.1 on my laptop and box #2 below, and was
able to get them going.

On my #1 box, I installed 13.1, and everything looked good during the
install. Then when it rebooted, the grub2 boot menu was exactly as it
was before - it showed 12.3 as the number 1 selection, and 12.2 from
before as the 2nd selection.

Here is my hard drive configuration. I am running RAID-1 on several drives.


# cat /proc/mdstat
Personalities : [raid1] [raid0] [raid10] [raid6] [raid5] [raid4]
md0 : active (auto-read-only) raid1 sda2[1] sdc2[2]
20973496 blocks super 1.0 [2/2] [UU]

md1 : active raid1 sda3[1] sdc3[2]
465306488 blocks super 1.0 [2/2] [UU]

md3 : active raid1 sda7[2] sdc7[0]
446428024 blocks super 1.2 [2/2] [UU]

md6 : active raid1 sda6[0] sdc6[2]
20955008 blocks super 1.2 [2/2] [UU]

md5 : active raid1 sdd2[3] sdb2[2]
282983424 blocks super 1.2 [2/2] [UU]

md7 : active raid1 sdd3[0] sdb3[2]
487256896 blocks super 1.2 [2/2] [UU]

md4 : active raid1 sdb1[2] sdd1[0]
199787392 blocks super 1.2 [2/2] [UU]

md2 : active raid1 sdc5[0] sda5[2]
20971448 blocks super 1.0 [2/2] [UU]

unused devices: <none>

I have 4 drives partitioned as follows:


fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001fa6f

Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     4192255     2095104   82  Linux swap / Solaris
/dev/sda2   *     4192256    46139391    20973568   fd  Linux raid
autodetect
/dev/sda3        46139392   976752639   465306624   fd  Linux raid
autodetect
/dev/sda4       976752640  1953523711   488385536    f  W95 Ext'd (LBA)
/dev/sda5       976754688  1018697727    20971520   fd  Linux raid
autodetect
/dev/sda6      1018699776  1060642815    20971520   83  Linux
/dev/sda7      1060644864  1953503231   446429184   fd  Linux raid
autodetect

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0006158b

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   399839231   199918592   fd  Linux raid
autodetect
/dev/sdb2       399839232   966068223   283114496   fd  Linux raid
autodetect
/dev/sdb3       966068224  1940844543   487388160   fd  Linux raid
autodetect
/dev/sdb4      1940844544  1953523711     6339584   82  Linux swap / Solaris

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00030fbd

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048     4192255     2095104   82  Linux swap / Solaris
/dev/sdc2   *     4192256    46139391    20973568   fd  Linux raid
autodetect
/dev/sdc3        46139392   976752639   465306624   fd  Linux raid
autodetect
/dev/sdc4       976752640  1953523711   488385536    5  Extended
/dev/sdc5       976754688  1018697727    20971520   fd  Linux raid
autodetect
/dev/sdc6      1018699776  1060642815    20971520   83  Linux
/dev/sdc7      1060644864  1953503231   446429184   fd  Linux raid
autodetect

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0007fc05

Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048   399839231   199918592   83  Linux
/dev/sdd2       399839232   966068223   283114496   83  Linux
/dev/sdd3       966068224  1940844543   487388160   83  Linux
/dev/sdd4      1940844544  1953523711     6339584   82  Linux swap / Solaris

Disk /dev/md2: 21.5 GB, 21474762752 bytes
2 heads, 4 sectors/track, 5242862 cylinders, total 41942896 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md4: 204.6 GB, 204582289408 bytes
2 heads, 4 sectors/track, 49946848 cylinders, total 399574784 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md7: 499.0 GB, 498951061504 bytes
2 heads, 4 sectors/track, 121814224 cylinders, total 974513792 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md5: 289.8 GB, 289775026176 bytes
2 heads, 4 sectors/track, 70745856 cylinders, total 565966848 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md6: 21.5 GB, 21457928192 bytes
2 heads, 4 sectors/track, 5238752 cylinders, total 41910016 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md3: 457.1 GB, 457142296576 bytes
2 heads, 4 sectors/track, 111607006 cylinders, total 892856048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md1: 476.5 GB, 476473843712 bytes
2 heads, 4 sectors/track, 116326622 cylinders, total 930612976 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md0: 21.5 GB, 21476859904 bytes
2 heads, 4 sectors/track, 5243374 cylinders, total 41946992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

As you can see, sda and sdc are partitioned the same, and sdb and sdd
are partitioned the same.

sda and sdd are the drives I have the OS on, while sdb and sdd are for
data only.

I have raided the drives as I noted above.

when I run os_prober out of 12.3, I get the following:


/etc/grub.d # ./30_os-prober
No volume groups found
Found openSUSE 13.1 (x86_64) on /dev/md0
menuentry 'openSUSE 13.1 (x86_64) (on /dev/md0)' --class gnu-linux
--class gnu --class os $menuentry_id_option
'osprober-gnulinux-simple-c453530d-d799-4fea-926a-f56ad27594b8' {
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid1x
insmod ext2
set root='mduuid/e96a14edbc7c8d5a9b0c114a9e208631'
if  x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint='mduuid/e96a14edbc7c8d5a9b0c114a9e208631'
c453530d-d799-4fea-926a-f56ad27594b8
else
search --no-floppy --fs-uuid --set=root
c453530d-d799-4fea-926a-f56ad27594b8
fi
linux /boot/vmlinuz-3.11.6-4-desktop root=/dev/md0
resume=/dev/disk/by-label/swap3 splash=silent quiet showopts
initrd /boot/initrd-3.11.6-4-desktop
}
submenu 'Advanced options for openSUSE 13.1 (x86_64) (on /dev/md0)'
$menuentry_id_option
'osprober-gnulinux-advanced-c453530d-d799-4fea-926a-f56ad27594b8' {
menuentry 'openSUSE 13.1 (on /dev/md0)' --class gnu-linux
--class gnu --class os $menuentry_id_option
'osprober-gnulinux-/boot/vmlinuz-3.11.6-4-desktop--c453530d-d799-4fea-926a-f56ad27594b8'
{
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid1x
insmod ext2
set root='mduuid/e96a14edbc7c8d5a9b0c114a9e208631'
if  x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint='mduuid/e96a14edbc7c8d5a9b0c114a9e208631'
c453530d-d799-4fea-926a-f56ad27594b8
else
search --no-floppy --fs-uuid --set=root
c453530d-d799-4fea-926a-f56ad27594b8
fi
linux /boot/vmlinuz-3.11.6-4-desktop root=/dev/md0
resume=/dev/disk/by-label/swap3 splash=silent quiet showopts
initrd /boot/initrd-3.11.6-4-desktop
}
menuentry 'openSUSE 13.1, with Linux 3.11.6-4-desktop (on
/dev/md0)' --class gnu-linux --class gnu --class os $menuentry_id_option
'osprober-gnulinux-/boot/vmlinuz-3.11.6-4-desktop--c453530d-d799-4fea-926a-f56ad27594b8'
{
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid1x
insmod ext2
set root='mduuid/e96a14edbc7c8d5a9b0c114a9e208631'
if  x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint='mduuid/e96a14edbc7c8d5a9b0c114a9e208631'
c453530d-d799-4fea-926a-f56ad27594b8
else
search --no-floppy --fs-uuid --set=root
c453530d-d799-4fea-926a-f56ad27594b8
fi
linux /boot/vmlinuz-3.11.6-4-desktop root=/dev/md0
resume=/dev/disk/by-label/swap3 splash=silent quiet showopts
initrd /boot/initrd-3.11.6-4-desktop
}
menuentry 'openSUSE 13.1, with Linux 3.11.6-4-desktop (recovery
mode) (on /dev/md0)' --class gnu-linux --class gnu --class os
$menuentry_id_option
'osprober-gnulinux-/boot/vmlinuz-3.11.6-4-desktop--c453530d-d799-4fea-926a-f56ad27594b8'
{
insmod part_msdos
insmod part_msdos
insmod diskfilter
insmod mdraid1x
insmod ext2
set root='mduuid/e96a14edbc7c8d5a9b0c114a9e208631'
if  x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root
--hint='mduuid/e96a14edbc7c8d5a9b0c114a9e208631'
c453530d-d799-4fea-926a-f56ad27594b8
else
search --no-floppy --fs-uuid --set=root
c453530d-d799-4fea-926a-f56ad27594b8
fi
linux /boot/vmlinuz-3.11.6-4-desktop root=/dev/md0
showopts apm=off noresume edd=off powersaved=off nohz=off highres=off
processor.max_cstate=1 nomodeset x11failsafe
initrd /boot/initrd-3.11.6-4-desktop
}
}


So you can see that the 13.1 is detected.

I don’t remember which drive, sda or sdc, has grub 2 installed on it.
Perhaps both.

Any suggestions on what I should do next? I was thinking I would run the
rescue system of 13.1, change the root over and reinstall grub2 on each
of the drives /dev/sda and /dev/sdc.


G.O.
Box #1: 12.3 | KDE 4.11 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 13.1 | KDE 4.11 | AMD Athlon X3 | 64 | 4GB
Laptop: 13.1 | KDE 4.11 | Core i7-2620M | 64 | 8GB

Was it an upgrade

Check the file
/etc/default/grub

You may need to edit it

Check the kernel version that is running when you boot the first option.

It might be running 13.1 in spite of what the title of the menu option says.

-fb

On 01/15/2014 08:26 PM, caf4926 wrote:
>
> Was it an upgrade
>
> Check the file
> /etc/default/grub
>
> You may need to edit it
>
>

On the partition where I installed 13.1, that file says it is 13.1:


/mnt # cat etc/default/grub
# Modified by YaST2. Last modification on Wed Jan 15 18:40:37 PHT 2014
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are
not able to recognize it (e.g. change of flavor or strange install order
) it it use as fallback installation parameters from
/etc/sysconfig/bootloader

# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg'
afterwards to update
# /boot/grub2/grub.cfg.
GRUB_DISTRIBUTOR="openSUSE 13.1"
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=8
GRUB_CMDLINE_LINUX_DEFAULT=" resume=/dev/disk/by-label/swap3
splash=silent quiet showopts"
# kernel command line options for failsafe mode
GRUB_CMDLINE_LINUX_RECOVERY="showopts apm=off noresume edd=off
powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset
x11failsafe"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=gfxterm
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY=true
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# Skip 30_os-prober if you experienced very slow in probing them
# WARNING foregin OS menu entries will be lost if set true here
GRUB_DISABLE_OS_PROBER=false
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/background.png

On the partition where I am running 12.3, which I am on now, it shows 12.3:


# cat /etc/default/grub
# Modified by YaST2. Last modification on Fri Mar 22 10:21:39 PHT 2013
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are
not able to recognize it (e.g. change of flavor or strange install order
) it it use as fallback installation parameters from
/etc/sysconfig/bootloader

# If you change this file, run 'grub2-mkconfig -o /boot/grub2/grub.cfg'
afterwards to update
# /boot/grub2/grub.cfg.
GRUB_DISTRIBUTOR="openSUSE 12.3"
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=8
GRUB_CMDLINE_LINUX_DEFAULT=" resume=/dev/disk/by-label/swap2
splash=silent quiet showopts radeon.audio=1"
# kernel command line options for failsafe mode
GRUB_CMDLINE_LINUX_RECOVERY="showopts apm=off noresume edd=off
powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset
x11failsafe"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=gfxterm
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to
Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_LINUX_RECOVERY=true
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
# Skip 30_os-prober if you experienced very slow in probing them
# WARNING foregin OS menu entries will be lost if set true here
GRUB_DISABLE_OS_PROBER=false
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
GRUB_BACKGROUND=/boot/grub2/themes/openSUSE/background.png

I ran the installation twice, thinking maybe there was just some kind of
error the first time. But no, the same thing both times. The grub2 menu
shows up just like before.

I tried to boot in the other partition, where I used to have 12.2
installed and now have 13.1, but it would not boot because the grub line
is looking for the 12.2 kernel, and 13.1 is installed in that partition.


G.O.
Box #1: 12.3 | KDE 4.11 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 13.1 | KDE 4.11 | AMD Athlon X3 | 64 | 4GB
Laptop: 13.1 | KDE 4.11 | Core i7-2620M | 64 | 8GB

On 01/15/2014 08:26 PM, caf4926 wrote:
>
> Was it an upgrade
>
It was a new installation in a partition that I previously had 12.2
running on.

> Check the file
> /etc/default/grub
>
> You may need to edit it
>
>


G.O.
Box #1: 12.3 | KDE 4.11 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 13.1 | KDE 4.11 | AMD Athlon X3 | 64 | 4GB
Laptop: 13.1 | KDE 4.11 | Core i7-2620M | 64 | 8GB

From 12.3
Do

su -
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda

Does 13.1 now show in your grub boot menu

On 01/16/2014 11:36 AM, caf4926 wrote:
>
> From 12.3
> Do
>
> Code:
> --------------------
> su -
> grub2-mkconfig -o /boot/grub2/grub.cfg
> --------------------
>
>
>
> Code:
> --------------------
> grub2-install /dev/sda
> --------------------
>
>
> Does 13.1 now show in your grub boot menu
>
>

Yes, thank you, that did bring 13.1 into the grub boot menu. However, it
is the 2nd option, having taken the place of 12.2 that I had there. In
order to make it the default option, with 12.3 as my 2nd option instead
of the first, what do you suggest I do? Perhaps run the same script, but
do it now from 13.1?

Another question I have is, should I also install grub on /dev/sdc? That
is the device that I have raided with sda on all partitions. Or is it
better to wait until I have a hard drive failure, and boot into the
rescue system and install grub at that time?

Thanks for your help.
George

G.O.
Box #1: 12.3 | KDE 4.11 | AMD Phenom IIX4 | 64 | 16GB
Box #2: 13.1 | KDE 4.11 | AMD Athlon X3 | 64 | 4GB
Laptop: 13.1 | KDE 4.11 | Core i7-2620M | 64 | 8GB

But if you can now boot to 13.1?

Run exactly the same code from 13.1

su -
grub2-mkconfig -o /boot/grub2/grub.cfg

grub2-install /dev/sda

This should put 13.1 in control and first with 12.3 following

On 01/16/2014 02:06 PM, caf4926 wrote:
>
> But if you can now boot to 13.1?
>
> Run exactly the same code from 13.1
>
>
> Code:
> --------------------
> su -
> grub2-mkconfig -o /boot/grub2/grub.cfg
>
> --------------------
>
>
> Code:
> --------------------
> grub2-install /dev/sda
> --------------------
>
>
> This should put 13.1 in control and first with 12.3 following
>
>

Thanks! that worked, although, there was something quirky, perhapse
someone can explain…

I ran both those commands, and 12.3 was still in control. So then I ran


# grub2-install /dev/sdc

which is the drive I have raided with /dev/sda, and when I rebooted it
had 13.1 in control now.

So for some reason my system was looking at /dev/sdc to boot up instead
of /dev/sda. Why would it do that?

So for some reason my system was looking at /dev/sdc to boot up instead
of /dev/sda. Why would it do that?

You tell me
I have no idea how your system is setup
From what I have read though, it already sounds unconventional