partitioning - Windows partition table reports a partition is larger than the physical disk

  • Michael

    The computer in question is a Windows 8 machine. I've cloned a SSD using dd, like so: dd if=/dev/sdb of=/dev/sda.

    The machine boots with the new hard drive, and the issue is that the partition table from the source was 1TB, the destination drive was only 480GB. Windows still thinks that the drive is 1TB, and I need to resize the partition so it's aligned with the physical disk.

  • Answers
  • Rod Smith

    Doing a low-level disk clone with dd from a larger disk to a smaller one is very likely to result in lost data. Any files that happened to be stored after the 480GB mark on your source disk will now be lost on your 1TB target. Thus, the best way to do the job is to use another utility. Offhand, I don't know of any Linux utilities that will do this job for NTFS (IIRC, ntfsclone requires that the target be at least as large as the source). I'm sure there are Windows backup utilities that will do the job. I've used XML Backup once or twice in the past, but it's been a while, so I'm not sure how well it would handle your situation. Alternatively, you could use ntfsresize to shrink the source filesystem before cloning the disk with dd or ntfsclone. Be aware, though, that filesystem resizing tools always pose a risk; you could end up losing data in your effort to clone the filesystem.

    I don't know offhand how ntfsresize or similar utilities will react to a filesystem that's larger than the containing disk. They might work, or they might crash or even damage the filesystem. Thus, to be safe, I recommend going back and doing it again in a more appropriate way.

  • Ярослав Рахматуллин

    Make a partition as big as the drive and use ntfsresize.

  • Related Question

    partitioning - Windows reports discrepancy in partition sizes after resizing with gparted
  • Kaleb Pederson

    My drive was formatted to look like the following:

    Partition 1 - NTFS - 100Gb for Windows XP
    Partition 4 - Extended Partition
    Partition 5 - EXT3 - Linux boot partition - 200 Mb
    Partition 6 - XFS - Linux root partition - 20 Gb
    Partition 7 - XFS - Linux /usr/local partition - 20 Gb
    Partition 8 - XFS - Linux /home partition - 100 Gb

    I then fired up a Linux LiveCD and ran gparted, deleting partitions 4 through 8, only leaving my Windows XP partition. I then resized my NTFS partition to take up the full 240 Gb.


    However, right clicking on drive C and pulling up properties still shows the drive (partition) size as 100 Gb. In contrast with that, however, the disk manager in MMC shows the partition size as 240 Gb.

    Thus, I have two related questions:

    1. Will I be able to use the full 240 Gb I now have available to me?
    2. Can I do something so that Windows XP correctly sees the 240 Gb?

    One other thought:

    I've considered dropping the drive into Windows Vista / 7 and seeing if drive manager will allow me to shrink and then expand the partition, fixing whatever Windows XP might be using to see the drive size as 100Gb. Do you think that might work?

  • Related Answers
  • Kaleb Pederson

    It turns out that GParted didn't work correctly. I dropped the drive into Windows Vista and pulled up disk manager.

    Vista's disk manager showed the partition as taking up the full drive. Uncertain that it would allow me to expand the partition, since it showed all the space was used, I shrank the partition. It allowed me to shrink it by up to 776 Megs, presumably because of the location of various files within the partition.

    The result of shrinking the partition was a size of 99 Gb, not 239 Gb. It shrank the partition based on the previous size -- and the size reported by C:\ properties.

    I then expanded the partition. The result was correct. Both disk manager and C:\ properties reported the correct partition size of 240 Gb.