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

Rob Landley
2026-02-23T17:07:05Z

On 2/22/26 20:33, David Disseldorp wrote:
>> 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
>
> This seems like a helpful feature to me.

It was, but I want mkroot to at least be _able_ to build with vanilla
kernels, so couldn't depend on a feature upstream had abandoned.

The real problem isn't cpio, it's that the kernel interface for
statically linking a cpio into the kernel wants you to point it at a
directory of files for _it_ to cpio up, and when you do that you need
root access (or fakeroot) to mknod.

You used to be able to point it at one of those generated files (and
thus edit the file yourself to add the extra nodes), but that went away
the same time they broke the rest of the interface.

> Thanks, David

Rob