[Git-commits] [grml/grml-rescueboot] 35e968: Fix booting from mdadm raid.
Michael Prokop
noreply at github.com
Mon Dec 20 17:21:04 CET 2021
Branch: refs/heads/master
Home: https://github.com/grml/grml-rescueboot
Commit: 35e968ccac91c57e1f0353804621e048adbab5ee
https://github.com/grml/grml-rescueboot/commit/35e968ccac91c57e1f0353804621e048adbab5ee
Author: sgf <sgf.dma at gmail.com>
Date: 2021-12-17 (Fri, 17 Dec 2021)
Changed paths:
M 42_grml
Log Message:
-----------
Fix booting from mdadm raid.
Use full name ('hostname:name') of md array in 'live-media=', because
initramfs starts with empty hostname and arrays are assembled with full
name.
Commit: 443ca4cf0d4bb4f20593c522ae05a83fc98d49ae
https://github.com/grml/grml-rescueboot/commit/443ca4cf0d4bb4f20593c522ae05a83fc98d49ae
Author: Michael Prokop <mika at grml.org>
Date: 2021-12-20 (Mon, 20 Dec 2021)
Changed paths:
M 42_grml
Log Message:
-----------
Merge remote-tracking branch 'origin/github/pr/11'
Quoting sgf-dma from https://github.com/grml/grml-rescueboot/pull/11:
| As subject states, grml can't boot from (local) mdadm raid.
|
| The reason is simple: because hostname in initramfs (it's empty) does
| not match with the hostname of installed system, mdadm assembles arrays
| with different names, and there's no md device, which 42_grub has added
| to live-media=. E.g. when installed system has /dev/md/0 and hostname
| "debian11", mdadm from initramfs creates /dev/md126 and symlink
| /dev/md/debian11:0, but neither of them matches with /dev/md0 added into
| live-media= by 42_grub.
|
| I've tried (too) many workarounds, but none of them worked:
|
| * adding live-media= to CUSTOM_BOOTOPTIONS does not work, because
| 42_grub creates another one and effectively overwrites it.
|
| * ip= and (grml's) hostname= kernel command-line option works too late,
| after mountroot stage at which initrd tries to assemble raid, so can't
| help.
|
| * Neither works md= kernel option, which seems used for older mdadm
| metadata formats and now ignored completely.
|
| * Nor (surprisingly) adding fixed mdadm.conf (with HOMEHOST <ignore> or
| HOMEHOST real_hostname) to initramfs. This one because with boot=live
| initramfs deletes mdadm.conf (in check_dev() function from
| lib/live/boot/9990-misc-helpers.sh) before calling to
| scripts/local-block/mdadm (well, the reason is explained there and
| seems reasonable).
|
| So, patching 42_grub seems the only way.
|
| There're probably two ways of fixing this: allowing to overwrite
| live-media= in CUSTOM_BOOTOPTIONS or just fixing autodetected mdadm
| array name. Here is implementation of the second one.
Compare: https://github.com/grml/grml-rescueboot/compare/27562cfcaba8...443ca4cf0d4b
More information about the Git-commits
mailing list