i need to resize my persistent live USB. I made it with mkusb,the USB key is 8gb. The system is now running on 2.1 gb,with the remaining space used for persistent storage.So,can i resize those partitions without it having a negative effect on the system?
-
The OS partition in a mkusb drive is ISO9660 and is read only. Any modification, (if possible) will kill it. You can modify the casper-rw/writable partition and the NTFS partition. You can not enlarge the FAT32 usbboot partition because the ISO9660 partition can't be moved. – C.S.Cameron Jun 09 '20 at 06:12
2 Answers
Resizing a mkusb Persistent USB
The OS partition in a mkusb drive is ISO9660 and is read only. Any modification to the ISO9660 partition, (if possible) would kill it.
You can modify the casper-rw/writable partition and the NTFS usbdata partition. You can not enlarge the FAT32 usbboot partition because the ISO9660 partition can not be moved.
Leave at least 1MB on the right hand side if modifying the usbdata partition.

- 19,519
-
Thank you. I think i'll have to redo my persistent usb,since the main goal of resizing was giving the OS partition more space for some media files. – Sergios Jun 09 '20 at 14:09
-
@Sergios, You should also consider upgrading to a bigger and faster USB pendrive. See this link(1) and this link(2). – sudodus Jun 09 '20 at 19:52
-
2@Sergios: Media files do not go into the OS partition of a persistent USB, they end up in the Persistence partition. csaper-rw/writable is an overlay partition, new stuff goes into folders with the same names as in the OS partition. If newer stuff is found in the Persistence partition, the older version in the OS partition is ignored, take a look in upper and compare it to the root partition to see what I mean. – C.S.Cameron Jun 10 '20 at 10:16
Yes. Any user files or newly installed programs or updates go on the persistence partition casper-rw anyway, so that's the only one you need to resize.
Just boot into another Ubuntu install (e.g. make another live USB) and use GParted to shrink the NTFS usbdata partition, then enlarge the casper-rw partition into the freed-up space. GParted will take care of all the steps of that process and keep your data intact.
If the GParted procedure fails at the resize2fs step and you find a "Please run e2fsck..." error message in the details, you may have a mismatch between your timezone and the timezone GParted thinks it's in (GMT), and you may need to:
- mount and unmount the casper-rw partition to change its latest mount timestamp
- run
e2fsck -f /dev/sdX
(whatever X is for your casper-rw) - then run
resize2fs -p /dev/sdX
, which at this point should enlarge the filesystem to all of the newly available space on the partition that was already successfully enlarged by GParted earlier.
(This last bit is based on another answer from here: https://askubuntu.com/a/1361288/549880)

- 76