2

After upgrading from Ubuntu 20.04 to Ubuntu 22.04 I go into an initramfs command line, where I see my RAID device but no partitions.

ls -l /dev/mapper/
total 0
crw------- 1 root root  10, 236 Nov 30 09:42 control
brw-rw---- 1 root disk 253,   0 Nov 30 09:40 isw_dbejgbheca_Volume0

Then I run kpartx -a /dev/mapper/isw_dbejgbheca_Volume0 and the partitions appear.

ls -l /dev/mapper/
total 0
crw------- 1 root root  10, 236 Nov 30 09:42 control
brw-rw---- 1 root disk 253,   0 Nov 30 09:40 isw_dbejgbheca_Volume0
lrwxrwxrwx 1 root root        7 Nov 30 09:42 isw_dbejgbheca_Volume0p1 -> ../dm-1
lrwxrwxrwx 1 root root        7 Nov 30 09:42 isw_dbejgbheca_Volume0p2 -> ../dm-2

i can now type exit and the computer will boot Ubuntu.

karel
  • 122,292
  • 133
  • 301
  • 332
Brunob
  • 21

4 Answers4

1

i upgraded my System on Intel Software Raid yesterday from XUbuntu 20.04 to XUbuntu 22.04 and it came out with the same issue wich you discoverd.

Personally i think it could be a bug in/with dmraid.

I tried different Ubuntu Life Systems (XUbuntu & Ubuntu Mate, 20.04, 18.04, 22.04 & 22.10).

I found out that with Live Systems based on Ubuntu 18.04 or 20.04 my RAID Partitions appear as expected after the boot and are accessible. But not with Live Systems based on 22.04 or 22.10. In this systems i need to run "sudo kpartx -a /dev/mapper/isw_ffiig8ggf_Volume0" in the Terminal. Only after that my RAID Partitions appear and where accessible. A Rescue System based on Porteus OS show also my RAID Partitions after boot, but with the mdadm tool.

I also noticed that the Program "mdadm" (multiple disk administration) seems to be no longer present in Ubuntu Live Versions up from 22.04. I could remember that this Package was installed (parallel to dmraid, i knew dmraid was in use because partitions where listed as /dev/mapper/isw_xxxxpx) on my XUbuntu 20.04 before the upgrade to 22.04. "dpkg -l" shows that this Package was no longer installed on my system after the upgrade. "apt-cache search" shows it as available. So i reinstalled this Package. Initramfs was updated automatic during installation process. Grub needs manual update via "sudo update-grub". "/etc/fstab" needs manual edit to set back to the UUID's of the partition's (some where listed as /dev/mapper/isw_xxxxpx).

After that changes my system starts now as expected. A check via lsbklid and blkid shows up that my system is now fully running on mdadm tool (Partitions shown as /dev/mdxxxpx) and no longer on dmraid.

Chris
  • 11
1

After upgrading from kubuntu 20.04 to 22.04 I am facing the same issue with dmraid. Does not enable RAID set automatically. On my PC there are two. After booting, using the command 'dmraid -ay' activates one RAID, but not the other. It is necessary to use the command 'kpartx -a' and then 'dmraid -ay'. There are no error messages and nothing in the logs.

0

Chris's answer didn't fix the problem in my Ubuntu 22.04.

I had to install mdadm package:

sudo apt install mdadm

During the installation grub and initramfs were updated both, my RAID was somehow converted to be managed by mdadm rather than dmraid. So, finally I successfully booted with my RAID activated and mounted at boot time.

David
  • 1
0

Bug report with patch: https://bugs.launchpad.net/ubuntu/+source/dmraid/+bug/2047303

initramfs needs to be regenerated after patch is applied (What does "regenerate your initramfs" mean?)

  • As stated in question, OS can be booted from the above point (initramfs shell) by manually detecting the partitions like via 'kpartx'.
  • If boot partition is encrypted, it must manually be unlocked before continuing
  • as stated above, type 'exit' to continue booting. Boot will succeed if nothing else is wrong and the encrypted volume was opened with the name the OS expects

Lots of posts over many years indicate that dmraid is awful/obsolete and should be replaced with mdadm without question. Take great care in attempting to retrofit an existing installation. The two technologies use completely different naming schemes for devices and the references will need to be updated. I've not yet come across end-to-end instructions that work and I've spent many hours re-learning how to recover my boot partition after mdadm was unexpectedly installed.