Update 11.4 to 12.1 bootloader cannot mount root partition

I have a dual boot system with openSUSE installed on /dev/sdb2. I just attempted to upgrade from 11.4 to 12.1 on a 64-bit AMD HP machine. When I try to boot I get:

**kernel (hd0,1)/boot/vmlinuz-3.1.0-1.2-desktop root=/dev/sdb2 resume=/dev/disk/by-id/ata-WDC_WD5000AADS-00S9B0_WD-WCAV93800106-part1 splash=silent quiet showopts vga=0x31a

Error 17: cannot mount selected partition**

But I can mount and read /dev/sdb2 when booted from the rescue system. Any suggestions?

I really don’t want to do a complete new installation.

The Failsafe boot option doesn’t work either.

OK, I changed hd0 to hd1 in both the vmlinuz and initrd lines when editing the bootloader command. This get the system to boot. Now I need to fix it. Not sure why this happened in the first place.

hattons wrote:
> I have a dual boot system with openSUSE installed on /dev/sdb2.
Dual-boot with what?

> I just
> attempted to upgrade from 11.4 to 12.1 on a 64-bit AMD HP machine. When
> I try to boot I get:

> KERNEL (HD0,1)/BOOT/VMLINUZ-3.1.0-1.2-DESKTOP
(HD0,1) = /dev/sda2

> ROOT=/DEV/SDB2
Grub thinks that you have a boot partition on /dev/sda2 and root on
/dev/sdb2

From your rescue boot please

# fdisk -l 

Which partition(s) are flagged as “boot”
Tell us what you think each partition is used for.

Mount each partition in turn and

# ls /mnt
# df -lhT /mnt 

will help identify them

Boot the system, login, open a terminal window and do


kdesu kwrite /boot/grub/menu.lst

Make the same changes you made to get the system to boot, i.e. change (hd0,1) to (hd1,1). AFAICS that should do it, since you managed to get it booting with those changes.

I also get this error.

Booting ‘openSUSE 12.1 - 3.1.0-1.2 (default)’
kernel (hd0)/boot/vmlinuz-3.1.0-1.2-default root=/dev/sda7 resume=/dev/hda1 splash=silent acpi=force showopts vga=-x314

Error 17: Cannot mount selected partition

What do I do?

I tried different things. Nothing works. I’m dead in the water. What can I do?

  1. I went in to installation to the point where it shows the partition. It is:
    openSUSE 12.1 /dev/sda7 i386 Linux native (ext3)

  2. Changed (hd0) to (hd1) in these places
    kernel (hd0)/…
    initrd (hd0)/…

Got this error:
Error 21: Selected disk does not exist

  1. Boot from install DVD. (NOTE!!! this does not work even on a system that has a good boot loader!)

Boot From Hard Disk

Booting from local disk…
GRUB Loading stage 1.5.

GRUB loading, please wait…
Initializing gfx code…

It then hangs up.

  1. Boot from install DVD

Rescue System

(It loads the rescue system, 2 of 2. At the command prompt, ls only shows a /bin directory, and that has 0 entries. No commands work.)

On 01/03/2012 06:06 PM, LouBryan wrote:
>
> I tried different things. Nothing works. I’m dead in the water. What
> can I do?
>
> 1. I went in to installation to the point where it shows the
> partition. It is:
> openSUSE 12.1 /dev/sda7 i386 Linux native (ext3)
>
> 2. Changed (hd0) to (hd1) in these places
> kernel (hd0)/…
> initrd (hd0)/…

That is a mistake. In GRUB (hd0) means /dev/sda,(hd1) means /dev/sdb, etc. In
addition, (hd0,0) is /dev/sda1.
>
> Got this error:
> Error 21: Selected disk does not exist
>
> 3. Boot from install DVD. (NOTE!!! this does not work even on a
> system that has a good boot loader!)

That is a BIOS error or a bad DVD. Any disk bootloader should be ignored.

> Boot From Hard Disk
>
> Booting from local disk…
> GRUB Loading stage 1.5.
>
> GRUB loading, please wait…
> Initializing gfx code…
>
> It then hangs up.
>
> 4. Boot from install DVD
>
> Rescue System
>
> (It loads the rescue system, 2 of 2. At the command prompt, ls only
> shows a /bin directory, and that has 0 entries. No commands work.)

To get to your hard drive, you need to mount the appropriate partition from the
disk.

Ok, I got it to work. I removed the (hd0) from both the kernel and initrd lines so that the locations start with /. Booted fine. Then made the same changes in yast to the boot loader. Boots without any problems.

Could this (hd0) problem have something to do with the /by-uuid changes that were made some months ago?

Yes, it could. The normal way openSUSE works is using* by-id* and that id is bound to the hardware (the physical disk). And *by-uuid *is bound to an id set at partitioning/creating file systems. Thus when you did repartition/recreate a file system (often called format by those who learned these terminology from MS-DOS), you will have a new UUID.

