1 (edited by troels 2007-07-14 22:11:14)

Topic: [Solved]Disk shows as unallocated

After running Partition Magic on Windows, gParted shows my device as being completely unallocated. Before I ran Partition Magic, it didn't act this way. My device still works. Any idea what is wrong, and how to fix it?

Harddisk Information:
Model: ATA HTS541040G9AT00
Size: 37.26GiB
Path: /dev/sda

I have three partitions on this drive; An NTFS (Which takes up most of the space), an ext3 and a linux swap.

I'm getting the same behavior, whether I use gParted from my Ubuntu installation, or from the liveCD.

2

Re: [Solved]Disk shows as unallocated

Ubuntu contains a very old version of gparted, so it would better to use the latest one (the liveCD 0.3.4-8).
How did you do the current partition allocation?

Please, check the information you get by several tools, like fdisk.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: [Solved]Disk shows as unallocated

I've tried with the LiveCD, v. 0.3.4.

I made the partitions initially from the ubuntu installer. Now I'm running out of space, so I need to allocate more space from the ntfs partition to my ext3.

Which fdisk are you referring to?

4 (edited by troels 2007-07-14 19:40:16)

Re: [Solved]Disk shows as unallocated

I tried running cfdisk, and got the following error:

FATAL ERROR: Bad primary partition 1: logical partitions overlap

Then tried parted from the command line (version 1.7.1), and got:

Error: Can't have overlapping partitions.

(Update) I tried fdisk as well, giving this:

gparted ~# fdisk -l /dev/sda

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device  Boot  Start  End    Blocks         Id  System
/dev/sda1   *     1      4335  34813768+       7   HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2         4335   4742  3277260         83  Linux
/dev/sda3         4743   4864  979965          82  Linux swap / Solaris

So it would seem that Partitionmagic, when pretending to fix my disk, has instead messed something up, so I now have overlapping partitions. Any clues on what to do from here?

5

Re: [Solved]Disk shows as unallocated

After some surfing around, and an emerging panic attack, I stumbled upon testdisk. I ran the program, and analysed my device. It reported that my partition table reported 240 heads per cylinder, but 255 was more feasible. So I changed the geometry as suggested, wrote the partition table, rebooted, et voila -- everything back as before partition magic messed it up.

6

Re: [Solved]Disk shows as unallocated

smile
Very good! Testdisk is a useful tool.

*** It is highly recommended to backup any important files before doing resize/move operations. ***