Topic: [SOLVED] GParted image file - can't format partition
First I want to thank the developers of GParted for an excellent tool!
Background:
OS: Xubuntu 20.04
Gparted: os supplied version, version 1.0.0
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.3
When I try to use GParted with an image file, GParted can not format the created partition. This seems to be because GParted uses the same naming scheme as when accessing partitions created when using device files, ie adding the partition number to the end of the device name.
Example:
$ fallocate -l 50M hd.img
$ sudo gparted hd.img
I then create a partition table (in this case mbr/msdos), create a partition, and set a partition type. Everything works except formatting the partition.
Error:
mkfs.fat: unable to open /[...]/hd.img1: No such file or directory
I know I can use loop devices to solve the problem, but I wonder if there is any way to solve it within GParted? Is there any command line switch to tell GParted that the file is not a device file but an image file? A very quick glance at the source code only revealed the possibility to supply device names at the command line.