How to make my motherboard recognise my mdadm RAID1 ESP?

I had a working system which used a software RAID1 ESP before and it all worked fine.
Just recently, I decided to upgrade my motherboard to a ROG Crosshair VII Dark Hero, and somehow it just doesn’t find a bootable ESP and keeps getting into UEFI BIOS directly.
What I have tried so far:

  1. Upgrading the BIOS to the latest version.
  2. Disable secure boot using this and this method.
  3. Enable launching CSM

I can boot with a Live environment so the computer is working fine. I also check the RAID status and even chroot to my system and everything seems to be there.
Could someone please enlighten me what made my previous motherboard see my mdadm RAID1 ESP, while this motherboard doesn’t?

Here's my system info (from a Live environment)
inxi -Fazy
  Kernel: 6.1.38-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=en_US keytable=us tz=UTC
    misobasedir=manjaro misolabel=MANJARO_KDE_ quiet systemd.show_status=1
    splash driver=nonfree nouveau.modeset=0 i915.modeset=1 radeon.modeset=1
  Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
    serial: <superuser required> UEFI: American Megatrends v: 4501
    date: 04/19/2023
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse serial: <filter>
    charge: 55% (should be ignored) rechargeable: yes status: discharging
  Device-2: hidpp_battery_1 model: Logitech Wireless Keyboard
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
  Info: model: AMD Ryzen 7 5800X bits: 64 type: MT MCP arch: Zen 3+ gen: 4
    level: v3 note: check built: 2022 process: TSMC n6 (7nm) family: 0x19 (25)
    model-id: 0x21 (33) stepping: 0 microcode: 0xA201025
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB L3: 32 MiB
    desc: 1x32 MiB
  Speed (MHz): avg: 2400 high: 3800 min/max: 2200/4850 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 2200 2: 2200
    3: 2200 4: 2200 5: 2200 6: 2200 7: 3800 8: 2200 9: 2200 10: 2200 11: 2200
    12: 2200 13: 2200 14: 3800 15: 2200 16: 2200 bogomips: 121660
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
  Device-1: NVIDIA AD102 [GeForce RTX 4090] vendor: Micro-Star MSI
    driver: nvidia v: 535.54.03 alternate: nouveau,nvidia_drm non-free: 535.xx+
    status: current (as of 2023-07) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022-23+ pcie: gen: 4 speed: 16 GT/s
    lanes: 16 bus-ID: 0b:00.0 chip-ID: 10de:2684 class-ID: 0300
  Device-2: Logitech Webcam C930e driver: snd-usb-audio,uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 5-4:2 chip-ID: 046d:0843
    class-ID: 0102 serial: <filter>
  Display: x11 server: X.Org v: 21.1.8 compositor: kwin_x11 driver: X:
    loaded: nvidia gpu: nvidia display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 159 s-size: 613x352mm (24.13x13.86")
    s-diag: 707mm (27.83")
  Monitor-1: DP-0 res: 3840x2160 hz: 60 dpi: 161
    size: 607x345mm (23.9x13.58") diag: 698mm (27.49") modes: N/A
  API: OpenGL v: 4.6.0 NVIDIA 535.54.03 renderer: NVIDIA GeForce RTX
    4090/PCIe/SSE2 direct-render: Yes
  Device-1: NVIDIA AD102 High Definition Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 0b:00.1 chip-ID: 10de:22ba class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 0d:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: Logitech Webcam C930e driver: snd-usb-audio,uvcvideo type: USB
    rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 5-4:2 chip-ID: 046d:0843
    class-ID: 0102 serial: <filter>
  API: ALSA v: k6.1.38-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.74 status: off with: pipewire-media-session
    status: active tools: pw-cli
  Server-3: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
  Device-1: Realtek RTL8125 2.5GbE vendor: ASUSTeK driver: r8169 v: kernel
    pcie: gen: 2 speed: 5 GT/s lanes: 1 port: e000 bus-ID: 05:00.0
    chip-ID: 10ec:8125 class-ID: 0200
  IF: enp5s0 state: down mac: <filter>
  Device-2: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 06:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: enp6s0 state: down mac: <filter>
  Device-3: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 07:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp7s0 state: up mac: <filter>
  Device-1: Intel AX200 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-6:6 chip-ID: 8087:0029
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
  Supported mdraid levels: raid1
  Device-1: md127 maj-min: 9:127 type: mdraid level: mirror status: active
    size: 513.9 MiB
  Info: report: 2/2 UU blocks: 526272 chunk-size: N/A super-blocks: 1.0
  Components: Online:
  0: nvme0n1p1 maj-min: 259:2 size: 514 MiB
  1: nvme1n1p1 maj-min: 259:5 size: 514 MiB
  Local Storage: total: raw: 4.1 TiB usable: 4.1 TiB used: 0 KiB (0.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Corsair model: Force MP600
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: EGFM13.0 temp: 39.9 C
    scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:1 vendor: Corsair model: Force MP600
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: EGFM13.0 temp: 33.9 C
    scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 EVO 500GB
    size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: 1B6Q scheme: GPT
  ID-4: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST2000DX002-2DV164
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 7200 serial: <filter> fw-rev: CC41 scheme: GPT
  ID-5: /dev/sdc maj-min: 8:32 model: General USB Flash Disk size: 7.47 GiB
    block-size: physical: 512 B logical: 512 B type: USB rev: 2.0 spd: 480 Mb/s
    lanes: 1 mode: 2.0 tech: SSD serial: <filter> fw-rev: 1100 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
  Message: No partition data found.
  Alert: No swap data was found.
  System Temperatures: cpu: 47.0 C mobo: 31.0 C gpu: nvidia temp: 36 C
  Fan Speeds (RPM): cpu: 0 gpu: nvidia fan: 0%
  Processes: 349 Uptime: 18m wakeups: 5 Memory: total: 64 GiB note: est.
  available: 62.71 GiB used: 5.34 GiB (8.5%) Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.1.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 1233 libs: 339 tools: pamac pm: flatpak pkgs: 0
  Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.28
sudo mdadm --detail --scan
ARRAY /dev/md/ESP metadata=1.0 name=manjaro:ESP UUID=01c24946:3a3b9ed0:8c04c262:e41a3375
cat /proc/mdstat
Personalities : [raid1] 
md127 : active raid1 nvme1n1p1[1] nvme0n1p1[0]
      526272 blocks super 1.0 [2/2] [UU]
unused devices: <none>
loop0           7:0    0  67.8M  1 loop  /run/miso/sfs/livefs
loop1           7:1    0 864.9M  1 loop  /run/miso/sfs/mhwdfs
loop2           7:2    0   1.6G  1 loop  /run/miso/sfs/desktopfs
loop3           7:3    0 783.3M  1 loop  /run/miso/sfs/rootfs
sda             8:0    0 465.8G  0 disk  
├─sda1          8:1    0 465.8G  0 part  
└─sda9          8:9    0     8M  0 part  
sdb             8:16   0   1.8T  0 disk  
├─sdb1          8:17   0   1.8T  0 part  
└─sdb9          8:25   0     8M  0 part  
sdc             8:32   1   7.5G  0 disk  
├─sdc1          8:33   1   7.4G  0 part  
│ └─ventoy    254:0    0   3.4G  1 dm    /run/miso/bootmnt
└─sdc2          8:34   1    32M  0 part  
nvme0n1       259:0    0 931.5G  0 disk  
├─nvme0n1p1   259:2    0   514M  0 part  
│ └─md127       9:127  0 513.9M  0 raid1 
│   └─md127p1 259:8    0 512.9M  0 part  
├─nvme0n1p2   259:3    0    36G  0 part  
└─nvme0n1p3   259:4    0   895G  0 part  
nvme1n1       259:1    0 931.5G  0 disk  
├─nvme1n1p1   259:5    0   514M  0 part  
│ └─md127       9:127  0 513.9M  0 raid1 
│   └─md127p1 259:8    0 512.9M  0 part  
├─nvme1n1p2   259:6    0    36G  0 part  
└─nvme1n1p3   259:7    0   895G  0 part

Let me know if you need any other information.

Was it enabled before? If not, disable it.

It was disabled by default. I tried both enable and disable it, but none of them make my motherboard recognise my RAID1 ESP.

Did the UUID of the array change?

That’s most likely because you are missing the UEFI-Boot entries in your NVRAM…
You are confusing the fact of being able to recognize a partition and having boot entries automatically added to your UEFI-Boot menu…

Software raid is only supported by, as the name implies, by the software you run. :wink:
So your UEFI-BIOS needs to find and boot your kernel etc before that RAID1 gets activated.

Because your ESP resides inside a RAID, the partition the UEFI-BIOS sees has a different GUID and thus doesn’t automatically look inside that raid partition.

I think a simple fix would be to manually create the UEFI-Boot entry to boot your kernel from one of the RAID1 partitions, which was most likely the case in your other motherboard also…
See: man efibootmgr

  • Standard RAID levels - Wikipedia
    RAID 1 consists of an exact copy (or mirror) of a set of data on two or more disks; a classic RAID 1 mirrored pair contains two disks. This configuration offers no parity, striping, or spanning of disk space across multiple disks, since the data is mirrored on all disks belonging to the array, and the array can only be as big as the smallest member disk. This layout is useful when read performance or reliability is more important than write performance or the resulting data storage capacity
1 Like

From what I can tell, they seems to be the same.

sudo mdadm --detail --scan
ARRAY /dev/md/ESP metadata=1.0 name=manjaro:ESP UUID=01c24946:3a3b9ed0:8c04c262:e41a3375

Here’s the content of my system’s /etc/mdadm.conf

cat /mnt/etc/mdadm.conf
# mdadm configuration file
# mdadm will function properly without the use of a configuration file,
# but this file is useful for keeping track of arrays and member disks.
# In general, a mdadm.conf file is created, and updated, after arrays
# are created. This is the opposite behavior of /etc/raidtab which is
# created prior to array construction.
# the config file takes two types of lines:
#       DEVICE lines specify a list of devices of where to look for
#         potential member disks
#       ARRAY lines specify information about how to identify arrays so
#         so that they can be activated

# You can have more than one device line and use wild cards. The first 
# example includes SCSI the first partition of SCSI disks /dev/sdb,
# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second 
# line looks for array slices on IDE disks.
#DEVICE /dev/sd[bcdjkl]1
#DEVICE /dev/hda1 /dev/hdb1
# The designation "partitions" will scan all partitions found in
# /proc/partitions
DEVICE partitions

# ARRAY lines specify an array to assemble and a method of identification.
# Arrays can currently be identified by using a UUID, superblock minor number,
# or a listing of devices.
#       super-minor is usually the minor number of the metadevice
#       UUID is the Universally Unique Identifier for the array
# Each can be obtained using
#       mdadm -D <md>
# To capture the UUIDs for all your RAID arrays to this file, run these:
#    to get a list of running arrays:
#    # mdadm -D --scan >>/etc/mdadm.conf
#    to get a list from superblocks:
#    # mdadm -E --scan >>/etc/mdadm.conf
#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
#ARRAY /dev/md1 super-minor=1
#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
# ARRAY lines can also specify a "spare-group" for each array.  mdadm --monitor
# will then move a spare between arrays in a spare-group if one array has a
# failed drive but no spare
#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1

# When used in --follow (aka --monitor) mode, mdadm needs a
# mail address and/or a program.  To start mdadm's monitor mode, enable
# mdadm.service in systemd.
# If the lines are not found, mdadm will exit quietly
#MAILADDR root@mydomain.tld
#PROGRAM /usr/sbin/handle-mdadm-events

ARRAY /dev/md/ESP metadata=1.0 name=manjaro:ESP UUID=01c24946:3a3b9ed0:8c04c262:e41a3375
ls -la /dev/disk/by-uuid
total 0
drwxr-xr-x 2 root root 240 Jul 20 19:55 .
drwxr-xr-x 9 root root 180 Jul 20 19:50 ..
lrwxrwxrwx 1 root root  10 Jul 20 19:54 10262887313273172817 -> ../../sda1
lrwxrwxrwx 1 root root  15 Jul 20 19:54 13624618218333500037 -> ../../nvme1n1p3
lrwxrwxrwx 1 root root  13 Jul 20 19:51 1A66-24E1 -> ../../md127p1
lrwxrwxrwx 1 root root  10 Jul 20 19:51 1E1C-88C8 -> ../../sdc2
lrwxrwxrwx 1 root root  10 Jul 20 19:51 2023-07-17-12-18-11-00 -> ../../dm-0
lrwxrwxrwx 1 root root  13 Jul 20 19:51 2689313864301164779 -> ../../nvme1n1
lrwxrwxrwx 1 root root  10 Jul 20 19:55 4458641091262605652 -> ../../sdb1
lrwxrwxrwx 1 root root  10 Jul 20 19:51 4E21-0000 -> ../../sdc1
lrwxrwxrwx 1 root root  15 Jul 20 19:51 953b078f-9c44-4da8-9201-8b8133b66e9f -> ../../nvme1n1p2
lrwxrwxrwx 1 root root  15 Jul 20 19:51 a1e97d3c-3312-47ce-9a09-86f53474ac1d -> ../../nvme0n1p2

Here’s my system’s fstab, which uses the same UUID for ESP

cat /mnt/etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system>                            <dir> <type> <options> <dump> <pass>
UUID=1A66-24E1                             /boot vfat   defaults  0      0
UUID=a1e97d3c-3312-47ce-9a09-86f53474ac1d  none  swap   defaults  0      0
UUID=953b078f-9c44-4da8-9201-8b8133b66e9f  none  swap   defaults  0      0

Thanks for the information. Seems to be a possible direction.
I don’t remember I did anything for my previous motherboard to create a UEFI-boot entry.
I use systemd-boot as a boot loader, and I have the boot entry resides in my ESP as the following content. Not sure if this is the boot entry you talked about?

ls -la /mnt/boot/loader/entries
total 20
drwxr-xr-x 2 root root 4096 Dec 26  2022 .
drwxr-xr-x 3 root root 4096 Jul 15 01:11 ..
-rwxr-xr-x 1 root root  288 Jul 10 12:47 manjarolinux6.1.conf
-rwxr-xr-x 1 root root  278 Jul 10 12:47 manjarolinux6.1-fallback.conf
-rwxr-xr-x 1 root root   52 Dec 21  2022 memtest86-efi.conf
cat /mnt/boot/loader/entries/manjarolinux6.1.conf
title   Manjaro Linux 6.1
linux   /vmlinuz-6.1-x86_64
initrd  /amd-ucode.img
initrd  /intel-ucode.img
initrd  /initramfs-6.1-x86_64.img
options zfs=zroot/manjaro/root rw resume=UUID=a1e97d3c-3312-47ce-9a09-86f53474ac1d amd_pstate=passive bootsplash.bootfile=bootsplash-themes/manjaro/bootsplash

I read the UEFI ArchWiki, and it seems that I can use something like

sudo efibootmgr --create --disk /dev/nvme0n1p1 --loader /EFI/systemd/systemd-bootx64.efi --label "Systemd Boot Manager" --unicode

to create a UEFI boot entry. Will it be stored in the efivarfs?
My ESP is composited of /dev/nvme0n1p1 and /dev/nvme1n1p1, so assigning any of them should work I guess. Please let me know if this concept work before I execute something stupid.
Appreciated for your help.

Correct, except the last option --unicode is not needed because you don’t provide any extra args to sd-boot :wink:
Worst case scenario would be that that-entry won’t boot your system, but can’t hurt…
(I actually predict it will work perfectly :wink: )

Make sure to mount the ESP at /efi or /boot/efi before running efibootmgr
Unless you actually mount the ESP at /boot

Take note that it probably won’t work if you have SecureBoot enabled in your UEFI-BIOS for obvious reasons…
Unless you work around it by using a signed shim and renaming the sd-boot…

I mounted everything under /mnt, and then chroot and executed:

efibootmgr --create --disk /dev/nvme0n1p1 --loader /EFI/systemd/systemd-bootx64.efi --label "Systemd Boot Manager"

I’m sure that it was successfully added

BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0000,0001,0002
Boot0000* Systemd Boot Manager  HD(1,GPT,a643a519-3061-495e-90ee-b691d8862544,0x800,0x101000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot0001* UEFI: General USB Flash Disk 1100, Partition 1        PciRoot(0x0)/Pci(0x1,0x2)/Pci(0x0,0x0)/Pci(0x8,0x0)/Pci(0x0,0x3)/USB(4,0)/HD(1,MBR,0x4660ab80,0x800,0xee1000)0000424f
Boot0002* UEFI: General USB Flash Disk 1100, Partition 2        PciRoot(0x0)/Pci(0x1,0x2)/Pci(0x0,0x0)/Pci(0x8,0x0)/Pci(0x0,0x3)/USB(4,0)/HD(2,MBR,0x4660ab80,0xee1800,0x10000)0000424f

However, it still enter UEFI BIOS directly. Couldn’t boot into the system.
I enter the Live Environment again, and executed efibootmgr, and my UEFI boot entry was gone.

sudo efibootmgr
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0001,0002
Boot0001* UEFI: General USB Flash Disk 1100, Partition 1        PciRoot(0x0)/Pci(0x1,0x2)/Pci(0x0,0x0)/Pci(0x8,0x0)/Pci(0x0,0x3)/USB(4,0)/HD(1,MBR,0x4660ab80,0x800,0xee1000)0000424f
Boot0002* UEFI: General USB Flash Disk 1100, Partition 2        PciRoot(0x0)/Pci(0x1,0x2)/Pci(0x0,0x0)/Pci(0x8,0x0)/Pci(0x0,0x3)/USB(4,0)/HD(2,MBR,0x4660ab80,0xee1800,0x10000)0000424f

I also try disabled fast boot, clear all the keys from the BIOS, but none of them worked.
I also tried to use the Live USB to detect the boot loader:

When trying to boot with them, it just kept giving me something like:

error: not a valid root device
Press any key to continue

PS: my ESP is mounted at /boot.

Here's my efivar if it helps

Turning out the solution seems to be fairly simple. I just recalled that the same situation happened last time with my old motherboard after updating the BIOS. I solved it by chroot to my system in the Live environment and reinstall the boot loader with

bootctl install

So I did it again this time, and it finally make my computer boot directly to my system!!
Appreciated for everyone’s reply.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.