Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Messed up hd, parted Segfaulting [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
suredeath
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2006
Posts: 101
Location: Easterwood, N.Br., The Netherlands

PostPosted: Wed Aug 30, 2006 9:24 am    Post subject: Messed up hd, parted Segfaulting [SOLVED] Reply with quote

I did the stupidest thing.... I issued the mklabel command using parted (GNU Parted 1.6.25) on a (Samsung IDE/PATA 160Gb) disk with three full partitions on it. Especially the first, a 124 Gb data partition, is dearly missed.

Yes I was dumb here. What I wanted was changing a partition label. And I wasn't sharp that day. I know.
In the past I have had luck with the RESCUE option. However, if I start rescue, right after I enter the Start of the former partition I get a segfault and parted exits. No further info.

The first 140 Gb on the disk haven't been touched since, the remaining bit holds my new Gentoo setup.

Both the Minimal InstallCd version of parted and the newly built one on a FULLY FRESH stable Gentoo box demonstrate the same behaviour. For the record, all partitions had EXT3 filesystems on them, and I created a new msdos type label on the disk. System is an i686, Kernel 2.6.17-r7-gentoo, HyperThreading disabled, 1Gb RAM, 2 x IDE-PATA 160Gb, 1 x IDE-SATA 160Gb.

Any ideas on what's causing this, and -much more important now for me- any tips on how to retrieve the data from the lost partition(s)? (I know the 3rd one is lost anyway, since I have overwritten that part.)

Help much appreciated.


Last edited by suredeath on Fri Sep 01, 2006 2:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
SirYes
Apprentice
Apprentice


Joined: 15 Jan 2006
Posts: 282
Location: Lodz, Poland

PostPosted: Thu Aug 31, 2006 6:16 pm    Post subject: Answer - testdisk Reply with quote

First of all: there's hope! :)

You need some livecd with a "testdisk" program (http://www.cgsecurity.org/wiki/TestDisk). Knoppix should do just fine. Alternatively, download a statically linked binary from http://www.cgsecurity.org/wiki/TestDisk_Download - just put it on a floppy, boot from Gentoo Installation CD, mount floppy and run "testdisk" from it.

AFICT I was able to repair two badly damaged partition tables (I broke one of them myself :oops:) with this respectful program.
_________________
My blog: In search for ultimate programming language
Back to top
View user's profile Send private message
suredeath
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2006
Posts: 101
Location: Easterwood, N.Br., The Netherlands

PostPosted: Fri Sep 01, 2006 9:54 am    Post subject: Testdisk Reply with quote

Thanks for that tip!!! Keeping my fingers crossed!

Any idea if there is a lot of risk involved when this tool is working on the disk that also holds my working Gentoo Install (in another partition/area of the disk?)

I think I may make a dd copy of the partition first to be on the safe side....
Back to top
View user's profile Send private message
fangorn
Veteran
Veteran


Joined: 31 Jul 2004
Posts: 1886

PostPosted: Fri Sep 01, 2006 11:20 am    Post subject: Reply with quote

These programs scan the whole disk for partition start and end entries. They are just reading and therefore not damaging the disk any further (besides there are scratches on the disk anyway :roll: ). Before somthing is written to the disk, the program asks if the "guessed" partition table is correct.


At least this was the case as I last used one of these programs (Yes, you learn something from hurting your data really hard :wink: )

But if you have the space, a dd copy of the whole disk or just the hard to get data partitions does not hurt.
_________________
Video Encoding scripts collection | Project page
Back to top
View user's profile Send private message
suredeath
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2006
Posts: 101
Location: Easterwood, N.Br., The Netherlands

PostPosted: Fri Sep 01, 2006 1:05 pm    Post subject: Reply with quote

My backup turned out to be a GOOD thing. The program discovered two of the three former partitions. My mistake was I thought these were simply the partitions found that were lost, and that the new partition I created would still be there after writing the info back.

Worng assumption. Since the start of the newly created partition was BEFORE the end of the old second partition testdisk 'missed' the overlap situation. Only after a 'deep scan' on a second run (after I booted with a kernel panic of course) it rediscovered all (parts of) partitions still visible. Even my NTFS data partition from way back still existed in the table (its contents of course completely unusable).

As a backup method I chose tar, read another post on it if you care https://forums.gentoo.org/viewtopic-p-3547312.html#3547312

So now I DO have my important data back, and thanks to the backup I also have a working system, albeit from another root partition.
45gb of music, about 50Gb of films & clips, two years' worth of mail, and then some... All there!
Again, thanks a lot. REALLY!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum