OpenWRT 18.06 extroot - UUID harmful

I’ve been using OpenWRT for years, and the idea of using a little bit of storage on an otherwise-wasted USB port makes the idea of an idling IRC client, or a handful of other minimal services has always appealed to me. I suppose that’s why I still have a 64MB VPS out in the wild.

For anyone who has upgraded to OpenWRT 18.06, you might have discovered that using extroot is a bit less than reliable. For starters, it creates a {extroot}/etc/.extroot_uuid file, which can change any time you flash your firmware. Secondarily, the secondary-tier scripts which handle this are also somewhat eclectic to work with, even if you have a USBTTL interface to be able to use the console on your router.

Here’s the skinny: Stop using UUIDs. Seriously. That’s it.

Consider changing your /etc/config/fstab to use device names (/dev/sdaX) and a device mount rather than UUID, and the problem will go away, as long as you don’t nuke your config. Also, having a bit of swap is nice – just in case building a local kernel rolls a little high.

$ ssh root@192.168.10.1
root@router:~# df | grep overlay
/dev/sda2             10255636    153688   9561276   2% /overlay
overlayfs:/overlay    10255636    153688   9561276   2% /
root@router:~# free
             total       used       free     shared    buffers     cached
Mem:        125116      72792      52324       3304       7196      28056
-/+ buffers/cache:      37540      87576
Swap:      1999868          0    1999868
root@router:~#