gparted detect partitioned disk as unallocated disk

Asked by holmes1412

I have 40Gb disk which partitioned as :
19 Gb primary partition (ext3) for Ubuntu hardy,
1 Gb primary partition (ntfs) for MBR winXp,
2 Gb for swap,
8 Gb logical partition (ntfs) for win Xp and
10 Gb logical partition (ext3 or fat32, I forget about it) for misc Data.
but while I open gparted, these partitions cannot be detected by gparted. And there is detected as unallocated disk 40 Gb.
So, how to fix it ???

This problem appear after I install winXp in 8 Gb logical disk. (Ubuntu installed first). I think its caused by somewhat trouble when I make 1 Gb from 20 Gb primary partition, so that 20 Gb separated as 19 Gb and 1 Gb explained in above.

Well, thank you very much

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gparted Edit question
Assignee:
No assignee Edit question
Solved by:
holmes1412
Solved:
Last query:
Last reply:
Revision history for this message
Ariel Cabral (acabral1961) said :
#1

There is some info on this thread that might help.
http://ubuntuforums.org/showthread.php?t=417761
Try with http://www.cgsecurity.org/wiki/TestDisk, I used that tool recently to recover a hard drive with Vista partitions after the disk was formatted and works really fine.
On the mentioned thread you can see the details about installation and so.
Hope this helps, let me know.

Revision history for this message
holmes1412 (co2606-2004) said :
#2

Thank you for your help...
I'm sorry because I'm forget to explain that everything working properly, I mean after disk partition and install winXp, while boot to Ubuntu, everything work. And also for WinXP. The problem is, Gparted in Ubuntu cannot detect that there are some partition in that disk (like I explained before).
So, although the partition cannot be detected, the OS, both Ubuntu and WinXp, is working.
It can be a problem while I want to edit partitioned disk to other partition formation. I mean I want to combine 10 Gb logical partition which used as misc data to another partition or just format it.

Thank you very much in advance.

Revision history for this message
Ariel Cabral (acabral1961) said :
#3

Ok,
Then, please can you open a Terminal (Applications->Accessories->Terminal), send the following commands:
 sudo fdisk -l
 sudo df -h
and paste the result here.

Revision history for this message
holmes1412 (co2606-2004) said :
#4

OK, sorry for my late response.
this is the result:

johan@c226:~$ sudo fdisk -l
[sudo] password for johan:
omitting empty partition (5)

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

   Device Boot Start End Blocks Id System
/dev/sda1 1 2304 18506848+ 83 Linux
/dev/sda2 * 2305 2432 1028160 7 HPFS/NTFS
/dev/sda3 2433 4864 19535040 5 Extended
/dev/sda4 3649 4864 9767488+ 83 Linux
/dev/sda5 2433 2675 1951834+ 82 Linux swap / Solaris
/dev/sda6 2676 3648 7815591 7 HPFS/NTFS

johan@c226:~$ sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 18G 9.0G 7.9G 54% /
varrun 220M 124K 220M 1% /var/run
varlock 220M 0 220M 0% /var/lock
udev 220M 64K 220M 1% /dev
devshm 220M 12K 220M 1% /dev/shm
lrm 220M 39M 181M 18% /lib/modules/2.6.24-23-generic/volatile

Thank you very much.

Revision history for this message
Ariel Cabral (acabral1961) said :
#5

Ok, no problem.
Unfortunately it looks like you do have a corrupt partition table. As you all ready noticed, fdisk notified you about "omitting empty partition(5)", which is always a sign of a corrupt partition table.
This usually happens when you install Windows after Ubuntu (Windows is not friendly with other filesystems) and make this kind of mess with the partition table.
But more problematic can be the fact that your sda4, sda5 and sda6 partitions are inside of your sda3 extended partition, occupying exactly the same space (they should be logical partitions), as you can see in my reordered listing:

  Device Boot Start End Blocks Id System
/dev/sda3 2433 4864 19535040 5 Extended

/dev/sda5 2433 2675 1951834+ 82 Linux swap / Solaris
/dev/sda6 2676 3648 7815591 7 HPFS/NTFS
/dev/sda4 3649 4864 9767488+ 83 Linux

Then, the safest and cleanest way to solve this is backup all your data and go through a fresh start installing windows first and then Ubuntu.
However, there is other solutions but you must backup all your data before you try because if you make any mistake (or even if not), you can loose all your data.
You can live with this, everything is working 0k by now, but some day it can stop working and you can't have a solution for this.
Please, tell me what do you want to try and when.
Hope this helps, let me know.

Revision history for this message
holmes1412 (co2606-2004) said :
#6

Well, after 1 week or more I tried to solve my problem... then, I think the best choice is reinstall both Ubuntu and winXP, and now, my hardisk partitioned as: 30 Gb for Ubuntu+swap, and 10Gb primary partition prepared for winXp. Both partition except swap is primary, so I hope it will be ok after all.
Thank you for every help.