You are not logged in.

#1 2009-05-09 11:35:04

rassah
Member
Registered: 2009-01-24
Posts: 8

gparted destroyed my extended partition

hello

I recently wanted to resize my extended partition, and the partition inside it, using gparted, but for some unknown reason, my partition INSIDE my extended partition no longer exists (as in block length is 0), also sfdisk complains about my extended partiton does not have a msdos signature, which could indicate that gparted have moved my partition inside my extended partition, too far to the left, and then destroyed something in the extended partition, and thus the partition inside the extended partion can no longer be read.

And then comes the question, what do i do? Also gparted now fails to show any partitions at all because of this



---
this is what sfdisk -l outputs:

sfdisk: ERROR: sector 24242085 does not have an msdos signature
Disk /dev/sda: 12161 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sda1 * 0+ 4 5- 40162 83 Linux
/dev/sda2 1509 12160 10652 85562190 5 Extended
/dev/sda3 552 1508 957 7687102+ 83 Linux
/dev/sda4 0 - 0 0 0 Empty
---
/dev/sda4 is the partition inside the extended partition

Offline

#2 2009-05-09 11:42:10

yngwin
Member
Registered: 2009-05-08
Posts: 67

Re: gparted destroyed my extended partition

What do you do? Start from scratch and restore your backup (if any). smile

Offline

#3 2009-05-09 11:55:17

rassah
Member
Registered: 2009-01-24
Posts: 8

Re: gparted destroyed my extended partition

hmm yeah the problem is just that i didnt backup my data, since i didnt have anywere to store it (yes that was stupid i see now) if just i could restore the data on the destroyed partition, that would be nice, but i really dont know where to begin

Offline

#4 2009-05-09 13:01:35

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: gparted destroyed my extended partition

See if testdisk can find & restore the backup partition table.

Offline

#5 2009-05-09 13:27:12

rassah
Member
Registered: 2009-01-24
Posts: 8

Re: gparted destroyed my extended partition

testdisk finds something thats for sure, but it thinks it a primary partition, not a logical or extended partition

EDIT: ok it seems it found something, testdisk tells me this:

test_logical: Partition sector doesn't have the endmark 0xAA55

could this be it?

Last edited by rassah (2009-05-09 13:50:35)

Offline

#6 2009-05-10 05:25:35

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: gparted destroyed my extended partition

Very likely yes it is.  I suggest you be certain that is the partition you want, and if in doubt just let testdisk run its course (may take an hour or three) then present its findings to you.  If its just the 1 partition found then yes that will be it.  If not, pick the one with what are (seemingly) the correct parameters for the partition you want to rescue.

Offline

#7 2009-05-10 14:02:13

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: gparted destroyed my extended partition

The extended partition is a primary partition, the partition inside the extended partition are logical partitions. I would say testdisk too, it saved me from a mess gparted did too ... go figure.

The 0xAA55 is just a signature that is present on disks that are bootable, this helps the bios figure out if the disk is bootable or not.

From what you show, sfdisk says you have a primary bootable partition (probably a small /boot) then another primary partition (probably /) and then an extended partition (with all the rest inside). Although the order in the partition table is primary - extended (primary) - primary.

gparted makes a mess of partition order, although with linux it shouldn't matter much some software refuses to work when it is like that.

Get hexedit and issue

hexedit -s /dev/sda

and see if the first sector ends with 55 AA, something like this 29w9ut1.png
For reference also check this http://en.wikipedia.org/wiki/Master_boot_record


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB