1 (edited by moleij 2019-07-30 22:30:13)

Topic: GParted fail displaying partitions on USB sticks with hybrid iso

This is my first post here, let me first take the occasion to thank developers and helpers to this wonderful tool -
It have helped me serveral times during the years - THANK YOU  smile


Myself and others have found a problem i now help reporting:


__THE PROBLEM
GParted do not correctly read Live USB sticks created by dumping a hybrid iso to them:
It erroneously shows the iso9660 partition to cover the whole disk, while in reality it is often a small partition at the beginning (like the GParted live iso) so any more partitions are never shown nor can be changed etc  (like Mageia live isos that have both an ESP (EFI system partition) and - if chosen - an ext4 partition for storing changes and user files.

So GParted can not be used for editing such systems partitions. (i.e on a large fast stick i want to have Mageia live and add LUKS encrypted storage, a swap, and a ntfs for sharing with MS systems)


__References: Programs i tried that DO show all partitions:
fdisk, sfdisk, KDE Partition Manager
And I also get Plasma tray popups and can mount them there.

- So I believe the problem lies solely in GParted.
GParted versions tested: 0.28.1 rpm in Mageia 6 repo, and gparted-live-1.0.0-4-amd64.iso


__EXAMPLE
Below is an experimental stick modified by KDE Partition Manager: It is a Mageia 7.1 live iso, plus an ext4 "mgalive-persist" for storing changes and user files, swap, and an ntfs for sharing files with MS-systems.

GParted:
only displays one iso9660 covering the whole stick

Parted:
list everything *except* the iso9660:

# parted /dev/sde visa
Modell: SanDisk Extreme (scsi)
Disk /dev/sde: 32,0GB
Sektorstorlek (logisk/fysisk): 512B/512B
Partitionstabell: msdos
Disk Flags: 

Nummer  Början  Slut    Storlek  Typ       Filsystem       Flaggor
 2      3027MB  3031MB  4194kB   primary                   esp
 1      3031MB  32,0GB  29,0GB   extended
 7      3032MB  9322MB  6289MB   logical   ext4
 6      19,8GB  24,0GB  4194MB   logical   linux-swap(v1)
 5      24,0GB  32,0GB  8012MB   logical   ntfs

fdisk -l :
gives a corresponding list to parted

cfdisk -l :
corresponding, plus shows the free space between the ext4 and swap - but also the iso9660 in the beginning of the disk is shown as free space.

KDE Partition Manager :
Like cfdisk but nicely graphical similar to GParted  (showing the iso9660 as unpartitioned space)

Maybe this is a trick of hybrid isos strategy, that it is not in partition table? Just thinking. This is not  my cup of tea.

It seems GParted takes a shortcut and dont check partition table if it identifies a iso9660 at beginning of disk?

2

Re: GParted fail displaying partitions on USB sticks with hybrid iso

Please read this closed GitLab Issue #63 - GParted not showing a partition embedded inside an ISO9660 image;
and especially this note.

3

Re: GParted fail displaying partitions on USB sticks with hybrid iso

Thank you for the quick reply, and link to info smile
While i sort of agree, i see this from the other side:

The hybrid iso seem like a hack but functional and today widely used - even for gparted live, i see wink
Refusing to edit such system is like throwing out the baby with the water, i think.

Every computer i booted the media on, kernel, and most (all) other tools (even parted - which gparted is thought to be a GUI for !) do use/edit the actual partitions.

Example using your own iso:
Put GParted-live iso on USB (I used Mageia IsoDumper)
Use KDE Partition Manager: It displays a partition in the beginning of disk.  Create a ext4 of the remaining space.
Boot  GParted-live, open terminal, create /mnt/store and mount that ext4 there.
( fdisk it sees that there is a hpfs in the beginning, only a third Gigabyte small, then the ext4 )
Now you can store scripts, back up partition tables, etc there right on the stick  smile
I just did that, rebooted and content is back.


I humbly suggest
Please let us edit the actual partitions that in reality is there and are used.  Or we simply use other tools instead.
Great if GParted can warn what unused space is iso9660, then we prefer this tool even more wink
Yes the phrase from your link "Any embedded partition is either using free space or sharing data with the ISO9660 file system." is good. You can also add "The operator is responsible for any damage. As always." to a warning message.

Yes there are probably a lot to watch out for and i may just be lucky it works with what i try.
You know more than me about this... and that is why i find your tool so nice.
A hammer dont refuse if i try to bend a nail.  It may be that bending it is what i want.
If you know a good source of info, put that link in the message too smile


Well yes, i could as well use Mageia 7.1 live on a stick and have persistence and both GParted and KDE Partition Manager, i started this thread just want to help feeding back what i and probably more users would like.  But it is OK if you differ  smile