It could be you have a reason for changing to by-uuid from by-id, but when you do those things, you should at least inform yourself about what these things mean. Also not giving much information about what you did is not very helpfull in making others helping you. E.g. saying “I attempted to upgrade” is a rather loose way of saying in english what you tried. But it is technicaly very vague. Ther are many ways to upgrade from the usage of one level of software to another. You could even call bying new hardware, installing a newer OS level and then importing the users data an “upgrade”. But when you leave that out, there is still:
. using the upgrade button on the DVD;
. changing the repros to the new OSS, nonOSS repos and doing zypper dup;
. doing a new install while not touching your data partitions (like
/home
);
. more ???

Please when you ask next time, explain more, do not assume that others have the same set-up, think the same things, did the same as you have/think/did.

After this very steep learning curve :wink: enjoy your new openSUSE 12.1

Hello,

I have had a similar problem. I am upgrading to openSUSE 12.1 on a system with a RAID 1 configuration and got:
kernel (hd0)/vmlinuz-3.1.10-1.16-desktop root=/dev/md2 resume=/dev/md1 splash=silent vga=0x31a

Error 17: Cannot mount selected partition

I could also not boot in failsafe.

Since this is a RAID 1 setup, I activated the RAID:

mdadm --assemble --scan

Two devices did not assemble: sda6 failed to be added to md4 because of an invalid argument; md4 thus tried to assemble from 0 drives and failed.
sda5 failed to be added to md3, also because of an invalid argument; md3 thus tried to assemble from 0 drives and failed.

I ran fdisk:

Disk /dev/sda: 250.0 GB, 250000000000 bytes255 heads, 63 sectors/track, 30394 cylinders, total 488281250 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: 0x000170fa


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     1028159      514048+  fd  Linux raid autodetect
/dev/sda2         1028160    17816084     8393962+  fd  Linux raid autodetect
/dev/sda3        17816085    38796974    10490445   fd  Linux raid autodetect
/dev/sda4        38796975   488279609   224741317+   f  W95 Ext'd (LBA)
/dev/sda5        38797038    49287419     5245191   fd  Linux raid autodetect
/dev/sda6        49287483    91233134    20972826   fd  Linux raid autodetect
/dev/sda7        91233198   101723579     5245191   fd  Linux raid autodetect
/dev/sda8       101723643   488279609   193277983+  fd  Linux raid autodetect


Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders, total 488281250 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: 0x0004586c


   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63     1028159      514048+  fd  Linux raid autodetect
/dev/sdb2         1028160    17816084     8393962+  fd  Linux raid autodetect
/dev/sdb3        17816085    38796974    10490445   fd  Linux raid autodetect
/dev/sdb4        38796975   488279609   224741317+   f  W95 Ext'd (LBA)
/dev/sdb5        38797038    49287419     5245191   fd  Linux raid autodetect
/dev/sdb6        49287483    91233134    20972826   fd  Linux raid autodetect
/dev/sdb7        91233198   101723579     5245191   fd  Linux raid autodetect
/dev/sdb8       101723643   488279609   193277983+  fd  Linux raid autodetect


Disk /dev/sdc: 2107 MB, 2107637760 bytes
61 heads, 60 sectors/track, 1124 cylinders, total 4116480 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: 0x75c8aa08


   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1              64     4116479     2058208    6  FAT16


Disk /dev/sdf: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0xfdf22653


   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *          63   976768064   488384001    b  W95 FAT32


Disk /dev/md125: 197.9 GB, 197916557312 bytes
2 heads, 4 sectors/track, 48319472 cylinders, total 386555776 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: 0x00000000




Disk /dev/md121: 5371 MB, 5371002880 bytes
2 heads, 4 sectors/track, 1311280 cylinders, total 10490240 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: 0x00000000




Disk /dev/md120: 526 MB, 526319616 bytes
2 heads, 4 sectors/track, 128496 cylinders, total 1027968 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: 0x00000000




Disk /dev/md119: 197.9 GB, 197916557312 bytes
2 heads, 4 sectors/track, 48319472 cylinders, total 386555776 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: 0x00000000




Disk /dev/md118: 10.7 GB, 10742136832 bytes
2 heads, 4 sectors/track, 2622592 cylinders, total 20980736 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: 0x00000000

So now I see my partitions and I can identify them by contents as:
md118 /
md119 /data
md120 /boot
md121 /srv
md125 /data (but files not touched since 2010…hmm…could my RAID have broken?)

There is also supposed to be a /home and a /tmp partition, but those did not appear. Perhaps they are md3 and md4?

So how do I change my bootloader command to point to the right partition? Switching it to hd1 didn’t work (not that I thought it would). How do I specify the RAID device?

thanks,
Bill

Upgrade from what to 12.1???

Because this is RAID and not the same problem as the OP perhaps a new thread is in order with RAID mentioned in the title.

Warning! When I upgraded from 12.1 to 12.2 it crashed. Could not boot. Could not recover.

If you’ve made these by-uuid changes, be sure to have good backups! The only way I could fix this is to erase the whole drive and start over with a new install.

With the new install everything works (except videos, but that’s a separate issue). I don’t think I have any by-uuid issues now, since I let it default to all those questions. We’ll see in the next upgrade some months from now.