From: Rob Landley <rob@landley.net>
To: Askar Safin <safinaskar@gmail.com>
Cc: brauner@kernel.org, ddiss@suse.de, initramfs@vger.kernel.org,
jack@suse.cz, linux-fsdevel@vger.kernel.org,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
nathan@kernel.org, nsc@kernel.org, patches@lists.linux.dev,
rdunlap@infradead.org, viro@zeniv.linux.org.uk
Subject: Re: [PATCH 1/2] init: ensure that /dev/console is (nearly) always available in initramfs
Date: Mon, 23 Feb 2026 13:45:25 -0600 [thread overview]
Message-ID: <258dbf49-c034-4e5d-b912-5723c7a68361@landley.net> (raw)
In-Reply-To: <20260223173443.327797-1-safinaskar@gmail.com>
On 2/23/26 11:34, Askar Safin wrote:
> Rob Landley <rob@landley.net>:
>> The real problem isn't cpio, it's that the kernel interface
>
> So there is some bug here?
>
> Then, please, describe properly this bug.
>
> I. e. using usual formula "steps to reproduce - what I got - what I expected to see".
I think that the kernel special case creating files in initramfs is the
wrong design approach, but it would address the problem and it's what
the kernel already did in a different codepath.
> Also, does the kernel broke *documented* feature? If indeed some
> *documented* feature doesn't work, then this is indeed very real bug.
Documentation/filesystems/ramfs-rootfs-initramfs.txt section "populating
initramfs" described using the text file format back in 2005
(https://github.com/mpe/linux-fullhistory/commit/7f46a240b0a1 line 135)
and then commit
https://github.com/mpe/linux-fullhistory/commit/99aef427e206f a year
later described running usr/gen_init_cpio to create those files from a
directory to give you an easy starting point to edit.
But I wrote that documentation, so it probably doesn't count.
> I kindly ask you, please, please, describe this bug. I really want
> to help you.
Back when the gen_init_cpio stuff let you create the file and consume
the file separately so you could edit it in between, there was an easy
way to address this problem by creating a cpio containing /dev/console
as a regular user using the kernel plumbing. Then the kernel broke that
and created a regression, which they decided to fix with special case
code doing mknod within the kernel before launching PID 1, but only for
one of two codepaths.
I think adding the special case hack to the other codepath is the wrong
_WAY_ to fix it... but I guess that ship has sailed. I agree doing that
can avoid the "init has no stdin/stdout/stderr" problem and thus address
the issue.
(I still think if you have a CONFIG_DEVTMPFS_MOUNT config symbol, it
should actually work, but that's a somewhat separate issue and a
half-dozen patches ignored by linux-kernel for a decade now apparently
argue otherwise...)
Rob
next prev parent reply other threads:[~2026-02-23 19:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 21:03 [PATCH 0/2] init: ensure that /dev/console and /dev/null are " Askar Safin
2026-02-19 21:03 ` [PATCH 1/2] init: ensure that /dev/console is " Askar Safin
2026-02-19 23:59 ` David Disseldorp
2026-02-20 19:11 ` Askar Safin
2026-02-23 1:19 ` David Disseldorp
2026-02-23 21:41 ` Askar Safin
2026-02-23 1:27 ` Rob Landley
2026-02-23 2:33 ` David Disseldorp
2026-02-23 16:11 ` Rob Landley
2026-02-23 17:34 ` Askar Safin
2026-02-23 19:45 ` Rob Landley [this message]
2026-02-23 23:04 ` Askar Safin
2026-02-19 21:03 ` [PATCH 2/2] init: ensure that /dev/null " Askar Safin
2026-02-20 0:26 ` David Disseldorp
2026-02-21 0:16 ` Askar Safin
2026-02-23 1:15 ` Rob Landley
2026-02-23 21:18 ` Askar Safin
2026-02-23 0:17 ` [PATCH 0/2] init: ensure that /dev/console and /dev/null are " Rob Landley
2026-02-23 20:58 ` Askar Safin
2026-02-24 19:02 ` Rob Landley
2026-03-07 3:22 ` Askar Safin
2026-03-10 12:51 ` Rob Landley
2026-03-23 3:47 ` Askar Safin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=258dbf49-c034-4e5d-b912-5723c7a68361@landley.net \
--to=rob@landley.net \
--cc=brauner@kernel.org \
--cc=ddiss@suse.de \
--cc=initramfs@vger.kernel.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=patches@lists.linux.dev \
--cc=rdunlap@infradead.org \
--cc=safinaskar@gmail.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®