← Back to team overview

torios-dev team mailing list archive

tweak for link /tarballs when persistence by mkusb

 

Hi Israel,

I noticed that it is inconvenient to use ToriOS-Debian as a persistent live system (made by mkusb), because the link /tarballs was corrupted. I tried some tweaks in mkusb, but did not find any good method because path to the tarball contains the current block device, which can vary depending on how and when the drives are started identified.

So I added the following lines to the OBI file 'starter'.

########################################################################

# tweak for link /tarballs when persistence by mkusb

if test -d /lib/live/mount/persistence/sd?4/live/tarballs
then
 sudo rm /tarballs
 sudo mkdir /tarballs
 sudo ln -s /lib/live/mount/persistence/sd?4/live/tarballs/* /tarballs
fi

########################################################################

This tweak makes it possible to use /tarballs for other tarballs (within the RAM available) or to link tarballs from other locations for easy access, so I think it is an improvement.

You may want to modify also the default (live-only) structure to be like this:

1. To let /tarballs be a directory (not a link)

2. To link the tarballs from the /lib/live locations (not the directory containing the tarballs). Notice that the path will be different in the live-only case

sudo mkdir /tarballs
sudo ls -s /lib/live/mount/medium/live/tarballs/* /tarballs

See the attached file,

$ md5sum starter.tar.gz
cb380d904cdcf38a583fddfc48888b11  starter.tar.gz

Best regards
Nio

Attachment: starter.tar.gz
Description: application/gzip


Follow ups