After much moving of partitions (via gpartd) and installation of various OS’s, I’ve got a bit of a problem: fdisk and mount don’t agree about which partition corresponds to which device:
wonder:~ # fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x43764c23
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1782 14313883+ 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 1783 2189 3269227+ 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 2190 19457 138705210 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.
But notice the disagreement with mount:
wonder:~ # mount
/dev/sda3 on / type ext3 (rw,acl,user_xattr)
I’m not an expert on this stuff but the “cylinder boundary” comments look ominous to me, or at least very unusual. Maybe NTFS shouldn’t have been manipulated with Gparted especially if it was a vista partition. Where did the NTFS partition come from?
In the meantime others should jump in with advice, because this is not a strong area of mine.
fdisk (and /proc/partitions) shows what partitions are there, /proc/mounts (and mtab) only those that are mounted. There is no way to get that in sync because they are two different things. Some partitions may not even be mountable (like swap).
As far as the cylinder boundaries, don’t worry about it unless you are actually have a disk I/O problem. My memory is sketchy on this, but as I recall back in DOS land this was a consideration; DOS wrote and used start/end locations to the partition table. Later Windows began using only the start position, as does Linux. All that matters is that it can accurately find the first sector of each partition.
And re the partition being flagged as NTFS, I suspect that partition was originally created by W2K/XP. Windows does rigidly use certain fields in the table like partition type, but Linux doesn’t. A Linux format will write to the field, but what the kernel cares about is the filesystem actually on the partition and how it is mounted. So if you have ext3 formatted on that partition and are mounting it accordingly, Linux doesn’t care what the type code is.
The partition table can be edited by hand - but you don’t want to go there unless it is absolutely necessary.