Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 21 Dec 2014, 14:52
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
GParted has lost a partition. How to get it back?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
gcmartin


Joined: 14 Oct 2005
Posts: 4507
Location: Earth

PostPosted: Fri 10 Aug 2012, 15:47    Post_subject:  GParted has lost a partition. How to get it back?  

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

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send_private_message 
DPUP5520

Joined: 16 Feb 2011
Posts: 802

PostPosted: Fri 10 Aug 2012, 16:00    Post_subject:  

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
_________________
PupRescue 2.5
Puppy Crypt 528
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9370
Location: Stratford, Ontario

PostPosted: Fri 10 Aug 2012, 16:31    Post_subject:  

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.
gpart_0.1h-11.pet
Description 
pet

 Download 
Filename  gpart_0.1h-11.pet 
Filesize  21.08 KB 
Downloaded  340 Time(s) 
Back to top
View user's profile Send_private_message 
Peterm321

Joined: 29 Jan 2009
Posts: 244

PostPosted: Fri 10 Aug 2012, 18:53    Post_subject:  

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/viewtopic.php?search_id=776855001&t=77288
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3982
Location: Kiel,Germany

PostPosted: Fri 10 Aug 2012, 19:19    Post_subject:  

Quote:
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.
Back to top
View user's profile Send_private_message Visit_website 
pemasu


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Sat 11 Aug 2012, 03:19    Post_subject:  

I used once extundelete for recovering deleted files.
Back to top
View user's profile Send_private_message 
DPUP5520

Joined: 16 Feb 2011
Posts: 802

PostPosted: Sat 11 Aug 2012, 14:34    Post_subject:    

Karl Godt wrote:
Quote:
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.

_________________
PupRescue 2.5
Puppy Crypt 528
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3982
Location: Kiel,Germany

PostPosted: Sat 11 Aug 2012, 22:58    Post_subject:    

Code:
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:
   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
Quote:
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:
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 .

*

Embarassed
I trashed the MBR of the IDE-HDD while accidentally
Code:
cp /whatever !$

while the last command had been
Code:
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 .
Razz
Back to top
View user's profile Send_private_message Visit_website 
rcrsn51


Joined: 05 Sep 2006
Posts: 9370
Location: Stratford, Ontario

PostPosted: Mon 13 Aug 2012, 08:42    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9370
Location: Stratford, Ontario

PostPosted: Tue 14 Aug 2012, 12:00    Post_subject:  

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.
Quote:
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.
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3982
Location: Kiel,Germany

PostPosted: Tue 14 Aug 2012, 12:38    Post_subject:  

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 .
Back to top
View user's profile Send_private_message Visit_website 
rcrsn51


Joined: 05 Sep 2006
Posts: 9370
Location: Stratford, Ontario

PostPosted: Tue 14 Aug 2012, 15:56    Post_subject:  

The Debian version that I packaged above as a PET also worked in Mint.
Back to top
View user's profile Send_private_message 
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Tue 14 Aug 2012, 16:57    Post_subject:  

http://www.slackware.org.uk/slacky/slackware-13.1/system/gpart/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.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3982
Location: Kiel,Germany

PostPosted: Tue 14 Aug 2012, 22:17    Post_subject:  

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


http://archive.debian.net/source/potato/gpart
Back to top
View user's profile Send_private_message Visit_website 
bigpup


Joined: 11 Oct 2009
Posts: 5499
Location: Charleston S.C. USA

PostPosted: Sat 25 Aug 2012, 13:29    Post_subject:  

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.

_________________
I have found, in trying to help people, that 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 Shocked
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1358s ][ Queries: 13 (0.0265s) ][ GZIP on ]