GNOME Bugzilla – Bug 769831
Formatting a partition on a BSD table fails at step: set partition type
Last modified: 2016-10-08 11:53:15 UTC
I am running Kubuntu. I tried to format a new SSD (Solid State Drive) disk as ext4 and fat32 but they both failed. Here is the log from the latter: GParted 0.25.0 --enable-libparted-dmraid --enable-online-resize Libparted 3.2 Format /dev/sdb1 as fat32 00:00:00 ( ERROR ) calibrate /dev/sdb1 00:00:00 ( SUCCESS ) path: /dev/sdb1 (partition) start: 2048 end: 250068991 size: 250066944 (119.24 GiB) clear old file system signatures in /dev/sdb1 00:00:00 ( SUCCESS ) write 512.00 KiB of zeros at byte offset 0 00:00:00 ( SUCCESS ) write 4.00 KiB of zeros at byte offset 67108864 00:00:00 ( SUCCESS ) write 512.00 KiB of zeros at byte offset 128033751040 00:00:00 ( SUCCESS ) write 4.00 KiB of zeros at byte offset 128034209792 00:00:00 ( SUCCESS ) write 8.00 KiB of zeros at byte offset 128034267136 00:00:00 ( SUCCESS ) flush operating system cache of /dev/sdb 00:00:00 ( SUCCESS ) set partition type on /dev/sdb1 00:00:00 ( ERROR ) ======================================== After that I executed this mkfs command with success: timo@kubuntu-acer:~$ sudo mkfs.ext4 -L "" /dev/sdb1 [sudo] password for timo: mke2fs 1.42.13 (17-May-2015) Creating filesystem with 31258368 4k blocks and 7815168 inodes Filesystem UUID: 1576a8cd-7721-48c5-8b71-2fdb57b4e8ac Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done gparted program refreshed itself automatically and detected the ext4 formatting correctly.
And the hardware was: SanDisk 119GiB IDE. I have made it external by setting it into an external deck for two large or small IDE drives. This docker (?) has copy feature also where B drive needs to be same size or bigger than A drive.
Hello Timo, Using an SSD should not be making any difference. At the point when GParted is logging: set partition type on /dev/sdb1 it is making a libparted API call to set the type of the partition appropriately for the FAT32 file system it is about to be created. Did you get any error dialogs from GParted? Please attach a screen shot of GParted main page with View > Device Information ticketed and /dev/sdb device chosen. Thanks, Mike
Created attachment 333222 [details] Gparted screenshot
(In reply to Timo Riikonen from comment #3) > Created attachment 333222 [details] > Gparted screenshot There was no indication for the error reason. It told me to check from a web page as to how to log the bug.
I have re-produced the error. It is because BSD partition table is being used. I will look into this bug. Timo, Is there a reason you need to use the BSD partition table? If not I recommend you use either MSDOS or GPT as these are much more popular and will work successfully with GParted. Thanks, Mike
I have just used ext4 for the last 20 years and didn't know of any better. Need to transfer to using GPT then. P.S. fat32 failed in gpart as well.
Ah, GPT is not on the list of format options. Does it have some other name?
Created attachment 333238 [details] Info after GPT After I created GPT partition table I am unable to format it with gparted.
Never mind... I got it. Can't remove my stupid comments :(
Updated summary to reflect the actual issue. Found that GParted was requesting libparted to set the LVM flag on a partition on a BSD table reports failure. ped_partition__set_flag(lp_ptn, PED_PARTITON_LVM, state) returns 0 (failure) even though PED_PARTITION_LVM is an available flag for partitions on BSD tables. This is a bug in libparted.
I've submitted a parted patchset to resolve this bug. [PATCH 0/8] Fix to report success when setting lvm flag on bsd table http://lists.alioth.debian.org/pipermail/parted-devel/2016-August/004885.html
My patchset has been included in parted (libparted) for a future release. Here's the crucial fix: libparted: Fix to report success when setting lvm flag on bsd table http://git.savannah.gnu.org/cgit/parted.git/commit/?id=abc97eaf92f5ce6e30893e355a74159e5827f654 Closing this bug report now as we have no idea when parted will make a new release.