Prevention and Recovery of XP Dual Boot Problems
Mohammad Ayyash
mayyash at gmail.com
Mon Jul 12 09:34:40 UTC 2004
Hi
I fall in that disk geometry trap of kernel 2.6...Original i have win
XP and luckly found your article on how to salvage the situation...but
it didn work...I followed it to the letter...nothing...
Here is something rather interesting:
If i run:
fdisk -l /dev/hda
I get:
==================================================================
Disk /dev/hda: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1543 12390808+ 7 HPFS/NTFS
/dev/hda2 1543 7476 47658240 f W95 Ext'd (LBA)
/dev/hda5 1543 3072 12284968+ 7 HPFS/NTFS
/dev/hda6 3073 4602 12284968+ 7 HPFS/NTFS
/dev/hda7 4602 6131 12284968+ 7 HPFS/NTFS
/dev/hda8 6131 6386 2048728+ b W95 FAT32
/dev/hda9 6386 7410 8221720+ 83 Linux
/dev/hda10 7410 7476 532696+ 82 Linux swap
==================================================================
which is great, the head count is correct, as the article should result in.
But, if i run:
sfdisk -g /dev/hda
I get:
==================================================================
/dev/hda: 119150 cylinders, 16 heads, 63 sectors/track
==================================================================
As if nothing has happened!
In fact, when i run:
sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda
I get:
==================================================================
Warning: HDIO_GETGEO says that there are 16 heads
Disk /dev/hda: 119150 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 1542- 1543- 12390808+ 7 HPFS/NTFS
/dev/hda2 1542+ 7475- 5934- 47658240 f W95 Ext'd (LBA)
/dev/hda3 0 - 0 0 0 Empty
/dev/hda4 0 - 0 0 0 Empty
/dev/hda5 1542+ 3071 1530- 12284968+ 7 HPFS/NTFS
/dev/hda6 3072+ 4601- 1530- 12284968+ 7 HPFS/NTFS
/dev/hda7 4601+ 6130- 1530- 12284968+ 7 HPFS/NTFS
/dev/hda8 6130+ 6385- 256- 2048728+ b W95 FAT32
/dev/hda9 6385+ 7409- 1024- 8221720+ 83 Linux
/dev/hda10 7409+ 7475- 67- 532696+ 82 Linux swap
New situation:
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/hda1 * 63 24781679 24781617 7 HPFS/NTFS
/dev/hda2 24781680 120098159 95316480 f W95 Ext'd (LBA)
/dev/hda3 0 - 0 0 Empty
/dev/hda4 0 - 0 0 Empty
/dev/hda5 24781743 49351679 24569937 7 HPFS/NTFS
/dev/hda6 49351743 73921679 24569937 7 HPFS/NTFS
/dev/hda7 73921743 98491679 24569937 7 HPFS/NTFS
/dev/hda8 98491743 102589199 4097457 b W95 FAT32
/dev/hda9 102589263 119032703 16443441 83 Linux
/dev/hda10 119032767 120098159 1065393 82 Linux swap
Warning: partition 1 does not end at a cylinder boundary
sfdisk: I don't like these partitions - nothing changed.
(If you really want this, use the --force option.)
==================================================================
what is this warning: ¨Warning: HDIO_GETGEO says that there are 16 heads¨
I also noticed that, in the second line of the above listing, head
count is correct (255) but the cylindar number is incorrect (should be
7476)
And if i run:
sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda --force
I get:
==================================================================
Warning: HDIO_GETGEO says that there are 16 heads
Disk /dev/hda: 119150 cylinders, 255 heads, 63 sectors/track
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 1542- 1543- 12390808+ 7 HPFS/NTFS
/dev/hda2 1542+ 7475- 5934- 47658240 f W95 Ext'd (LBA)
/dev/hda3 0 - 0 0 0 Empty
/dev/hda4 0 - 0 0 0 Empty
/dev/hda5 1542+ 3071 1530- 12284968+ 7 HPFS/NTFS
/dev/hda6 3072+ 4601- 1530- 12284968+ 7 HPFS/NTFS
/dev/hda7 4601+ 6130- 1530- 12284968+ 7 HPFS/NTFS
/dev/hda8 6130+ 6385- 256- 2048728+ b W95 FAT32
/dev/hda9 6385+ 7409- 1024- 8221720+ 83 Linux
/dev/hda10 7409+ 7475- 67- 532696+ 82 Linux swap
New situation:
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/hda1 * 63 24781679 24781617 7 HPFS/NTFS
/dev/hda2 24781680 120098159 95316480 f W95 Ext'd (LBA)
/dev/hda3 0 - 0 0 Empty
/dev/hda4 0 - 0 0 Empty
/dev/hda5 24781743 49351679 24569937 7 HPFS/NTFS
/dev/hda6 49351743 73921679 24569937 7 HPFS/NTFS
/dev/hda7 73921743 98491679 24569937 7 HPFS/NTFS
/dev/hda8 98491743 102589199 4097457 b W95 FAT32
/dev/hda9 102589263 119032703 16443441 83 Linux
/dev/hda10 119032767 120098159 1065393 82 Linux swap
Warning: partition 1 does not end at a cylinder boundary
Successfully wrote the new partition table
Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed
Reboot your system now, before using mkfs
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
==================================================================
I alse tried outputing to a text file first, same result, in fact,
there are no warning messages:
sfdisk -d /dev/hda
will give:
==================================================================
# partition table of /dev/hda
unit: sectors
/dev/hda1 : start= 63, size= 24781617, Id= 7, bootable
/dev/hda2 : start= 24781680, size= 95316480, Id= f
/dev/hda3 : start= 0, size= 0, Id= 0
/dev/hda4 : start= 0, size= 0, Id= 0
/dev/hda5 : start= 24781743, size= 24569937, Id= 7
/dev/hda6 : start= 49351743, size= 24569937, Id= 7
/dev/hda7 : start= 73921743, size= 24569937, Id= 7
/dev/hda8 : start= 98491743, size= 4097457, Id= b
/dev/hda9 : start=102589263, size= 16443441, Id=83
/dev/hda10: start=119032767, size= 1065393, Id=82
==================================================================
one last note, i set the hard disk to LBA from BIOS.
Can you please help me? I appreciate it.
More information about the devel
mailing list