Re: [PATCH v3] init/main.c: add warning when file specified in rdinit is inaccessible
From: Lillian Berry
Date: Tue Oct 07 2025 - 23:30:54 EST
Hi,
On Tue, Oct 7, 2025, at 10:57 AM, Ahmad Fatoum wrote:
> On 7/7/25 11:14 AM, Lillian Berry wrote:
>> Avoid silently ignoring the initramfs when the file specified in rdinit
>> is not usable. This prints an error that clearly explains the issue
>> (file was not found, vs initramfs was not found).
>
> I have a system that works just fine without an initramfs, but now the
> kernel warns me about it:
>
> [ 2.805602] check access for rdinit=/init failed: -2, ignoring
>
> I suppose that's unintended and the code here should actually check that
> there is an initrd at all before checking for the rdinit?
This isn't directly unintended. This message informs the user their
specified rdinit= binary was not able to run, regardless of the reason.
It would be good to check presence of initrd and print a more specific
message such as "rdinit=/init specified but no initrd present".
Kindly,
Lillian