From: David Disseldorp <ddiss@suse.de>
To: Askar Safin <safinaskar@gmail.com>
Cc: linux-fsdevel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>,
Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
Randy Dunlap <rdunlap@infradead.org>,
linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
initramfs@vger.kernel.org, Rob Landley <rob@landley.net>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>,
patches@lists.linux.dev
Subject: Re: [PATCH 1/2] init: ensure that /dev/console is (nearly) always available in initramfs
Date: Fri, 20 Feb 2026 10:59:13 +1100 [thread overview]
Message-ID: <20260220105913.4b62e124.ddiss@suse.de> (raw)
In-Reply-To: <20260219210312.3468980-2-safinaskar@gmail.com>
On Thu, 19 Feb 2026 21:03:11 +0000, Askar Safin wrote:
> If we generate external initramfs as normal user using "cpio"
> command, then we cannot put /dev/console there.
>
> Fortunately, in this case default builtin initramfs will
> contain /dev/console (before this commit).
>
> But if we generate builtin initramfs instead, then we will
> not have /dev/console at all. Thus the kernel will be unable to
> open /dev/console, and PID 1 will have stdin, stdout and stderr
> closed.
>
> This problem can be solved by using gen_init_cpio.
>
> 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.
Thanks, David
next prev parent reply other threads:[~2026-02-19 23:59 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 (nearly) always available in initramfs 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 [this message]
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
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=20260220105913.4b62e124.ddiss@suse.de \
--to=ddiss@suse.de \
--cc=brauner@kernel.org \
--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=rob@landley.net \
--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