LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
LinkBack Search this Thread
Old 11-26-2005, 10:10 AM   #1
Spitfire24
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora Core 5
Posts: 12

Rep: Reputation: 0
Ubuntu install deleted all my partitions - any way to restore them?


So I decided to try and install Ubuntu over my Fedora install to see what it was like. I had 2 Windows partitions (15GB just for Windows and 140GB or so for files). The rest was reserved for linux. Now during the Ubuntu install it came up to the partitioning part. Unlike most other linux distros I've tried, Ubuntu didn't offer the option to delete only linux partitions. It did offer an automatic setup and claimed that it wouldn't make any changes until after I reviewed everything. Not knowing how to setup partitions properly for linux, I figured I'd see how it would setup everything and then I could base my manual settings off that. In the end, it didn't ask me to confirm before it over wrote my Windows partitions with linux ones.

Now I've tried to reload the Windows boot loader with the SuSE CDs I had but it couldn't find any Windows partitions to install it on. From there I tried the Windows recovery console and the fixboot command. This seemed to create a new FAT partition with just C:. But no success with it loading Windows. The computer just stops at a GRUB boot loader command prompt. I also tried partition magic to see if it could undelete the partitions but since new partitions were created over them it can't. After I finish this post I have a Knoppix CD I'm going to try.

It looks like all my data from the NTFS partitions is still there - Ubuntu didn't format the partitions it created. It's just a matter of recreating the partition table. Any suggestions?
 
Old 11-26-2005, 10:36 AM   #2
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian wheezy/sid, PC-BSD
Posts: 3,000
Blog Entries: 4

Rep: Reputation: 88
Looks like only the partition table is gone.

But if you could paste your partition table info here, it would be of help to diagnose the situation. Unfortunately it might be very difficult to restore all the previous settings.

You might need a professional hard disk data recovery tool to take all the back up and then proceed to install from scratch.

Last edited by vharishankar; 11-26-2005 at 10:37 AM.
 
Old 11-26-2005, 01:33 PM   #3
Spitfire24
LQ Newbie
 
Registered: Nov 2004
Distribution: Fedora Core 5
Posts: 12

Original Poster
Rep: Reputation: 0
I bought a program named partition table doctor and that was able to go recover the 140GB partition information. I'm in Knoppix now transferring information over to another computer and immediately to an external HDD. After that's done I'll go back to the original (screwed up) partition table data and see if I can get the 15GB Windows partition restored for the last of the data.

Now Knoppix is giving a bit of a problem. It wouldn't give me write access to the external HDD, which is why I'm going over samba to the other machine and then to the drive. Any way to fix this? It'd make transferring much faster.
 
Old 11-26-2005, 04:37 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Squeeze, Fedora 14
Posts: 7,268

Rep: Reputation: 83
"Now Knoppix is giving a bit of a problem. It wouldn't give me write access to the external HDD, which is why I'm going over samba to the other machine and then to the drive. Any way to fix this? It'd make transferring much faster."

Knoppix always mounts all disk partitions as read only. You have to umount the partitions and mount them again as read/write. For this reason I use something other than Knoppix for a rescue CD.

-----------------------
Steve Stites
 
Old 11-29-2005, 06:43 PM   #5
jjmac
LQ Newbie
 
Registered: Jun 2005
Location: Australia
Distribution: debian
Posts: 6

Rep: Reputation: 0
As long as you bailed out of the install when you noticed the error -=- you may just be lucky. It sounds like that was the case.

When the table was overwritten, well, without a copy, it starts to get very tricky but you do mention your having some success with the recovery program your using, so that sounds ok.

If you can remember the general size/layout of your partitions though, then you could also do an ordered seach, from a LiveCD.

Partitions will tend to be ailgned on a 63 sector boundary, due to the way the system insists on using the imaginary geometry system in its layout, regardless whether or not LBA addressing is being used.

You could do a search that involves 63 sector jumps (63 sectors per head), around the location(s) you suspect a partition may be, using the "dd" program ...

]# dd if=/dev/hda of=boot-search.img bs=512 seek=<a-very-large-number> count=1

That will start at the start of your drive, jumping a number of 512byte blocks and copying the next one to that file. Viewable with a hexeditor.

From there you will be looking for the intell/dos styled boot-sector magic writen to the last two bytes. 0x55aa

If you find the right sector it should also have stuff that shows it to be a windows boot-sector. A very long and drawn out method, but hopefully the program your using will do all that anyway. And it wont be neccessary. Be carefull if your going to do anything with dd, it can and will wipe your drive if used accidently. Just recently i managed to zero out my mbr, along with a boot partition (grin), managed to kill it just be fore it found my root partition :roll: Luckily i had backups, almost that is.

But, in the future --- doing ...

]# dd if=/dev/zero of=/dev/fd0 bs=1024 count=1440

]# dd if=/dev/hda of=/dev/fd0 bs=512 count=1

Will give you a copy of your boot-strap and master table.

]# cfdisk -Ps /dev/hda

Will give you a dump of the starting sector for head 0, for all your partitions, including the logicals.

Handy if you want to make floppy copies of your logical boot-sectors for any reason.


jm

Last edited by jjmac; 11-29-2005 at 06:52 PM.
 
Old 12-15-2005, 06:08 AM   #6
terrytree
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
Hi,

Lost or deleted partition can be saved using Partition Table Doctor Recovery tool.
It can easily restore lost partition, as it did for me before.
Really great tool, with awesome restore algorithms. Give it a try. Recommended!
 
  


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
restore deleted rc.conf file fraggelfraggel *BSD 7 10-22-2005 11:53 PM
Help - Deleted home dir, can i restore? phlyersphan Linux - Newbie 7 07-05-2004 09:15 PM
How to restore a deleted file satimis Linux - Newbie 1 09-12-2003 04:18 AM
how to restore deleted files ? ilyes Linux - General 3 08-01-2003 07:13 AM
restore back deleted file edreddy Linux - General 4 07-19-2002 06:43 AM


All times are GMT -5. The time now is 05:45 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration