ntfsfixboot(1) ntfsfixboot manual ntfsfixboot(1) NAME ntfsfixboot - check and fix details in NTFS boot sectors SYNOPSIS ntfsfixboot -s | -f [-h ] DESCRIPTION ntfsfixboot reads the first sector of a given NTFS hard disk partition and especially looks at the 'Number of Heads' and 'Hidden Sectors' fields of NTFS boot sectors. ntfsfixboot compares these values with specifications of the BIOS and the MBR's partition table. It warns about inconsistency and can fix them. With wrong values Windows won't boot. The 'Number of Heads' field has to match the 'maximum head number' value (plus one!) provided by the BIOS (Int 0x13 interface, Function 0x08). ntfsfixboot gets this information through Linux' edd module. The 'Hidden Sectors' field has to match the 'Relative Sector' offset stored in the partition's MBR entry. This tool might be helpful with disk imaging systems (after restoring a NTFS partition in another location compared to its original location. One of the options -s or -f is needed. See OPTIONS section for more. OPTIONS -s Show information about the boot sector / MBR entry. -f Read, check and fix NTFS boot sector details. Be sure to specify a NTFS partition - since this will write to the boot/first sector of the partition without asking! -h If you don't have a kernel with EDD support, you have to specify the 'maximum head number' number yourself - otherwise ntfsfixboot won't be able to check and fix the NTFS boot sector. 255 seems to be the most usual value, but there do exist exceptions! Ask your BIOS ;-) ... EXAMPLES ntfsfixboot -s /dev/hda2 Show information about the second partition of the first hard disk. ntfsfixboot -f -h 255 /dev/hda1 Check and fix NTFS boot sector of /dev/hda1 . ntfsfixboot will use 255 as the 'maxhead' value and won't try to ask the edd kernel module. NOTES The MBR/partition table reading code supports "PC BIOS" or "MS DOS" partition tables only. So, it won't work on disks with LDM or EFI partition tables. Don't use it on such partition tables! ntfsfixboot should run on any Linux version. Because of EDD support (via sysfs) Linux 2.6 is the preferred version. BUGS ntfsfixboot is in use over one year now. There are no known issues, but be aware of the fact, that this is a kind of "quick and dirty" coded tool, so there might still be bugs ... Known issues: - Currently ntfsfixboot is restricted to check and fix the first NTFS partition's boot sector, only. Don't use it for the second, third, ... - When the -h option is not given, ntfsfixboot asks the edd kernel module about the 'maximum head number' value of the first hard disk, only (what the BIOS thinks is the first!)! So, if your NTFS partition is not on your first hard disk, you have to use the -h option. AUTHOR Written by Joachim Foerster . COPYRIGHT Copyright (C) 2006 Joachim Foerster This program is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ntfsfixboot(1) $LastChangedDate: 2007-09-03 20:28:53 +0200 (Mon, 03 Sep 2007) $