Posts: 13
Threads: 5
Joined: Feb 2021
Reputation:
1
Hi, I have a 128 GB USb Ventoy with some Linux flavors, and would like to increase the dat file size on some of them, without losing its content.
Is it feasible?
How to accomplish that?
Thanks!
OSes: Debian Buster, Ventoy Multi Boot USB with Persistence with Linux Lite, Manjaro, MX Linux, Ubuntu Studio, Zorin and others
HW: ASUS TUF X570-Pro, AMD Ryzen 9 5900X 12-Core, 4200 Mhz, 128 GB RAM, SAMSUNG 980 PRO 2TB PCIe NVMe Gen4 SSD M.2, Intel® Eth Ctler I225-V, Logitech K520 / M510
Posts: 23
Threads: 2
Joined: Jan 2021
Reputation:
4
02-24-2021, 06:02 PM
(This post was last modified: 02-24-2021, 06:04 PM by Premiere.)
What do you mean by dat file, the persistence file?
All that is... is a ext formated image file that can be rebuilt and you can copy over all previous data over, there also a required format setting for the (ext3 I think) image that I don't remember right off hand.
Also remember not to ever do a dist-upgrade.
What better is just to rebuild the squash file system.
Thats what I do , I setup custom built iso with a script I altered from remastersys. Works perfect, I also have full control over the compression.
Posts: 23
Threads: 2
Joined: Jan 2021
Reputation:
4
02-24-2021, 07:43 PM
(This post was last modified: 02-24-2021, 07:44 PM by Premiere.)
This is what I would do in the terminal
The easiest way... I think
make a copy of your dat file
cp datfile /home/
get the size exact size
ls -l --block-size=M yourdatfile
Take Note
Then simply
dd bs=1M seek=your-numbers-Above-no-letters if=/dev/zero of=yourdatfile count=numberOfAdditionalMegaBytes
Then simple open in gparted
sudo gparted yourdatfile
right click your virtualdrive file and select check, and then hit the check mark button (apply all operations button) it will automatically resize the ext file system.
That's the easiest way I can think of.
Hope this helps.
Posts: 7
Threads: 2
Joined: May 2021
Reputation:
1
Thanks and sorry for asking something that is already documented
Posts: 1,357
Threads: 85
Joined: Apr 2020
Reputation:
132
05-24-2021, 11:22 AM
(This post was last modified: 05-24-2021, 11:22 AM by longpanda.)
Try
sudo sh ExtendPersistentImg.sh /media/demo/Ventoy/persistence_ext4_512MB_MX-Persist.dat 1024
Posts: 7
Threads: 2
Joined: May 2021
Reputation:
1
The file was already enlarged but using it it is still seen as 512 MB by the system.
I used the command with the sudo in front and now the system reports the correct size.
thanks again
PS. I think you should modify the documentation adding the "sudo"
Posts: 1,357
Threads: 85
Joined: Apr 2020
Reputation:
132
I have updated the document.