bin/90093: fdisk(8) incapable of altering in-core geometry

Chris Pressey cpressey at
Wed Dec 7 19:10:05 PST 2005

>Number:         90093
>Category:       bin
>Synopsis:       fdisk(8) incapable of altering in-core geometry
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 08 03:10:02 GMT 2005
>Originator:     Chris Pressey
>Release:        7.0-CURRENT
Cat's Eye Technologies
FreeBSD 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Sat Dec 3 09:14:05 PST 2005 catseye at i386
The fdisk(8) utility, when called to update the MBR of a disk, asks you whether you want to change "our idea of that the BIOS thinks" (i.e. the in-core value) of the geometry of that disk.  However, it never actually succeeds in doing that.

This behaviour has been independently observed (also on recent -CURRENT) by Andrew Turner (FreeBSD SoC BSD Installer project.)

The bug was first suspected due to consistent failure of the BSD Installer tool, which calls /sbin/fdisk to change the geometry of the user's disk.  The same failure is seen in FreeBSD 6.x, indicating that the same bug is in all likelihood present in 6.x as well.  Anecdotal evidence from a different source suggests it may be in 5.x as well, but this is less certain.

- As root, run "fdisk -u ad1" (or on whatever disk you like)
- Tell fdisk(8) "yes, I'd like to change our idea of what the BIOS thinks (of the geometry of this disk)"
- Give fdisk(8) any new geometry values you like
- Be happy with this choice
- Choose to write the new partition table
- Get a "GEOM not found" error (optional)
- Run "fdisk ad1" again and observe that the geometry hasn't changed.

Problem is probably in the GEOM layer, or in how fdisk(8) talks to the GEOM layer, but is not precisely known.

More information about the freebsd-bugs mailing list