Hi Helmut,

On 1/4/23 14:26, Helmut Grohne wrote:
On Wed, Jan 04, 2023 at 02:08:00PM +0100, Helge Deller wrote:
My suggestion:
Please check that the /run mountpoint is mounted with at least 20MB, independend
of the installed RAM memory in the machine...

Your suggestion makes sense in principle. However, it is
/usr/share/initramfs-tools/init that performs the mount, so that's what
would need changing.

Ah, ok. Thanks Helmut!

As a workaround for your situation, I suggest adding a kernel parameter
initramfs.runsize=20M.

Yes, that should work.

Would you be able to provide a patch here? I think that if a runsize is
given, it should be honoured, so it would probably work like:

if test -z "$RUNSIZE"; then
        if system_has_at_least_200mb_ram; then
                RUNSIZE=10%
        else
                RUNSIZE=20M
        fi
fi

Yes, I'll try to send a patch.
I just wonder, what's the best way to get the amount of physical memory?
Something like this should work which gives size in kB:
mem_kb=$(grep MemTotal /proc/meminfo | (read txt mem txt2; echo $mem)) && echo 
$mem_kb

Is there a better way? I think glibc isn't running in initramfs, so "getconf 
_PHYS_PAGES" will probably not work?

Helge

Reply via email to