Skip to content

Instantly share code, notes, and snippets.

@koreapyj
Created June 24, 2023 20:10
Show Gist options
  • Save koreapyj/88227da244ba4b1c19fad1c48c575eb4 to your computer and use it in GitHub Desktop.
Save koreapyj/88227da244ba4b1c19fad1c48c575eb4 to your computer and use it in GitHub Desktop.

install luci-proto-qmi

opkg update
opkg install luci-proto-qmi

replace uhttpd with nginx

opkg remove luci-ssl
opkg install luci-ssl-nginx

extroot (nvme)

opkg install block-mount kmod-fs-ext4 e2fsprogs kmod-nvme

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

DEVICE="/dev/nvme0n1"
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

ln -sf ../modules.d/30-nvme /etc/modules-boot.d/30-nvme

mount ${DEVICE} /mnt
tar -C /overlay -cvf - . | tar -C /mnt -xf -
umount /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment