Re: [PATCH 1/2] init: ensure that /dev/console is (nearly) always available in initramfs

From: Rob Landley

Date: Sun Feb 22 2026 - 21:43:33 EST


On 2/19/26 17:59, David Disseldorp wrote:
This problem can be solved by using gen_init_cpio.

It used to work, then they broke it. (See below.)

But I think that proper solution is to ensure that /dev/console
is always available, no matter what. This is quality-of-implementation
feature. This will reduce number of possible failure modes. And
this will make easier for developers to get early boot right.
(Early boot issues are very hard to debug.)

I'd prefer not to go down this path:
- I think it's reasonable to expect that users who override the default
internal initramfs know what they're doing WRT /dev/console creation.
- initramfs can be made up of concatenated cpio archives, so tools which
insist on using GNU cpio and run into mknod EPERM issues could append
the nodes via gen_init_cpio, while continuing to use GNU cpio for
everything else.

Who said anything about gnu? Busybox has a cpio, toybox has a cpio... once upon a time it was a posix command, removed from the standard for the same reason tar was removed, and that was just as widely ignored.

It's an archive format. There are tools that create that archive format from a directory.

The kernel itself had a fairly generic one one built-in, which you _could_ use to create cpio archives with /dev/console as a regular user... until the kernel guys decided to break it. I carried a patch to fix that for a little while myself:

https://landley.net/bin/mkroot/0.8.10/linux-patches/0011-gen_init_cpio-regression.patch

But I just got tired of fighting lkml.

Thanks, David

Rob