Thursday, May 9, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 3293  / 2 Years ago, mon, september 19, 2022, 6:01:06

What is the state of partitioning tools in Linux? Which tools are recommend and which should I stay away from? Namely I am interested in fdisk, cfdisk, sfdisk and the fdisk and cfdisk variants that come in the gnu-fdisk package. The "go to" solution these days would be parted I assume?



I am asking this because I used to use cfdisk years ago, but now I am sitting here with a new 3TB disk and cfdisk is displaying completely wrong information, it's displaying a partition as 375GB in size and free space available even so there is a single partition of 3TB and no free space. If I switch over to cfdisk from the gnu-fdisk package, it will display correct information, but now fdisk.gnu-fdisk won't display anything. Meanwhile the regular fdisk that comes by default with Ubuntu would display things correctly. sfdisk seems to work, but is lacking support for the newer GPT partition tables.



Essentially half of those tools don't seem to work properly. So should I just forget them and do everything with parted from now on? Are the gdisk tools ready for prime time or are there any drawbacks to using GPT? Are there other tools I should be aware of?


More From » partitioning

 Answers
1

For working with GPT disks, you need either something based on libparted (parted, GParted, etc.) or my GPT fdisk (gdisk, sgdisk, and cgdisk) tools. The latter come in the Ubuntu gdisk package, IIRC. Since you say you're familiar with cfdisk, I recommend you check out cgdisk, since the latter is modeled after the former, but for GPT disks.



Personally, I'd avoid the GNU fdisk package; it's an attempt to slap an fdisk-like user interface atop libparted, but the result is something that omits the functionality that makes fdisk worthwhile to begin with.



Edit (March, 2017):



The older fdisk and related tools (sfdisk and cfdisk) now support GPT, too. IIRC, Ubuntu 14.10 or 15.04 was the first version of Ubuntu to ship with the updated tools, so you should have those unless you're running an older distribution. The last I checked, my GPT fdisk provided more comprehensive support for GPT-specific features, but fdisk and its brethren should be fine for most day-to-day operations.


[#29629] Wednesday, September 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fulild

Total Points: 239
Total Questions: 103
Total Answers: 112

Location: Papua New Guinea
Member since Thu, Jul 9, 2020
4 Years ago
fulild questions
Sat, Dec 11, 21, 20:10, 2 Years ago
Thu, Jun 17, 21, 12:05, 3 Years ago
Sat, Nov 19, 22, 16:28, 2 Years ago
Sat, Feb 25, 23, 22:59, 1 Year ago
Wed, Oct 12, 22, 04:04, 2 Years ago
;