From: Stefan Berger <stefanb@linux.ibm.com>
To: Rob Landley <rob@landley.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH 5/5] fix rootfstype=tmpfs
Date: Wed, 1 Nov 2023 09:10:28 -0400 [thread overview]
Message-ID: <f9d57ae7-6dd6-4854-b9cf-1eec4cfa2a92@linux.ibm.com> (raw)
In-Reply-To: <8244c75f-445e-b15b-9dbf-266e7ca666e2@landley.net>
On 2/21/23 16:04, Rob Landley wrote:
> Wire up rootfstype=tmpfs to force rootfs to be tmpfs even when you specify root=
>
> Initramfs automatically uses tmpfs (if available) when you DON'T specify a
> root= fallback root to mount over initramfs, but some people can't NOT do
> that for some reason (old bootloaders), so let rootfstype=tmpfs override it.
>
> My original code tried to do this 10 years ago but got the test wrong,
> and nobody's corrected it since, so here you go...
>
> Signed-off-by: Rob Landley <rob@landley.net>
I would like to be able to have this for some work with OpenBMC and
ideally it would propagate to one of the recent kernels with a Fixes tag
like this?
Fixes: 6e19eded3684 ("initmpfs: use initramfs if rootfstype= or root=
specified")
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
>
> See https://lkml.iu.edu/hypermail/linux/kernel/2207.3/06939.html
> ---
> init/do_mounts.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index 811e94daf0a8..01d80fb828fd 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -665,7 +665,7 @@ struct file_system_type rootfs_fs_type = {
>
> void __init init_rootfs(void)
> {
> - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] &&
> - (!root_fs_names || strstr(root_fs_names, "tmpfs")))
> + if (IS_ENABLED(CONFIG_TMPFS) && (!root_fs_names ? !saved_root_name[0] :
> + !!strstr(root_fs_names, "tmpfs")))
> is_tmpfs = true;
> }
next prev parent reply other threads:[~2023-11-01 13:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 20:53 [PATCH 0/5] Patches used to build mkroot Rob Landley
2023-02-21 20:55 ` [PATCH 1/5] try generic compiler name "cc" before falling back to "gcc" Rob Landley
2023-02-23 5:31 ` Masahiro Yamada
2023-02-23 13:50 ` Rob Landley
2023-02-24 0:27 ` Masahiro Yamada
2023-02-21 20:56 ` [PATCH 2/5] X86-64 should not uniquely require a third ELF package to build Rob Landley
2023-02-21 23:12 ` Thomas Gleixner
2023-02-22 18:14 ` Rob Landley
2023-02-22 18:41 ` Thomas Gleixner
2023-02-21 20:57 ` [PATCH 3/5] Wire up CONFIG_DEVTMPFS_MOUNT to initramfs Rob Landley
2023-02-21 21:00 ` [PATCH 4/5] Replace timeconst.bc with mktimeconst.c Rob Landley
2023-02-21 23:53 ` Thomas Gleixner
2023-02-22 22:52 ` Rob Landley
2023-02-21 21:04 ` [PATCH 5/5] fix rootfstype=tmpfs Rob Landley
2023-11-01 13:10 ` Stefan Berger [this message]
2023-11-08 22:05 ` Stefan Berger
2023-11-09 16:42 ` Rob Landley
2023-11-09 16:46 ` Rob Landley
2023-11-09 16:55 ` Rob Landley
2023-02-23 20:35 ` [PATCH 0/5] Patches used to build mkroot Andrew Morton
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=f9d57ae7-6dd6-4854-b9cf-1eec4cfa2a92@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--cc=wsa+renesas@sang-engineering.com \
/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®