LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 04-27-2004, 11:30 PM   #1
gsibble
Member
 
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162

Rep: Reputation: 30
Exclamation 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
 
Old 04-27-2004, 11:41 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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).
 
Old 04-27-2004, 11:46 PM   #3
gsibble
Member
 
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162

Original Poster
Rep: Reputation: 30
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?
 
Old 04-27-2004, 11:53 PM   #4
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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.
 
Old 04-27-2004, 11:58 PM   #5
gsibble
Member
 
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162

Original Poster
Rep: Reputation: 30
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!!!!!
 
Old 04-28-2004, 12:09 AM   #6
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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.
 
Old 04-28-2004, 12:12 AM   #7
gsibble
Member
 
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162

Original Poster
Rep: Reputation: 30
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
 
Old 04-28-2004, 12:16 AM   #8
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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.
 
Old 04-28-2004, 12:21 AM   #9
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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.
 
Old 04-28-2004, 12:41 AM   #10
gsibble
Member
 
Registered: Jul 2003
Distribution: Arch .5 and Solaris 9/10
Posts: 162

Original Poster
Rep: Reputation: 30
It was hardware RAID using the built in Intel ICH5 controller.
 
Old 04-28-2004, 05:19 AM   #11
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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.
 
Old 04-28-2004, 05:30 AM   #12
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
ICH5 is actually a software raid, so I take my word back on the easiness aspect in the previous post.

So you need to put intel proprietary driver into it to get it accessed as a raid array. After this gpart has its chance.

See also:
http://www.redhat.com/archives/fedor.../msg00776.html
http://www.linuxmafia.com/faq/Hardware/sata.html
http://www.uwsg.iu.edu/hypermail/lin...08.0/0704.html

Last edited by ToniT; 04-28-2004 at 05:40 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 09:48 AM
Reiser file system / Hard Disk/ Hard Drive Problems Oxyacetylene Linux - Software 4 10-10-2005 03:24 PM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 02:47 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 01:01 PM
STUCK--Trying to copy old Hard Drive to new Hard Drive. Please Help tsw Linux - Newbie 8 05-26-2004 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration