"Right" way to modify root filesystem mount options

Hi, I manually installed CL on f2fs filesystem like this…

1 ) sudo blkdiscard -f /dev/mmcblk1

2 ) sudo fdisk /dev/mmcblk1
press ‘g’ > create a new empty GPT partion table
press ‘n’ > enter > enter > +200M > enter
press ‘n’ > enter > enter > +15G > enter
press ‘t’ > 1 > 1 > enter
press ‘w’ > enter

3 ) sudo mkfs.fat -F32 /dev/mmcblkp1

4 ) sudo mkfs.f2fs -l mylabel -O extra_attr,inode_checksum,sb_checksum,compression /dev/mmcblkp2

5 ) sudo e2label /dev/mmcblkp1 CLR_BOOT
6 ) sudo e2label /dev/mmcblkp2 CLR_ROOT

7 ) sudo mount -O compress_algorithm=lz4 /dev/mmcblkp2 /mnt
8 ) sudo mkdir /mnt/boot
9 ) sudo mount /dev/mmcblkp1 /mnt/boot

10 ) swupd os-install /mnt --bundles=os-core,os-core-update,kernel-native,desktop,desktop-autostart, storage-utils --statedir=/mnt/var/lib/swupd

REBOOT

Everything is working great! How to add permanently ‘compress_algorithm=lz4’ mount option to root partition? Without it only existing files is compressed.

I was thinking more like /root mount options because there is no classic /etc/fstab.

Is there guide to modify a initram stage to modify early mount process before the systemd?

Not aware of.

rootflags= [KNL] Set root filesystem mount option string

man clr-boot-manager # see CONFIGURATION

1 Like