GParted has lost a partition. How to get it back?

Using applications, configuring, problems
Post Reply
Message
Author
gcmartin

GParted has lost a partition. How to get it back?

#1 Post by gcmartin »

Trouble with Puppy implementation of GPARTED.

This problem has happened in just about every Puppy tested today.

I was called by a friend who has made a mistake. She, in looking over GPARTED has inadvertently deleted and formatted an EXT4 partion from her hard-drive. (She actually thought she was working on an adecent partition on a 3 partition HDD.

I was asked to take a look at the Puppy desktop. GParted is suppose to have a recovery feature that is present in its screen's menu, Device>AttemptDataRescue, but, someone, somewhere has deprecated (or broken) GParted!

Questions
  • Has this already been addressed?
  • Could this be fixed in the future?
Lastly
  • Do you have any recommendation for partiton recovery in Puppy Linux should this happen to anyone else?
Thanks in advance for ALL helpful mentions

DPUP5520
Posts: 800
Joined: Wed 16 Feb 2011, 05:38

#2 Post by DPUP5520 »

Hey man I just got your message, Gparted has always had a few small problems in Puppy that were never fully resolved, rescuing partition data using the CLI should work just fine however, if the data is indeed recoverable. Unfortunately no laptop right now to test
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69651][b][i]PupRescue 2.5[/i][/b][/url]
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=72178][b][i]Puppy Crypt 528[/i][/b][/url]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#3 Post by rcrsn51 »

The versions of Gparted that have the data recovery feature also need the "gpart" utility. Since no Puppy appears to have this, I pulled it out of Debian and packaged it as a PET below. But I didn't actually test it on live partitions.
Attachments
gpart_0.1h-11.pet
(21.08 KiB) Downloaded 572 times

Peterm321
Posts: 411
Joined: Thu 29 Jan 2009, 14:09
Location: UK

#4 Post by Peterm321 »

If gparted/gpart doesnt provide a solution, maybe testdisk/photorec could help.

You may find it helpful to make an image backup of the mistakenly overwritten partition before reformatting or copying files to it.

http://www.murga-linux.com/puppy/viewto ... 01&t=77288

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#5 Post by Karl Godt »

I was asked to take a look at the Puppy desktop. GParted is suppose to have a recovery feature that is present in its screen's menu, Device>AttemptDataRescue, but, someone, somewhere has deprecated (or broken) GParted!
Where and when ? Which Puppy (-derivate) are you talking about ?

*

About testdisk : it is somewhat incomprehensive to work with. I was able to use it to recover once but the write new mbr feature did not work for me. testdisk really finds old partition signatures that had been deleted and presents them in a confusing way to choose things. I used parted cli to write the new partitions and tune2fs to alter the ext2 partitions to ext3 ones and mkfs.ntfs to alter fat32 to ntfs. When testdisk shows very old partitions it is useful to give partitions LABEL names to make things easier to understand. Some utilities are not capable to tune a LABEL afterwards like for ntfs and swap i think.

User avatar
pemasu
Posts: 5474
Joined: Wed 08 Jul 2009, 12:26
Location: Finland

#6 Post by pemasu »

I used once extundelete for recovering deleted files.

DPUP5520
Posts: 800
Joined: Wed 16 Feb 2011, 05:38

#7 Post by DPUP5520 »

Karl Godt wrote:
I was asked to take a look at the Puppy desktop. GParted is suppose to have a recovery feature that is present in its screen's menu, Device>AttemptDataRescue, but, someone, somewhere has deprecated (or broken) GParted!
Where and when ? Which Puppy (-derivate) are you talking about ?

*

About testdisk : it is somewhat incomprehensive to work with. I was able to use it to recover once but the write new mbr feature did not work for me. testdisk really finds old partition signatures that had been deleted and presents them in a confusing way to choose things. I used parted cli to write the new partitions and tune2fs to alter the ext2 partitions to ext3 ones and mkfs.ntfs to alter fat32 to ntfs. When testdisk shows very old partitions it is useful to give partitions LABEL names to make things easier to understand. Some utilities are not capable to tune a LABEL afterwards like for ntfs and swap i think.
Yea Testdisk can be confusing to use if it's not one of your primary recovery utilities. PupRescue has the Gpart utility and the recovery feature still has some bugs in puppy which i've been working on fixing. And i've never had a problem using testdisk to write the mbr, however I do prefer and usually use install-mbr.
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69651][b][i]PupRescue 2.5[/i][/b][/url]
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=72178][b][i]Puppy Crypt 528[/i][/b][/url]

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#8 Post by Karl Godt »

