How to Increas Persistent

Post Reply
User avatar
Atip
Posts: 539
Joined: 5. Jun 2011, 04:27

How to Increas Persistent

Post by Atip » 11. Oct 2017, 07:55

How can one increase the size of a persistent file on a SalixLive USB stick
while maintaining the original settings in persistent? :mrgreen:

User avatar
mimosa
Salix Warrior
Posts: 3028
Joined: 25. May 2010, 17:02
Contact:

Re: How to Increas Persistent

Post by mimosa » 11. Oct 2017, 10:14

Of course, back up the persistent file, or try this on a copy, to be sure it works.

First increase the size of the file by appending empty space to it, something like this (depending on the size you want):

Code: Select all

dd if=/dev/zero bs=1M count=400 >> ./persistent.copy
Then expand the filesystem within to fill the new space with resize2fs, something like this:

Code: Select all

mkdir mnt
sudo mount persistent.file ./mnt -o loop
sudo resize2fs /dev/loop0
sudo umount persistent.file
To check you have the right loop device, after mounting the persistent file, do:

Code: Select all

losetup --list
but usually it will be loop0.

User avatar
Atip
Posts: 539
Joined: 5. Jun 2011, 04:27

Re: How to Increas Persistent

Post by Atip » 12. Oct 2017, 04:17

Thanks!

Code: Select all

mount persistent.copy ./mnt -o loop
NTFS signature is missing.
Failed to mount '/dev/loop7': Invalid argument
The device '/dev/loop7' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
The persistent is on /dev/loop6

Search NTFS signature. Answers too complicated for me. :(

Rebooted, then modprobe ufs, which I got from the search.
Now I have no more space. Persistent is 100 % full.

Code: Select all

mkdir mnt
mkdir: cannot create directory ‘mnt’: No space left on device
I will remove some applications. And then check again.

User avatar
mimosa
Salix Warrior
Posts: 3028
Joined: 25. May 2010, 17:02
Contact:

Re: How to Increas Persistent

Post by mimosa » 12. Oct 2017, 07:04

You can't do this from within Live (at least not while using persistent!). Copy the persistent file to your hard disk, make a backup copy, attempt the procedure above, and copy the modified persistent file back to the stick to test it. If it doesn't work, you have the backup.

User avatar
Atip
Posts: 539
Joined: 5. Jun 2011, 04:27

Re: How to Increas Persistent

Post by Atip » 12. Oct 2017, 08:20

Sorry, messed it all up.
Created a new persistent twice the old size, therefore, all old data lost.

Had previous persistent copied to HD. Unable to coy it back to USB Live.

User avatar
mimosa
Salix Warrior
Posts: 3028
Joined: 25. May 2010, 17:02
Contact:

Re: How to Increas Persistent

Post by mimosa » 12. Oct 2017, 08:26

When you say you are unable to copy it back - is that because of lack of space? If so you could remove the new one you created (back it up if you like).

But perhaps it is simpler to just stick with the new one now.

You can also mount the backup of the old one (the same procedure as above) and get at the files in it that way, but that will be more use for data than settings.

djemos
Salix Warrior
Posts: 1035
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: How to Increas Persistent

Post by djemos » 12. Oct 2017, 19:03

mount persistent.copy ./mnt -o loop
NTFS signature is missing.
Failed to mount '/dev/loop7': Invalid argument
The device '/dev/loop7' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
What NTFS signature and NTFS file system has to do with salix persistent file?
How do you create the persistent file? Use the install_on_usb.sh script to create the persistent file.
In Salix can use up to 4GB persistent file in a VFAT formatted usb or as much size persistent file you like in an ext3 formatted usb stick.
Can use also an ext3 usb and choose persistent at boot and if not exist a persistent file then a persistent folder will be created in usb free space grown as much you like as installing files. But in this case cannot use the usb in a TV or listen to mp3 songs. If you want to use it as linux live usb and also as regular usb then has to be fat32 formatted with the limit of 4GB persistent file size.

User avatar
Atip
Posts: 539
Joined: 5. Jun 2011, 04:27

Re: How to Increas Persistent

Post by Atip » 13. Oct 2017, 02:00

What NTFS signature and NTFS file system has to do with salix persistent file?
Search me ;)

It is FAT formated and persistent was added later like now with maximum size
of 4GB. Persistent file was created as per instructions. Took a long time.

When I have my hard drive back I will reformat to ext3 seems to be the better
choice on a 32G stick.

User avatar
Atip
Posts: 539
Joined: 5. Jun 2011, 04:27

Re: How to Increas Persistent

Post by Atip » 13. Oct 2017, 02:07

mimosa wrote:When you say you are unable to copy it back - is that because of lack of space? If so you could remove the new one you created (back it up if you like).

But perhaps it is simpler to just stick with the new one now.

You can also mount the backup of the old one (the same procedure as above) and get at the files in it that way, but that will be more use for data than settings.
Somehow I could not copy the persistent back-up from the HD back to the USB stick.
Will report details later.

Post Reply