Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
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.
I have a secondary hard drive with 3 partitions. All three partitions were formatted as ext3 and in linux show up as hdb1, hdb5, and hdb6, respectively. Suddenly, out of nowhere, I can no longer mount hdb5 or hdb6, but I CAN mount hdb1. I think that there may be some corruption in the partition (i.e. bad superblock maybe?). I was wondering if there are any tools I can get (linux or windows based -- I don't care at this point) to fix the partitions so I can safely get my data off of them. I would appreciate it greatly.
For the record, I have tried reading the partitions with the following with no luck:
1) Fedora Core 3 (original format took place at this time)
2) Fedora Core 4
3) Gentoo 2005.1 (where I noticed the problem)
4) Windows 2k with Ext2Fsd (still only reads first partition on drive)
Oh, and hdb5 and hdb6 are part of the extended partition hdb2.
"I was wondering if there are any tools I can get (linux or windows based -- I don't care at this point) to fix the partitions so I can safely get my data off of them."
You can use fsck to fix an umounted file system. The commands are:
fsck -t ext3 /dev/hdb5
fsck -t ext3 /dev/hdb6
Answer y to any question fsck asks. If the problem turns out to be complicated then read:
masn fsck
Ok, I'm a true idiot. I did a little poking around and found that what I must have done is accidentally formatted the ext3 drive as reiserfs when I installed gentoo. Now, apparently there were no other changes made to hdb than the reiser format (gentoo was installed on hda). So to complicate things a bit, does anyone know how to unformat the reiserfs and get my ext3 w/data back? Or is this impossible?
"what I must have done is accidentally formatted the ext3 drive as reiserfs when I installed gentoo. Now, apparently there were no other changes made to hdb than the reiser format (gentoo was installed on hda). So to complicate things a bit, does anyone know how to unformat the reiserfs and get my ext3 w/data back?"
I am unsure of the sequence of events. If you formated hdb5 and hdb6 before you created the files on hdb5 and hdb6 then your problem is easy to fix. Change /etc/fstab to describe /dev/hdb5 and /dev/hdb6 as reiserfs and reboot.
If you formated hdb5 and hdb6 after you created the files on hdb5 and hdb6 then you have lost the files. Change /etc/fstab to describe /dev/hdb5 and /dev/hdb6 as reiserfs and reboot. Then check to see if the files are there. If not you will have to restore the files from backup.
1) Install Fedora. In this process I created all of the partitions and formatted them as ext3.
2) Loaded up hdb6 with a bunch of files that would be nice to have at this point.
3) Fedora didn't work out so well, so I tried Gentoo. I made sure not to format anything in hdb, but I think I screwed up, because now hdb5 and 6 are both reiser (according to linux and windows) instead of their original ext3. Hdb1, however, stayed ext3, oddly enough.
Now I can't read the data from hdb6. I have not tried to write data to this seemingly empty drive.
I assume this means I'm screwed. There has to be some way to undo this.
You are my new personal savior! I downloaded that software and am currently in the process of recovering ALL of my data onto a new drive. Thank you soooooooo much! Anyway, for anyone else who reads this thread in the future, here's a semi-complete description of what I did:
Problem: Accidentally formatted an existing ext3 partition (full of data) with reiserfs.
Solution:
1) On a separate physical drive, I installed Win2k and used it as a primary drive.
2) The affected drive (the one I made the stupid mistake with) is hooked up as a slave
3) Download r-tools from www.r-tt.com (it MUST be installed on a windows system strangely enough).
4) Do an r-tools scan on the problem drive.
5) Recover whatever data r-tools finds to another location.
R-Tools actually found data from almost 5 partitions back!
rtt makes excellent software - the only "data recovery" software I've come across that actually works. I'm glad you got your data back. rtt saved us weeks of work once when a Windows MFT went south.
RTT has my vote also. I have crashed partition tables on disks before but I have never seen one look as bad as the crash I had last week. NTPhoenix saved me before but no dice this time. Clean superblocks no longer exist on this drive. RTT see's the files so I will recover them later. Spread the word.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.