Re: Fdisk & extended partitions

Andries.Brouwer@cwi.nl
Thu, 9 Apr 1998 01:35:38 +0200 (MET DST)


On April 1, johnf@whitsunday.net.au and almesber@lrc.di.epfl.ch
mentioned an fdisk bug. Looking at it, I find that it really
exists, and sort of fixed it.

I mainly send this to the kernel list to warn a lot of people once again:
The program fdisk is *extremely* buggy (and has always been buggy).
Never use it in unusual circumstances.

After it had destroyed a filesystem of mine some years ago,
I wrote sfdisk, which is correct (as far as I know) but
very user unfriendly.

People needing an fdisk today should use cfdisk - nice, friendly,
correct - as far as I know.

(Since recently there is also Disk Wizard or so from Red Hat -
the 5.0 version is broken, but soon that may be a viable alternative.)

[If fdisk is so buggy, then why isnt it thrown out?
It should be, but so far nobody has taken the trouble
to port bsd disklabel support to some other fdisk.]

[The patched version of fdisk can be found in
ftp.win.tue.nl:/pub/linux/util/util-linux-2.7b.tar.gz
or so. I am not interested in fdisk flaws, know lots of them myself,
but patches are not refused, and if you find file-system-corrupting
bugs I would like to know, and will fix them.
On the other hand, I want to hear about every tiny flaw in cfdisk]

Andries

For the obligatory linux-kernel contribution:
People have complained that "fdisk -l" tries to read
/dev/hdc which is a CDROM, which leads to kernel error
messages on the console, etc. Ugly.
I avoided this problem in cfdisk by first doing HDIO_GETGEO,
which will fail for a CDROM, but it would be nice if it were
possible (using some ioctl?) to ask for the type of some device.
Many people do not configure or mount /proc, so this information
should preferably be available independent of /proc. mlord?

Replies to aeb@cwi.nl

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu