public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: julian.stecklina@cyberus-technology.de
Cc: Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] initrd: resize /dev/ram as needed
Date: Fri, 21 Mar 2025 06:01:46 +0100	[thread overview]
Message-ID: <20250321050146.GD1831@lst.de> (raw)
In-Reply-To: <20250320-initrd-autoresize-v1-1-a9a5930205f8@cyberus-technology.de>

On Thu, Mar 20, 2025 at 08:46:14PM +0100, Julian Stecklina via B4 Relay wrote:
> From: Julian Stecklina <julian.stecklina@cyberus-technology.de>
> 
> When the initrd doesn't fit into the RAM disk, we currently just die.
> This is unfortunate, because users have to manually configure the RAM
> disk size for no good reason. It also means that the kernel command
> line needs to be changed for different initrds, which is sometimes
> cumbersome.
> 
> Attempt resizing /dev/ram to fit the RAM disk size instead. This makes
> initrd images work a bit more like initramfs images in that they just
> work.
> 
> Of course, this only works, because we know that /dev/ram is a RAM
> disk and we can resize it freely. I'm not sure whether I've used the
> blockdev APIs here in a sane way. If not, please advise!

Just use an initramfs and avoid all these problems.


  reply	other threads:[~2025-03-21  5:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20 19:46 [PATCH RFC] initrd: resize /dev/ram as needed Julian Stecklina via B4 Relay
2025-03-21  5:01 ` Christoph Hellwig [this message]
2025-03-22 18:23   ` Julian Stecklina

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=20250321050146.GD1831@lst.de \
    --to=hch@lst.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=julian.stecklina@cyberus-technology.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --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