public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Askar Safin <safinaskar@gmail.com>
To: David Disseldorp <ddiss@suse.de>
Cc: brauner@kernel.org, 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, rob@landley.net,
	 viro@zeniv.linux.org.uk
Subject: Re: [PATCH 1/2] init: ensure that /dev/console is (nearly) always available in initramfs
Date: Tue, 24 Feb 2026 00:41:07 +0300	[thread overview]
Message-ID: <CAPnZJGC0kHEmAqHeTXwbcmuA0GqEOhDmCfjLRPRKff5DsEgW6w@mail.gmail.com> (raw)
In-Reply-To: <20260223121946.45b3c5b1.ddiss@suse.de>

On Mon, Feb 23, 2026 at 4:20 AM David Disseldorp <ddiss@suse.de> wrote:
> There are still other options:
> - use a different initramfs archiving tool

I'm trying to solve Rob's use case. He tries to write a tool for building
kernel and rootfs called "mkroot". The tool is written in pure shell
without any C. It should not have any external dependencies.
So it cannot depend on a custom cpio tool. The only cpio tools
allowed are gen_init_cpio and whatever cpio is present on the system.

> - point GNU cpio at an existing /dev/console

This will not work if we are inside some container, such as docker.
Container engines usually replace /dev/console with something else.

> or call mknod as root

mkroot should work as normal user

> I remain unconvinced

I still believe in my approach.

According to current kernel logic, /dev/console
magically works if you use external initramfs and doesn't work
if you use internal initramfs. I simply propose to make internal
initramfs work, too.

> To me it still feels like a workaround for GNU
> cpio's poor archive-contents-must-exist-locally interface.

I will repeat: mkroot should work not only with GNU cpio,
but with whatever cpio is present on the system.

So we should either fix *all* cpio implementations, or
fix the kernel. Obviously the second option is easier.

-- 
Askar Safin

  reply	other threads:[~2026-02-23 21:41 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
2026-02-20 19:11     ` Askar Safin
2026-02-23  1:19       ` David Disseldorp
2026-02-23 21:41         ` Askar Safin [this message]
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=CAPnZJGC0kHEmAqHeTXwbcmuA0GqEOhDmCfjLRPRKff5DsEgW6w@mail.gmail.com \
    --to=safinaskar@gmail.com \
    --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=rob@landley.net \
    --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