Hi all, I don't have write access to the wiki, but I'd like to get a modification done that is failing the procedure.
change
eval $(block info ${DEVICE} | grep -o -e 'UUID="\S*"')
by
eval $(block info ${USBDEVICE} | grep -o -e 'UUID="\S*"')
change
mount ${DEVICE} /mnt
tar -C ${MOUNT} -cvf - . | tar -C /mnt -xf -
reboot
by
mount ${USBDEVICE} /mnt
tar -C ${MOUNT} -cvf - . | tar -C /mnt -xf -
reboot
Can you elaborate as to why you think this change should be made? Specifically, DEVICE
is just a variable name (defined in the first line of code in section 2 of the page you linked). Changing this to USBDEVICE
should have no effect (positive or negative)... unless I'm missing something?
When I run the following line of code:
DEVICE="$(block info | sed -n -e '/MOUNT="\S*\/overlay"/s/:\s.*$//p')"
I end up with valid output:
root@openwrt:~# echo $DEVICE
/dev/sda1
I guess it works for you because you have already implemented extroot. For the virgin device, DEVICE is /dev/ubi0_1 and USBDEVICE is /dev/sda1
Gottcha. I wonder if this issue is specific to UBI devices... it may not impact others. This would need a bit of checking. The other question would be if there is ever a situation where the DEVICE
variable would be different than USBDEVICE
and thus important for the functioning of the script.
my device is WRT1900ACv2, and the current version of the doc would make me reboot with a weird setting, lucky I've double checked
# block info
/dev/ubiblock0_0: UUID="80a00b43-db031c31-63d845ef-5891455e" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/ubi0_1: UUID="7080715f-ae28-48bc-afb4-09d5b040ee5d" VERSION="w5r0" MOUNT="/overlay" TYPE="ubifs"
/dev/ubi1_0: UUID="5ed23499-15d0-4097-a301-28867bbdf15b" VERSION="w4r0" TYPE="ubifs"
/dev/sda1: UUID="b2d5064c-a275-4dfb-9c0d-d8a471552118" LABEL="extroot" VERSION="1.0" TYPE="ext4"
# mount ${DEVICE} /mnt
mount: mounting /dev/ubi0_1 on /mnt failed: Block device required
# block info ${DEVICE} | grep -o -e 'UUID="\S*"'
--> Empty
# block info | sed -n -e '/MOUNT="\S*\/overlay"/s/:\s.*$//p'
/dev/ubi0_1
The documentation has been updated.
2 Likes