Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-05-2008, 07:38 PM
|
#1
|
LQ Newbie
Registered: Nov 2008
Posts: 4
Rep:
|
restore ext3 after overwritten by swap
Hey
I need some help w/ restoring an ext3 partition. So, this is what happened: given 1 ext3 partition for data and some other hdds; on one of these hdds there is a swap partition. I mess a bit with bios, the order of the hdds changed... reboot, and i find that the order is changed in linux too, data ext3 partition has a new life, as a swap partition.
I swore i would never use path is fstab again (only and only uuid and label), but forgot to change it on this server...
Good thing that "swapon -s" showed that it uses 0 byte on the given partition... bad thing is that it certainly overwritten the partition table
Im running "gpart -W /tmp/backup /dev/sda1" now... will this possibly help? Any other idea? mke2fs -S is my last remedy, i wound not want to use it just yet...
I would really appreciate any answer ^^'
EDIT
gpart result:
Checking partitions...
Ok.
Guessed primary partition table:
Primary partition(1)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
Primary partition(2)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
Primary partition(3)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
Primary partition(4)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
this sux.. thinkin' thinkin'...
Last edited by asrael; 11-05-2008 at 07:44 PM.
|
|
|
11-05-2008, 07:57 PM
|
#2
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
You can try testdisk. It's worked for me before on something similar.
|
|
|
11-05-2008, 08:34 PM
|
#3
|
LQ Newbie
Registered: Nov 2008
Posts: 4
Original Poster
Rep:
|
no luck, didnt find anything...
next step: mke2fs -S /dev/sda1 -> e2fsck /dev/sda1 ...
|
|
|
11-05-2008, 08:53 PM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,390
|
This isn't making a lot of sense - unless a mkswap was done somewhere along the way. The swap system will not mount a partition that doesn't have the correct "eyecatcher" that mkswap implants. If mkswap was done, it only write data into the first and eigth sectors IIRC.
gpart is for recovery of partitions, not data in partitions - similarly for testdisk, although the latter is better IMHO.
I just tested this - you might be lucky. I can get to all my files after mkswap, mkfs -S, fsck
|
|
|
11-05-2008, 09:04 PM
|
#5
|
LQ Newbie
Registered: Nov 2008
Posts: 4
Original Poster
Rep:
|
Quote:
Originally Posted by syg00
This isn't making a lot of sense - unless a mkswap was done somewhere along the way. The swap system will not mount a partition that doesn't have the correct "eyecatcher" that mkswap implants. If mkswap was done, it only write data into the first and eigth sectors IIRC.
gpart is for recovery of partitions, not data in partitions - similarly for testdisk, although the latter is better IMHO.
I just tested this - you might be lucky. I can get to all my files after mkswap, mkfs -S, fsck
|
Now that you point it out, i might have made a mkswap before i realized the order was changed.
fsck is running now, a bit slow (500gb)... and im getting a LOT of "Deleted inode XY has zero dtime. Fix<y>?"
|
|
|
11-05-2008, 09:40 PM
|
#6
|
LQ Newbie
Registered: Nov 2008
Posts: 4
Original Poster
Rep:
|
okey, now im totally f*cked :P
i managed to restore ALL the files... into lost+found.......
i have like a thousand file with the inode no. ...
any tip for this situation? 
|
|
|
All times are GMT -5. The time now is 11:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|