Code: Select all

Current partition structure:
 1 P Linux                    0   1  1  1291 254 63   20755917 [Crunchbang]
 2 * Linux                 1292   0  1  2575 254 63   20627460 [Fox3]
 3 P HPFS - NTFS           2576   0  1  4438 254 63   29929095
 4 E extended LBA          4439   0  1 60800 254 63  905455530
 5 L Linux Swap            4439   2  1  4565 254 63    2040129
   X extended              6482   0  1  8394 254 63   30732345
 6 L Linux                 6482   1  1  8394 254 63   30732282 [LightHousePup]
   X extended              8395   0  1 10331 254 63   31117905
 7 L Linux                 8395   1  1 10331 254 63   31117842 [luci-218]
   X extended             10332   0  1 12254 254 63   30892995
 8 L Linux                10332   1  1 12254 254 63   30892932 [MacPup431_O2]
   X extended             12255   0  1 14231 254 63   31760505
 9 L Linux                12255   1  1 14231 254 63   31760442 [LightHouse]
   X extended             14232   0  1 15289 254 63   16996770
10 L Linux                14232   1  1 15289 254 63   16996707 [Ext2]
   X extended             15290   0  1 15417 254 63    2056320
11 L Linux Swap           15290   1  1 15417 254 63    2056257
   X extended             15418   0  1 46277 254 63  495765900
12 L Linux                15418   1  1 46277 254 63  495765837 [Vorrat]
   X extended             46278   0  1 46408 254 63    2104515
13 L Linux Swap           46278   1  1 46408 254 63    2104452
   X extended             46409   0  1 60669 254 63  229102965
14 L Linux                46409   1  1 60669 254 63  229102902 [BACK]
   X extended             60670   0  1 60800 254 63    2104515
15 L Linux Swap           60670   1  1 60800 254 63    2104452
   X extended              4566   0  1  6481 254 63   30780540
16 L Linux                 4566   1  1  6481 254 63   30780477 [MacPup_F3]
That's the testdisk.log of the very end of the malaisse in my case .

What is confusing :

Every logical partition in the extended partition has a two lines description :

Code: Select all

   X extended              4566   0  1  6481 254 63   30780540
16 L Linux                 4566   1  1  6481 254 63   30780477 [MacPup_F3]
except for the first one
4 E extended LBA 4439 0 1 60800 254 63 905455530
5 L Linux Swap 4439 2 1 4565 254 63 2040129
X extended 6482 0 1 8394 254 63 30732345
6 L Linux 6482 1 1 8394 254 63 30732282 [LightHousePup]
Another thing : The many old partitions seems not to show in testdisk.log .

*

Here the beginning of the testdisk session :

Code: Select all

Partition table type (auto): Intel
Disk /dev/hda - 500 GB / 465 GiB - Hitachi HDP725050GLAT80
Partition table type: Intel

