Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
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.
|
 |
04-27-2004, 11:30 PM
|
#1
|
Member
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162
Rep:
|
Accidentally Initialized Hard Drive!!
Sorry to do something frowned upon.....but HELP!!!!!!!!!!!!
I accidentally initialized one of my hard drives in a RAID 0 setup!!!
IE. I deleted the partition table. All of my data is still there, but I can no longer boot up.
WHAT DO I DO???!??! I'm lost and I need everything that is on there. It's gonna get backed up tommorow if I can just figure out how to get it back! It shouldn't be hard because it is the exact same partition table as the other disk. But how do I do it?? Thanks!!!
-G
|
|
|
04-27-2004, 11:41 PM
|
#2
|
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357
Rep:
|
Step 1:
Don't touch anything in your HD.
Step 2:
Either get yourself a knoppix CD to boot from or put the HD to other working Linux computer as a spare disk.
Step 3:
Examine the severity of the situation.
* If only partition table is destroyed, gpart may find it correctly in a snap, or maybe not.
Try running it read-only and see what it finds.
* If you know where your partition is (I'm assuming it is ext2/ext3), you can configure loopback-device (see man losetup) to set a offset to get into partition. (gpart may help in this also). Also if the first superblock is broken, you can use the sb parameter in mount to use an alternative superblock.
* If the damage is very severe, you can use lde (Linux disk editor) to examine the system and do modifications and recover any data that is available on disk.
Things to avoid:
*Don't run mkfs to recreate the partiton.
*Don't run fsck with write-mode if you are not absolutely sure what you are doing.
*Don't mount as read-write untill you know the disk is ok (fsck doesn't complain anything and you can access all your data).
|
|
|
04-27-2004, 11:46 PM
|
#3
|
Member
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162
Original Poster
Rep:
|
All of that WOULD work, except that it's a SATA drive......not many Linux distros have SATA enabled on them (especially the ICH5 bridge, as is my case).
Would your idea still work?
|
|
|
04-27-2004, 11:53 PM
|
#4
|
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357
Rep:
|
Depends on your SATA controller. Many of them are supported by newest knoppix, but some more special cases (like SATA RAID contoller made by promise). As a rule of thumb, if you got access to your HD in 2.4 kernel without proprietary drivers, it certainly works in knoppix (thus reverse is not true).
In case that you need propretary drivers, you can fetch one and put it into your knoppix at runtime and in case you need 2.6 kernel, you need an other live-cd. IIRC for example memphis had live-cd with 2.6 kernel.
Other parts still apply.
|
|
|
04-27-2004, 11:58 PM
|
#5
|
Member
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162
Original Poster
Rep:
|
Ok. Final Question:
This was an XP disk formatted in NTFS w/ a boot sector. Will gpart still be able to find everything and fix it?
Thanks a bunch ToniT!!!!!
|
|
|
04-28-2004, 12:09 AM
|
#6
|
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357
Rep:
|
gpart probably finds it, if the start of the partition is not badly damaged.
What did you exactly did that caused the partition table to get destroyed?
btw. if the system is still running, you can probably recover the partition table by analyzing the contents or /proc (especially /proc/partitons).
About gpart:
http://www.stud.uni-hannover.de/user/76201/gpart/
About lde:
http://lde.sourceforge.net/
Both tools are already in knoppix cd.
Last edited by ToniT; 04-28-2004 at 12:10 AM.
|
|
|
04-28-2004, 12:12 AM
|
#7
|
Member
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162
Original Poster
Rep:
|
I have two SATA drives in a RAID 0 for my XP setup (1 partition w/ boot information)
I also have an IDE drive for Linux.
I was installing Redhat EL AS 3.0 onto my IDE drive and Redhat asked if I wanted to initialize SDA1. I assumed it meant my IDE drive.....I was wrong 
|
|
|
04-28-2004, 12:16 AM
|
#8
|
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357
Rep:
|
Uuh... well... auts.
The good thing: Linux can access your SATA drives.
The bad thing: the rest.
I thought you accidentally wrote a software raid0 setup to your existing hd, but it was a just the opposite.
|
|
|
04-28-2004, 12:21 AM
|
#9
|
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357
Rep:
|
ok, let's try again.
Is the raid0 made by the raid controller, or by using some software raid in windows (is there one?)?
If former, which contoller do you have?
If later,.. well.. auts.
Well, it doesn't cost a lot to test the gpart, but I wouldn't put much hope on it in case of a windows sw raid. Probably the specs on how it works are not available, and the support is bad.
|
|
|
04-28-2004, 12:41 AM
|
#10
|
Member
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162
Original Poster
Rep:
|
It was hardware RAID using the built in Intel ICH5 controller.
|
|
|
04-28-2004, 05:19 AM
|
#11
|
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357
Rep:
|
ok, then gpart should be able to recover the partition table, if that is only thing gone, because from sw point of view, there is no any special structure that should be recovered, just regular ntfs partition.
Last edited by ToniT; 04-28-2004 at 05:21 AM.
|
|
|
All times are GMT -5. The time now is 09:25 AM.
|
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
|
|