My router is x86 with cpu 3205U using last stable openwrt version OpenWrt 21.02.0 r16279-5cc0535800 . My overlay space will be full, so I want to extend my overlay space to install more packages.
I follow up the guide of wiki page Extroot configuration but failed.
my fstab
root@OpenWrt:~# cat /etc/config/fstab
config global
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option check_fs '0'
option delay_root '20'
config mount
option target '/overlay'
option uuid 'fb7604f7-b620-4368-9a31-8e051c89b735'
option enabled '0'
config mount
option target '/boot'
option uuid '84173db5-fa99-e35a-95c6-28613cc79ea9'
option enabled '0'
config mount
option target '/rom'
option uuid 'ca2e4295-6c2e7e2a-db5d7a18-d19e4084'
option enabled '0'
config mount 'rwm'
option device '/dev/loop0'
option target '/rwm'
option enabled '1'
config mount 'overlay'
option uuid '2130c1dd-4c49-4724-bd7e-dd15bf45fb40'
option target '/overlay'
option enabled '1'
Block info
root@OpenWrt:~# block info
/dev/loop0: UUID="fb7604f7-b620-4368-9a31-8e051c89b735" LABEL="rootfs_data" VERSION="1.14" MOUNT="/overlay" TYPE="f2fs"
/dev/sda1: UUID="84173db5-fa99-e35a-95c6-28613cc79ea9" LABEL="kernel" VERSION="1.0" MOUNT="/boot" TYPE="ext4"
/dev/sda2: UUID="ca2e4295-6c2e7e2a-db5d7a18-d19e4084" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/sda3: UUID="2130c1dd-4c49-4724-bd7e-dd15bf45fb40" VERSION="1.0" TYPE="ext4"
df:
root@OpenWrt:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 4096 4096 0 100% /rom
tmpfs 1975644 508 1975136 0% /tmp
/dev/loop0 100416 92776 7640 92% /overlay
overlayfs:/overlay 100416 92776 7640 92% /
/dev/sda1 16112 4876 10912 31% /boot
/dev/sda1 16112 4876 10912 31% /boot
tmpfs 512 0 512 0% /dev
I also follow up the troubleshooting method
uci set fstab.@global[0].delay_root="15"
uci set about fstab
root@OpenWrt:~# uci show | grep fsta
fstab.@global[0]=global
fstab.@global[0].anon_swap='0'
fstab.@global[0].anon_mount='0'
fstab.@global[0].auto_swap='1'
fstab.@global[0].auto_mount='1'
fstab.@global[0].check_fs='0'
fstab.@global[0].delay_root='20'
fstab.@mount[0]=mount
fstab.@mount[0].target='/overlay'
fstab.@mount[0].uuid='fb7604f7-b620-4368-9a31-8e051c89b735'
fstab.@mount[0].enabled='0'
fstab.@mount[1]=mount
fstab.@mount[1].target='/boot'
fstab.@mount[1].uuid='84173db5-fa99-e35a-95c6-28613cc79ea9'
fstab.@mount[1].enabled='0'
fstab.@mount[2]=mount
fstab.@mount[2].target='/rom'
fstab.@mount[2].uuid='ca2e4295-6c2e7e2a-db5d7a18-d19e4084'
fstab.@mount[2].enabled='0'
fstab.rwm=mount
fstab.rwm.device='/dev/loop0'
fstab.rwm.target='/rwm'
fstab.rwm.enabled='1'
fstab.overlay=mount
fstab.overlay.uuid='2130c1dd-4c49-4724-bd7e-dd15bf45fb40'
fstab.overlay.target='/overlay'
fstab.overlay.enabled='1'
ucitrack.@fstab[0]=fstab
ucitrack.@fstab[0].exec='/sbin/block mount'
start log about fs
root@OpenWrt:~# logread | grep fs
Tue Feb 15 03:52:12 2022 kern.info kernel: [ 2.538673] squashfs: version 4.0 (2009/01/31) Phillip Lougher
Tue Feb 15 03:52:12 2022 kern.info kernel: [ 3.250431] VFS: Mounted root (squashfs filesystem) readonly on device 8:2.
Tue Feb 15 03:52:12 2022 kern.notice kernel: [ 6.979824] F2FS-fs (loop0): Mounted with checkpoint version = 5a9dd90d
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.117680] block: attempting to load /etc/config/fstab
Tue Feb 15 03:52:12 2022 user.err kernel: [ 7.123115] block: unable to load configuration (fstab: Entry not found)
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.135146] mount_root: switching to f2fs overlay
Tue Feb 15 03:52:12 2022 kern.info kernel: [ 7.140525] overlayfs: "xino" feature enabled using 32 upper inode bits.
Tue Feb 15 03:52:12 2022 kern.warn kernel: [ 7.187326] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
Tue Feb 15 03:52:12 2022 kern.info kernel: [ 7.200615] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
Tue Feb 15 03:52:13 2022 user.notice ucitrack: Setting up non-init /etc/config/fstab reload handler: /sbin/block mount
preinit log:
root@OpenWrt:~# logread | sed -n -e "/- preinit -/,/- init -/p"
Tue Feb 15 03:52:12 2022 user.info kernel: [ 3.598269] init: - preinit -
Tue Feb 15 03:52:12 2022 kern.notice kernel: [ 3.753949] random: jshn: uninitialized urandom read (4 bytes read)
Tue Feb 15 03:52:12 2022 kern.notice kernel: [ 3.766732] random: jshn: uninitialized urandom read (4 bytes read)
Tue Feb 15 03:52:12 2022 kern.notice kernel: [ 3.775747] random: jshn: uninitialized urandom read (4 bytes read)
Tue Feb 15 03:52:12 2022 kern.warn kernel: [ 6.830257] urandom_read: 4 callbacks suppressed
Tue Feb 15 03:52:12 2022 kern.notice kernel: [ 6.830259] random: jshn: uninitialized urandom read (4 bytes read)
Tue Feb 15 03:52:12 2022 kern.notice kernel: [ 6.863468] random: procd: uninitialized urandom read (4 bytes read)
Tue Feb 15 03:52:12 2022 kern.notice kernel: [ 6.979824] F2FS-fs (loop0): Mounted with checkpoint version = 5a9dd90d
Tue Feb 15 03:52:12 2022 user.info kernel: [ 6.989350] mount_root: loading kmods from internal overlay
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.040761] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.049544] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.117680] block: attempting to load /etc/config/fstab
Tue Feb 15 03:52:12 2022 user.err kernel: [ 7.123115] block: unable to load configuration (fstab: Entry not found)
Tue Feb 15 03:52:12 2022 user.err kernel: [ 7.130018] block: no usable configuration
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.135146] mount_root: switching to f2fs overlay
Tue Feb 15 03:52:12 2022 kern.info kernel: [ 7.140525] overlayfs: "xino" feature enabled using 32 upper inode bits.
Tue Feb 15 03:52:12 2022 kern.warn kernel: [ 7.187326] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
Tue Feb 15 03:52:12 2022 kern.info kernel: [ 7.200615] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
Tue Feb 15 03:52:12 2022 user.warn kernel: [ 7.211518] urandom-seed: Seeding with /etc/urandom.seed
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.236151] procd: - early -
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.762489] procd: - ubus -
Tue Feb 15 03:52:12 2022 kern.notice kernel: [ 7.772452] random: ubusd: uninitialized urandom read (4 bytes read)
Tue Feb 15 03:52:12 2022 user.info kernel: [ 7.820267] procd: - init -