Using Windows Startup Recovery Borked fdisk -lu :/

vbgunz

Junior Member
Aug 27, 2010
16
0
66
This is what my partition table looked like in fdisk -lu before messing with Windows.

Code:
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
32 heads, 32 sectors/track, 3815458 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a0ef0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    92065791    46031872   83  Linux
/dev/sdc2        92065792  1111631871   509783040   83  Linux
/dev/sdc3      1111631872  1342326783   115347456    7  HPFS/NTFS
/dev/sdc4      1342326784  3907029167  1282351192   83  Linux

This is the same exact disk after recovering Windows 7 startup using the Windows 7 installation disk.

Code:
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a0ef0

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    92065791    46031872   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sdc2        92065792  1111631871   509783040   83  Linux
Partition 2 does not end on cylinder boundary.
/dev/sdc3   *  1111631872  1342326783   115347456    7  HPFS/NTFS
/dev/sdc4      1342326784  3907029167  1282351192   83  Linux
Partition 4 does not end on cylinder boundary.

The Windows 7 startup recovery just made Windows bootable. It also changed the disk from 32 heads, 32 sectors/track to 255 heads, 63 sectors/track. It's quite frustrating. If I delete the Windows partition (/dev/sdc3), everything returns to normal. Recovering Windows startup really screwed me in some way.

I googled my ass off and I am hating fdisk in the end. Supposedly this just doesn't mean anything. Some say it's catastrophic and others say it's smoke and mirrors. I just hate those errors a lot. It's like driving a car on a cross country road trip and not minding the faulty engine light. It's really discerning. What are my options in trying to make this error/warning go away (properly)?

I tried going into fdisk expert mode and changing heads and sectors *hoping* that may have been the cause but after writing (w), heads and sectors don't change from 255, 63. I'm frustrated :/
 

mv2devnull

Golden Member
Apr 13, 2010
1,512
149
106
Legacy mess.

Look at the numbers (Start, End, Blocks). They have not changed.

Only the heads/sectors have changed, but those are not supposed to be used. They should be read from the disk, but apparently they are stored in the partition table as well. In the old times (before LBA) the C/S/H had a meaning and therefore fdisk prefers to put partition boundaries on cylinder boundaries. But such boundaries are gone.

Which version of fdisk? I do know that the latest ones have been tweaked, mainly to cope with the SSD alignment. And I do see that your first partition does start at 2048, well aligned, like Windows (since Vista) likes to partition.

I'd say smoke and mirrors.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,198
126
Win7 setup, I noticed, causes many BIOSes to default the HD to "Large" translation mode, instead of "LBA" mode, in the BIOS. This is an (intentional???) defect in Windows 7, or possibly the BIOS, since they will not let you force LBA mode, only "AUTO" or "Large" or "CHS".

Btw, 255 heads and 63 sectors is basically standard translation mode, I'm curious how (and what BIOS and what HD) defaulted to 32 and 32.
 

vbgunz

Junior Member
Aug 27, 2010
16
0
66
@mv2devnull
I wouldn't say I solved it *but* this morning, just waking up I checked the manual and threw on the 'c' option (Switch off DOS-compatible mode. (Recommended)). Luck would have it using the -luc option, those errors aren't there *but* my heads/sectors is still switched from 32/32 to 255/63. Not sure if that's also ignorable at this point.

@VirtualLarry
Code:
BIOS Information
        Vendor: Phoenix Technologies, LTD
        Version: ASUS M3N-HT Deluxe ACPI BIOS Revision 2904
        Release Date: 12/07/2009
        ...

My bios had nothing to do with 32,32 heads/sectors. I reformatted and repartitioned this disk using 'fdisk -H 32 -S 32 -u /partition' and 'mkfs.ext4 -b 2048 -E stride=32,stripe-width=32 /partition'. As for the Windows partition, I didn't exactly format that one at all by hand. I used KDE partition manager and *copied* Windows from another partition using rsync.

Anyhow, the disk was fine with 32/32 all up *until* I did a startup recovery on Windows. Once I did that recovery and made Windows bootable, I started noticing these warnings and the change in heads/sectors. If I do a dry-run delete of the Windows partition, the remaining partitions are displayed without warning.