Extroot Configuration


I recently added an SD card to my Slate AXT, and used it to expand storage for installing plugins etc.

Now there are some issues in the GL.iNet panel, and I’m not sure if that’s something to be worried about:

It looks good in LuCi:

I used these commands to configure it, it’s working fine so far, just want to check I won’t run into any issues down the line:

opkg update
opkg install block-mount kmod-fs-ext4 e2fsprogs
DEVICE="$(sed -n -e "/\s\/overlay\s.*$/s///p" /etc/mtab)"
uci -q delete fstab.rwm
uci set fstab.rwm="mount"
uci set fstab.rwm.device="${DEVICE}"
uci set fstab.rwm.target="/rwm"
uci commit fstab
block info
umount /dev/mmcblk0p1
mkfs.ext4 -L extroot ${DEVICE}
eval $(block info ${DEVICE} | grep -o -e "UUID=\S*")
uci -q delete fstab.overlay
uci set fstab.overlay="mount"
uci set fstab.overlay.uuid="${UUID}"
uci set fstab.overlay.target="/overlay"
uci commit fstab
mount ${DEVICE} /mnt
tar -C /overlay -cvf - . | tar -C /mnt -xf -

If anyone spots something I did wrong here, please let me know. No issues yet, but I thought I’d better check before hand :smile:

1 Like

Thank you for sharing.

@luochongjun @Blobbie01 would using a USB 3.0 drive be better than using an sd-card if im using this as a travel router? Im worried about data corruption from turning a travel router on and off constantly…

I have a sandisk pro extreme and a samsung fit 3.0 drive and im trying to figure out what storage method i should use for the overlay

There are issues with WiFi and USB 3.0 drives. Search this forum if curious.

If SD Card speed is good enough, I’d use that for your travel use case. Data corruption could happen in both cases, unless you carefully perform a shutdown every time you want to disconnect your router from power.

Both SD card and USB drive would be the same in terms of possible data corruption from turning off power when there is still modified data in cache that is not written to storage.

You can Reboot the router, turn off power when the LED stops blinking and before it boots again.

I do not work for and I am not directly associated with GL.iNet