grub fails,mdadm in rescue fails on openSuse 12.1 DVD upgrade(fr. 11.4)of soft raid1 (md0:sda2,sdb2)

I tried to upgrade my 11.4 openSuse system, on soft raid1 (md0:sda2,sdb2) to 12.1 using the DVD image. The raid1 is mounted correctly by the DVD, and the upgrade goes as expected until the end, when a diagnostic window pops up with


grub> setup --stage2=/boot/grub/stage2 --force-lba (hd0) (hd0,1)

Checking if “/boot/grub/stage1” exists… no
Checking if “/grub/stage1” exists… no
Error 15: File not found
grub> quit

The system tries to reboot but fails with grub failure. When I get into grub command mode at this point, and try to setup, it fails with the same diagnostics as above.

If I boot from the DVD, choose rescue, and login root, then

Rescue:~ # mdadm --examine /dev/sda2

and the same for sdb2, I get everything as expected: everything is correct, and the two parameter lists are identical except for “Device UUID:” But then

Rescue:~ # mdadm --assemble /dev/md0 /dev/sda2 /dev/sdb2
mdadm: cannot open device /dev/sda2: Device or resource busy
mdadm: /dev/sda2 has no superblock - assembly aborted

But when I choose upgrade (rather than rescue) from the same DVD, md0 gets mounted correctly, and the upgrade proceeds uneventfully until the above grub fail and reboot. So it looks like the superblock of /dev/sda2 is fine, but in rescue fails to get read because the device is busy.

Any suggestions on what to try next?

at the grub menu press<F5> and choose sysvinit.
This is a known problem with the new systemd. It should be resolved by applying On-Line Update.
Read other threads in these forums for more information.

eng-int: selecting sysvinit works only with straight disk partitions. My system is on raid1 (md0); I get

Error 17: Cannot mount selected partition

And I HAVE read the other threads… I still need a solution that works for a Linux system on raid1 (md0:sda2,sdb2) .

Sorry for not giving a direct suggestion, but I need to get a feel for your setup. It took me a long time, and thinking I had a bad drive, before I got my system working.

Are you confident your memory is OK?
What are the partitions and filesystems you are setting up? It seems strange that you only mention /dev/md0. Do you really only have one volume? Output from fdisk -l would help.

You cannot use the systemd on the DVDs, CDs, or repo-oss, only the version from the update supports RAID.
You cannot use btrfs on the boot partition.

NB You can use sysvinit and sysvinit-init from the a DVD or CD, instead of* systemd-sysvinit*.

My drives and memory have worked perfectly since I installed openSuse 11.4 last year, and work perfectly when booted with Upgrade, so they are not likely to be the cause of a problem. The output of fdisk -l is:

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x000e39f3

Device Boot Start End Blocks Id System
/dev/sda1 2048 33560575 16779264 82 Linux swap / Solaris
/dev/sda2 * 33560576 2930276351 1448357888 fd Linux raid autodetect

Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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: 0x00091e96

Device Boot Start End Blocks Id System
/dev/sdb1 2048 33560575 16779264 82 Linux swap / Solaris
/dev/sdb2 * 33560576 2930276351 1448357888 fd Linux raid autodetect

Disk /dev/sdd: 507 MB, 507510784 bytes
33 heads, 63 sectors/track, 476 cylinders, total 991232 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

Device Boot Start End Blocks Id System
/dev/sdd1 32 991231 495600 6 FAT16

The Linux raid autodetect correctly detects soft raid1 on /dev/md0 when booted from DVD -> Upgrade.
(/dev/sdd is the USB drive I used to transfer data from fdisk -l for this message.)

I had a similar problem with my RAID1 system. It seems that systemd has (had?) issues with mounting RAID1 volumes, some race condition IIRC. In my case it was unpredictable, sometimes it would mount, sometimes it would stop and ask for operator intervention. So I switched back to sysvinit and it worked fine.

Things to try:

add init=/sbin/sysvinit to the GRUB boot line
boot and mount the RAID using a rescue system, then reinstall GRUB in the MBR of both RAID1 component disks from the GRUB CLI

Yes, that is what I was trying to do with mdadm after booting the rescue system, but it doesn’t work here. It seems like they never really tested 12.1 with raid1…

On 2012-01-14 05:36, areed2 wrote:
> It seems like they never really
> tested 12.1 with raid1…

“They” is you.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

If you check out the Bugzilla reports the problems with soft raid and systemd were known. Both in openSuSE and Fedora.

For my part the systemd problems were so severe and multiduninous that most 12.1 testing was done using sysvinit. The decision to use systemd rather than improve init seems to have beem more of a political reaction to Canonical’s Upstart, rather than one of debated technical merit.

Two points vis á vis your installation:

  1. Using <F5>, and the GRUB edit is still using Systemd, albeit in “sysvinit mode”. To actually use *init * it is necessary to install sysvinit and sysvinit-init , instead of systemd-sysvinit.

  2. I asked for details about your filesystems and partitioning for a reason. I may not have been clear, as you did not answer what I meant. I had in 11.3 and 11.4 used a raid0 across two drives, with partitions and filesystems (reiserfs) for root,home,var created within that /dev/md0 With 12.1 I had to create multiple identical pairs of partitions, then make a raid for each filesystem from the pairs. I am sorry if I have not explained that well. I also do not know if that is still necessary since Systemd was updated, but I suspect it may be.

OK, thank you! I only had one raid filesystem (md0 for root, with mirrors sda2 and adb2) and so I already have made a raid for (each, there is only one raid filesystem, for root) from the pair. Trying to follow your guidance, I tried the following from the grub command line:

grub> find /sbin/sysvinit
(hd0,1)
(hd1,1)
grub> root (hd0,1)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
Checking if “/boot/grub/stage1” exists… no
Checking if “/grub/stage1” exists… no

So just giving /sbin/sysvinit as the argument to the most recent invocation of find does not do the trick (and I was silly to think it would.) What do I need to say to grub to use sysvinit and sysvinit-init?

You do not need to do anything with GRUB. You do need to install the
sysvinit-2.88±66.58.2.x86_64.rpm and
sysvinit-init-2.88±66.58.2.x86_64.rpm packages
from the DVD.

Yes. I’d like to try that, but how? Is there a way to get a command line after booting to Install? Or a way to mount my root filesystem (md0) after booting to Rescue?

areed2 wrote:
> Yes. I’d like to try that, but how?
>
I am guessing, because I have not replicated your problem, but …

You were able to install to md0 (but not boot to it), so frpm the DVD choose
Install >> Update. Then you can edit the software to install (you might need
to use the i]Details button. search for and choose the sysvinit
packages.