[SOLVED] - Extroot - (expanding Turris package space)

So I come back to playing with Omnia and what do I see? This is now officially supported! \o/

If you’ve ended up here because this is top search result when looking how to set up the router from external drive, you need to fetch the medkit and follow the official documentation. Still, there are two things I’d like to mention.

UUID

First of, it is possible to use UUIDs instead of device names (which are not stable and change based on what drives are attached to the router). To do this, run fdisk -l /dev/sda and take note of the ‘Disk identifier’.

# fdisk -l /dev/sda
Disk /dev/sda: 55.9 GiB, 60022480896 bytes, 117231408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe17eb372

Device     Boot Start       End   Sectors  Size Id Type
/dev/sda1        2048 117231407 117229360 55.9G 83 Linux

In the listing above, the id we’re after is e17eb372 (note 0x prefix is stripped). Now, when changing bootargs (as documented), use root=PARTUUID=e17eb372-01 instead of root=/dev/sda1 (where e17eb372 is the identifier of your disk).

/var

Second of, one of the reasons I wanted to use external disk is so that I can persist all the data. For example all the log files saved to /var/log. To achieve that, I’ve figured I’ll modify the root file system by dropping the /var symbolic link (which points to /tmp) and make it into a directory (i.e. rm /mnt/ssd/@/var; mkdir /mnt/ssd/@/var). Unfortunately, after that change, the router no longer boots and hands after printing procd: - ubus -.

Anyone has any ideas how this can be addressed? Or do I need to manually configure everything I want to write data someplace outside of /var?

1 Like