Extrooting not working

I am trying to get extroot to work on OpenWRT 19.07.7 (x86_64 on PCEngines APU2). I have followed guide on openwrt site (https://openwrt.org/docs/guide-user/additional-software/extroot_configuration), but I haven't had any luck.
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 delay_root '30'
        option check_fs '1'

config mount
        option uuid '2166d8f9-92c2-4274-8c97-db99c4537b57'
        option target '/overlay'
        option enabled '0'

config mount
        option enabled '1'
        option uuid 'eacd84f3-63a3-45d4-af28-412420353cca'
        option target '/overlay'

config mount
        option target '/boot'
        option uuid '57f8f4bc-abf4-655f-bf67-946fc0f9f25b'
        option enabled '1'

config mount
        option target '/rom'
        option uuid '7f504439-7de5488c-faf39c35-2868463c'
        option enabled '1'

The disabled overlay is for the loop0 device, and the enabled is sda3 device.
lsblk gives this:

root@OpenWrt:~# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0 253.1M  0 loop /overlay
sda      8:0    0  14.9G  0 disk
├─sda1   8:1    0    16M  0 part /boot
├─sda2   8:2    0   256M  0 part /rom
└─sda3   8:3    0  14.7G  0 part

sda3 has been formatted to ext4.

Additionally the environment looks like this:

root@OpenWrt:~# env
USER=root
SSH_CLIENT=192.168.8.101 57627 22
SHLVL=1
HOME=/root
SSH_TTY=/dev/pts/0
PS1=\[\e]0;\u@\h: \w\a\]\u@\h:\w\$
LOGNAME=root
TERM=xterm
PATH=/usr/sbin:/usr/bin:/sbin:/bin
SHELL=/bin/ash
PWD=/root
SSH_CONNECTION=192.168.8.101 57627 192.168.8.100 22

and rc.local looks like this:

root@OpenWrt:~# cat /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
export PREINIT=1
mount_root
exit 0

and df gives:

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.0M      3.0M         0 100% /rom
tmpfs                   936.4M     64.0K    936.3M   0% /tmp
/dev/loop0              251.1M     20.0M    161.1M  11% /overlay
overlayfs:/overlay      251.1M     20.0M    161.1M  11% /
/dev/sda1                15.7M      5.4M     10.0M  35% /boot
/dev/sda1                15.7M      5.4M     10.0M  35% /boot
tmpfs                   512.0K         0    512.0K   0% /dev

for some reason fstab entry is not found:

root@OpenWrt:~# logread | sed -n -e "/- preinit -/,/- init -/p"
Thu Jun 24 06:18:44 2021 user.info kernel: [    2.318091] init: - preinit -
Thu Jun 24 06:18:44 2021 kern.notice kernel: [    2.512038] random: procd: uninitialized urandom read (4 bytes read)
Thu Jun 24 06:18:44 2021 kern.notice kernel: [    2.761472] random: jshn: uninitialized urandom read (4 bytes read)
Thu Jun 24 06:18:44 2021 kern.notice kernel: [    2.785804] random: jshn: uninitialized urandom read (4 bytes read)
Thu Jun 24 06:18:44 2021 kern.info kernel: [    2.960223] clocksource: Switched to clocksource tsc
Thu Jun 24 06:18:44 2021 kern.warn kernel: [    5.951565] urandom_read: 4 callbacks suppressed
Thu Jun 24 06:18:44 2021 kern.notice kernel: [    5.951570] random: jshn: uninitialized urandom read (4 bytes read)
Thu Jun 24 06:18:44 2021 kern.notice kernel: [    6.193399] F2FS-fs (loop0): Mounted with checkpoint version = 71bcaa8a
Thu Jun 24 06:18:44 2021 user.info kernel: [    6.201711] mount_root: loading kmods from internal overlay
Thu Jun 24 06:18:44 2021 user.info kernel: [    6.216088] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Thu Jun 24 06:18:44 2021 user.info kernel: [    6.227972] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
Thu Jun 24 06:18:44 2021 user.info kernel: [    6.359424] block: attempting to load /etc/config/fstab
Thu Jun 24 06:18:44 2021 user.err kernel: [    6.365090] block: unable to load configuration (fstab: Entry not found)
Thu Jun 24 06:18:44 2021 user.err kernel: [    6.372230] block: no usable configuration
Thu Jun 24 06:18:44 2021 user.info kernel: [    6.377455] mount_root: switching to f2fs overlay
Thu Jun 24 06:18:44 2021 kern.warn kernel: [    6.423527] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recommended
Thu Jun 24 06:18:44 2021 kern.info kernel: [    6.433099] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
Thu Jun 24 06:18:44 2021 user.warn kernel: [    6.444441] urandom-seed: Seeding with /etc/urandom.seed
Thu Jun 24 06:18:44 2021 user.info kernel: [    6.497623] procd: - early -
Thu Jun 24 06:18:44 2021 user.info kernel: [    7.209243] procd: - ubus -
Thu Jun 24 06:18:44 2021 kern.notice kernel: [    7.256247] random: ubusd: uninitialized urandom read (4 bytes read)
Thu Jun 24 06:18:44 2021 kern.notice kernel: [    7.263481] random: ubusd: uninitialized urandom read (4 bytes read)
Thu Jun 24 06:18:44 2021 user.info kernel: [    7.270682] procd: - init -

but it should be there, as I have the file on both old and new overlays.

I have also tried installing any package that is related to anything, upgrading them as fast as I can, but still nothing. I can mount sda3 fine, and unmount /overlay, and replace it with sda3 manually, but that doesn't change the overlayfs when checking with df for example. What am I missing?

1 Like

What advantage do you expect by extrooting a device whose flash storage is on SD card anyways?

1 Like

I get the overlay full really fast, and thought this might fix the problem, as no google result gave anything on resizing the partition

https://openwrt.org/docs/guide-user/installation/openwrt_x86#resizing_filesystem

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.