Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903988 - genkernel initrd failing to boot if root is on degraded MD-RAID
Summary: genkernel initrd failing to boot if root is on degraded MD-RAID
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL: https://forums.gentoo.org/viewtopic-p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-07 20:59 UTC by Rainer Meier
Modified: 2023-04-10 19:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Meier 2023-04-07 20:59:31 UTC
When using genkernel to build an initrd this initrd is unable to assemble MDRAID in degraded mode.

So if one of the disks in an MD RAID fail the system will be unable to boot as the array is initialized as "inactive" and there is no option to allow degraded boot.

On other distributions like Ubuntu it supports bootdegraded=true or similar kernel options to allow booting with degraded arrays. With genkernel initrd there seems to be no such option.

The topic was discussed on the forum: https://forums.gentoo.org/viewtopic-p-8785407.html

Dracut seems to work fine if rd.auto=1 is used and it seems to wait for rd.retry=X seconds until it continues with degraded array.

The only option with initrd of genkernel seems to be to enter recovery shell and manually activate arrays (mdadm --run /dev/mdXX) which is requiring manual console access to get the machine booted again.

Reproducible: Always

Steps to Reproduce:
1. Build system with root on md-raid (tested on RAID-1)
2. generate kernel using "genkernel all" and MDADM=yes option including domdadm boot option
3. Remove one of the disks part of the md-raid hosting the root filesystem
4. (Re)boot system
Actual Results:  
The system is unable to boot. It will fail to mount the root device:

Determining root device (trying UUID=xxxxx) ......
!! Block device UUID=xxxxx is not a valid root device ...
!! Could not find the root block device in UUID=xxxxx
!! Please specify another value or:
!! - press Enmter for the same
!! - type"shell" for a shell
!! - type "q" to skip ... 


Expected Results:  
System either automatically assembling RAID in degraded mode (eventually after re-scan timeout) or providing at least an boot option to allow assembling arrays in degraded mode like bootdegraded=true.

Currently the behavior of genkernel initrd is causing the exact opposite of redundancy to take place. If any of the involved drives is failing during reboot or BIOS initialization the system will immediately stop booting and there is no automatic way to recover as the system will sit in recovery mode forever until local manual intervention.