ajgringo619 wrote: ↑
Sat Sep 26, 2020 7:57 pm
What are you trying to accomplish?
Long story …
I was interested if Gparted’s Device/Attempt Data Rescue… could read data from one of my semi-damaged USB sticks.
It found 2 (of 3 FAT32) partitions and was able to read from, mounted as read only in /tmp, great!
The last line in it's “View” window says: “All mounted views will be unmounted when you close this dialog.”, OK, closed the window and Gparted.
Curious, I checked /mnt (Nemo, update may fail sometimes …) and found both partitions still there, could play mp3 from USB!
Of course, left pane of Nemo didn’t know about, as /tmp mounts are not shown there.
In Gparted the unmount wasn’t available because it thinks the partitions are not mounted.
(I was afraid to try double mount to unmount?)
So I tried Disks - and saw Gparted has, unbeknown to the user, mounted the files systems via /dev/loop0
, still mounted at /tmp/gparted-roview… , the USB partitions /dev/sde1+2 were not mounted.
I unplugged the USB stick, music still playing in Media Player, even next title, until “An error occurred - The movie couldn’t be read”.
But both loop devices were still there in Disks and mounted (plug USB in again to resume playing).
So Gparted could handle loop devices?
I searched Gparted’s doc and the Net but couldn’t find anything about GUI
handling of loop devices.
It seems only using terminal one can open such a loop device: gparted /dev/loop0. In case of using “Unmount” Gparted clears GUI and loop device -
But the content still remains in Nemo’s view of the /tmp/gparted-roview-… (likley a Nemo - issue?
Opening the folder as root it doesn’t have content …).
Conclusion: Use Disks to fully GUI - handle loop devices (create, attach, format, detach, …).
What a bumpy ride, thanks for reading!
Now back to your question:
“What are you trying to accomplish?”
=> I wanted to Gparted-copy a partition [Gparted works on file level, only the used data part is copied] and paste it onto a loop device-file with smaller, but appropriate size for the data: Gparted should resize the partition automatically.
Disks can’t do that “copy”, and in Gparted I can’t use the GUI to access loop devices
AndyMH wrote: ↑
Sun Sep 27, 2020 5:23 am
... create a loop device is use disks on a new unformatted drive ...
Nope, what Gparted calls “loop” is a partition on a (HW) drive without partition table.
I don’t know why they call it loop, but that’s not a loop device = a file (.img or .ISO) accessible as a block device.
In Disks click at the top - left hand side disk-icon (how I love that intuitive, modern design …) to create or attach a loop file. An attached loop file will be shown as loop device and handled like a physical device. Default is attaching read only, but see bottom left to uncheck the read only … nice interface, isn't it?