Results
     Linux                    0   1  1  1291 254 63   20755917 [/]
     EXT2 Large file Sparse superblock, 10627 MB / 10134 MiB
     Linux                 1292   0  1  2575 254 63   20627460 [/]
     EXT3 Large file Sparse superblock, 10561 MB / 10072 MiB
     HPFS - NTFS           2576   0  1  4438 254 63   29929095
     NTFS, 15 GB / 14 GiB
     Linux Swap            4439   2  1  4565 254 63    2040129
     SWAP2 version 1, 1044 MB / 996 MiB
     Linux                 4566   0  1  6481 254 63   30780540 [MacPup430_F3]
     EXT3 Large file Sparse superblock Recover, 15 GB / 14 GiB
     Linux                 6482   1  1  8394 254 63   30732282 [/]
     EXT3 Large file Sparse superblock, 15 GB / 14 GiB
     Linux                 8395   1  1 10331 254 63   31117842 [luci-218]
     EXT4 Large file Sparse superblock Recover, 15 GB / 14 GiB
     Linux                10332   1  1 12254 254 63   30892932 [MacPup431_O2]
     EXT3 Large file Sparse superblock, 15 GB / 14 GiB
     Linux                12255   1  1 14231 254 63   31760442 [/]
     EXT3 Large file Sparse superblock, 16 GB / 15 GiB
     Linux                14232   1  1 15289 254 63   16996707 [/]
     EXT2 Large file Sparse superblock, 8702 MB / 8299 MiB
     Linux Swap           15290   1  1 15417 254 63    2056257
     SWAP2 version 1, 1052 MB / 1004 MiB
     Linux                15418   1  1 46277 254 63  495765837 [/]
     EXT3 Large file Sparse superblock Recover, 253 GB / 236 GiB
     Linux Swap           46278   1  1 46408 254 63    2104452
     SWAP2 version 1, 1077 MB / 1027 MiB
     Linux                46409   1  1 60669 254 63  229102902 [/]
     EXT3 Large file Sparse superblock, 117 GB / 109 GiB
     Linux Swap           60670   1  1 60800 254 63    2104452
     SWAP2 version 1, 1077 MB / 1027 MiB
The end outcome was : The Macpup partition as /dev/hda6 became /dev/hda16 and all other partitions have also new /dev/hd* associations through parted - resulting in fixing a lot of entries in grub's menu.lst .

The write mbr failure probably is a result of having had that IDE HDD attached to a USB converter on a SATA-only PC . I was using that IDE-HDD to move backups of the SATA-HDD onto .

*

:oops:
I trashed the MBR of the IDE-HDD while accidentally

Code: Select all

cp /whatever !$
while the last command had been

Code: Select all

df /dev/sdb
and cp "dd'ed" onto /dev/sdb .
I am not really sad for corrupting Crunchbang but for the Luma-001 frugal installation on it .
:P

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#9 Post by rcrsn51 »

I hope that this thread doesn't fall off the radar. If adding gpart to Puppy turns Gparted into a useful data recovery tool, it needs to happen.

However, I tried it myself and the results were unsatisfactory. Using a flash drive, I deliberately deleted a partition, then asked Gparted to find it. It could not.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#10 Post by rcrsn51 »

I ran another test and this time Gparted+gpart found the lost partition. It opened a temporary mount point to the partition so you could off-load the files to external storage. If it worked consistently, this would be much simpler than using testdisk/photorec.

Gparted does not attempt to repair the partition table. Instead, it recommends that you use testdisk.
GParted is suppose to have a recovery feature that is present in its screen's menu, Device>AttemptDataRescue, but, someone, somewhere has deprecated (or broken) GParted!
I looked at Mint 12. It is also missing gpart.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#11 Post by Karl Godt »

rcrsn51 wrote: I looked at Mint 12. It is also missing gpart.
according to http://packages.debian.org/source/squeeze/gpart the "homepage" at a university is gone...

Tried to compile it but have errors apparently because of too new headers.
Will leave it until if i have time .

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#12 Post by rcrsn51 »

The Debian version that I packaged above as a PET also worked in Mint.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#13 Post by 01micko »

http://www.slackware.org.uk/slacky/slac ... t/0.1h_11/

That is a link to the slacky.eu community's version which is in the Slacko PPM (search it :wink: ).

This particular version includes a static binary which will probably work in older pups too. (That's a guess!). It also includes documentation which may be worth a read.

I'll include the small dynamically linked binary in future versions of Slacko.
Puppy Linux Blog - contact me for access

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#14 Post by Karl Godt »

rcrsn51 wrote:The Debian version that I packaged above as a PET also worked in Mint.
http://archive.debian.net/source/potato/gpart

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#15 Post by bigpup »

Having the latest version of Gparted would seem to be part of the issue.
Gparted is at version 0.13.1
http://sourceforge.net/projects/gparted/files/gparted/

I always get the latest version of the Gparted live CD to do any partitioning and format.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

paule
Posts: 79
Joined: Sun 15 Jul 2007, 06:53

extundelete how to install???

#16 Post by paule »

pemasu wrote:I used once extundelete for recovering deleted files.
I am hoping to use extundelete, could you elaborate on how you installed it? When I try I try to compile the package, I get a "C++ unable to create binaries" or words to that effect.

Thanks in advance.

cheers, Paul

Post Reply