bin/90093: fdisk(8) incapable of altering in-core geometry
cpressey at catseye.mine.nu
Wed Dec 7 19:10:05 PST 2005
>Synopsis: fdisk(8) incapable of altering in-core geometry
>Arrival-Date: Thu Dec 08 03:10:02 GMT 2005
>Originator: Chris Pressey
Cat's Eye Technologies
FreeBSD catbus.biscuit.boo 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Sat Dec 3 09:14:05 PST 2005 catseye at catbus.biscuit.boo:/usr/obj/usr/home/work/freebsd/src/sys/BIRDLAND 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