← Back to team overview

torios-dev team mailing list archive

Re: tweak for link /tarballs when persistence by mkusb

 

Hi Israel,

I'm glad you accept and include this tweak :-)

Yes, in persistent live systems made by mkusb it will always be partition 4. See this link

https://help.ubuntu.com/community/mkusb/persistent#Partitions
---
partition 1: (NTFS) usbdata for storage and transfer of files

partition 2: GPT: bios_grub flag for booting in BIOS mode; MSDOS: extended partition

partition 3: (FAT32) boot partition

partition 4 : (ISO 9660) cloned iso file

partition 5: (ext4) casper-rw or live-rw or persistence
---

I'm not really happy with the solution, and I have been trying to find other ways to do it, but I did not find anything better than this work-around.

Other tools are probably doing it other ways, but I don't think we can (or need) cater for those cases.

(This should not affect ToriOS based on Ubuntu, at least not yet, but who knows in the future.)

Best regards
Nio

Den 2016-07-05 kl. 15:01, skrev Israel:
Hi Nio,
Great!
I put the change in.
I do have a question, will it always be partition 4?
should I use ?? instead?
The only change I made to your code is to use
[[ -d ]]] rather than test -d

This is good timing, I was working on OBI.  I have a working 'System
Update' portion of user-config now.
I also redirected the errors from dpkg ( the timezone and keyboard
setup) so they no longer show in the window.

On 07/04/2016 03:58 PM, Nio Wiklund wrote:
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






Follow ups

References