[PATCH] fs: Add 'rootfsflags' to set rootfs mount options
Rob Landley
rob at landley.net
Sat Aug 9 08:02:09 PDT 2025
On 8/7/25 20:51, Lichen Liu wrote:
> This patch introduces a new kernel command-line parameter, rootfsflags,
> which allows passing specific mount options directly to the rootfs when
> it is first mounted. This gives users control over the rootfs behavior.
Works for me. In an i486 mkroot build against stock 6.16 with this patch:
$ root/i486/run-qemu.sh
...
# grep rootfs /proc/mounts
rootfs / rootfs rw,size=125728k,nr_inodes=31432 0 0
# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 125728 764 124964 1% /
dev 125728 0 125728 0% /dev
$ KARGS="rootfsflags=size=1m" root/i486/run-qemu.sh
...
# grep rootfs /proc/mounts
rootfs / rootfs rw,size=1024k,nr_inodes=31432 0 0
# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 1024 764 260 75% /
dev 125728 0 125728 0% /dev
Tested-by: Rob Landley <rob at landley.net>
Rob
More information about the kexec
mailing list