Created
August 20, 2023 20:29
-
-
Save nerdegem/d3d9442eff32efe28e9025561dbe64ca to your computer and use it in GitHub Desktop.
Configuring a GL-iNet for Overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Taken from: https://forum.gl-inet.com/t/extroot-configuration/27421 | |
These were the only commands that seemed to work: | |
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 | |
DEVICE="/dev/sda1" | |
umount ${DEVICE} | |
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 - | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment