#1138519 grub-installer fails with /boot in partitioned RAID on non-EFI platform

#1138519#5
Date:
2026-05-31 10:03:12 UTC
From:
To:
When installing on PC BIOS platform with /boot in partitioned RAID (e.g.
/dev/md0p1), the execution of grub-install fails with the following
messages:

```
Running chroot /target grub-install --force "/dev/sda"
Installing for i386-pc platform.
grub-install : error: disk 'md0,1' not found.
error: Running 'grub-install --force "dev/sda"' failed
```

Manually mounting sysfs on /target/sys allows grub-install to run
successfully. The error does not happen on EFI platform because
grub-installer mounts sysfs in the target filesystem for efivarfs.

The obvious and trivial fix is to always mount sysfs in the target
system. I'll open a merge request.

Note: the error does not happen with /boot on unpartitioned RAID (e.g.
/dev/md0).

#1138519#10
Date:
2026-05-31 10:23:05 UTC
From:
To:
Control: tags -1 patch

<https://salsa.debian.org/installer-team/grub-installer/-/merge_requests/27>

#1138519#15
Date:
2026-05-31 21:30:28 UTC
From:
To:
Hello,

Bug #1138519 in grub-installer reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/installer-team/grub-installer/-/commit/b176843a1cad9a03c4b84d83451a6090d0125405
------------------------------------------------------------------------
Always mount sysfs in the target filesystem

grub-install needs sysfs not only for EFI but also when /boot is on
partitioned RAID (e.g. /dev/md0p1), so always mount it in the target
filesystem.

Additionnally, remove obsolete comment about update-grub adding a bogus
menu entry for UEFI firmware settings. Since GRUB 2.12, this entry is
now dynamically enabled or disabled at boot time.

Closes: #1138519
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1138519