help installation deleted my partitions/files !

Asked by Rudewun

I'm not sure what I did..... But somehow the installation process (witch I stopped once it started to actually install) deleted all the files on 1 partition and deleted an other partition...... All my files are gone on my first drive.... Im fuc*d like really really FU*kD..... Is there any way i can reverse what ever It did and recover my files.... please somebody help me please and thank you.

<email address hidden>

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Rudewun
Solved:
Last query:
Last reply:
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) said :
#1

By default the install process will resize partitions down in order to make room for Ubuntu, not overwrite.

Boot to a live CD and run the following command to see what partitions exist:-

sudo fdisk -l

Then we can see what can be done.

Revision history for this message
Rudewun (rudewun) said :
#2

Hey thanks for responding,

Heres the deal...

I have two 5ooGB drives, on the first drive I had a large partition over 400GB (the one i lost with all my files on it) then there were some smaller partitions on the same drive I was playing with that don't matter that are also gone except for one about 6GB, I know this because I booted using my Windows xp cd to look at my drives. the second drive is not partitioned and was not changed.

What I think happened from what I now remember is that it said it would install on the partition with the most continuous space, so It would make sense that all it would do is take the 400+GB partition and resize it, but when i looked at it with the xp cd it showed the large partition with 400+GB of free space, now could it be that when I stopped the installation when it started to install by restarting the computer that it deleted the partition?

I'm new to Linux and don't know how to run commands (sudo fdisk -l) would you please explain it to me, also is there a partition recovery cd I could boot from to recover the partition?

Thanks,
rudewun at gmail dot com

Revision history for this message
Rudewun (rudewun) said :
#3
Revision history for this message
Jim Hutchinson (jphutch) said :
#4

I don't know about recovery. My guess is you may need a professional service for that. However, if the partition is just deleted but nothing overwritten it may be easier.

As for the overall problem and to help us see what's going on, boot the live CD (Ubuntu CD) and then click on applications-accessories-terminal and type

sudo fdisk -l

That is a small letter L at the end. Paste the output of that here so we can see what drives and partitions you have.

I know this is too late but you should never make major changes to your system (like installing an OS or changing partitions) without backing up first. Like most of us, you may end up learning that the hard way :)

Revision history for this message
Rudewun (rudewun) said :
#5

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x6fef6fef

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 60049 482343561 83 Linux
/dev/sda2 60050 60801 6040440 5 Extended
/dev/sda5 60050 60801 6040408+ 82 Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x710b6bd3

   Device Boot Start End Blocks Id System
/dev/sdb1 2 60801 488376000 f W95 Ext'd (LBA)
/dev/sdb5 2 60801 488375968+ 7 HPFS/NTFS
ubuntu@ubuntu:~$

Revision history for this message
Rudewun (rudewun) said :
#6
Revision history for this message
Jim Hutchinson (jphutch) said :
#7

The output shows 2 hard drives. One looks to be completely formatted as a Linux drive. The other is completely formatted as a Windows NTFS drive. If the Linux drive is the drive that contained the data then it looks like it was reformatted. That doesn't mean all your data is gone but it will be difficult to retrieve. If it's really important, I'd look for a data recovery business and pay them to recover it. I have no idea how successful that would be.

If the windows drive is the one containing your data then you are probably okay. It does look like the windows drive (called /dev/sdb) is a data drive rather than an OS drive since it doesn't look bootable. At least it isn't flagged as such. You mentioned you stopped the install. If you don't have a working OS on the first drive (called /dev/sda) you will need to install something - but not if you want to have the best chance of recovering anything.

That's about all I can say at the moment. Let us know what you would like to do and we can help.

Revision history for this message
Rudewun (rudewun) said :
#8

yes the first drive is were the large 400+GB partition was... i dont have any os installed just runing of the cd rom... is there and kind of partition recovery tool i can boot from a cd and fix it that way???

Revision history for this message
Rudewun (rudewun) said :
#9

or should i install a os to the small partition and use a tool to recover the big partition?

Revision history for this message
Jim Hutchinson (jphutch) said :
#10

I am not aware of any such tools. I wouldn't be surprised if something exists. A bit of googling shows a bunch of stuff but finding something good and free may be harder. This one looked interesting http://www.diskinternals.com/.

Revision history for this message
Rudewun (rudewun) said :
#11

Iv installed Ubuntu using the small partition so im not running off the cd any more....

I'm going to try this but what one should I use?

http://packages.ubuntu.com/cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=testdisk

Revision history for this message
Jim Hutchinson (jphutch) said :
#12

I don't know anything about that particular package, but it's in the universe repository so it is easy to install. I think you will need to enable the universe repository first (can't remember what's enabled by default). See https://help.ubuntu.com/community/Repositories/Ubuntu for info on doing that. Installing from the repository eliminates any questions about which one or how to install. It's automagic!

Then you should be able to do

sudo apt-get update
sudo apt-get install testdisk

to install it. From there you will need to how to use the app but that gets it installed.

Revision history for this message
Rudewun (rudewun) said :
#13

Ok I used TestDisk and got my partition back, easy, but when restarting the computer to complete the proses Ubuntu came up with an error and would not start so I ended up reinstalling Ubuntu now I think I may have a new problem its been acting up allot, slowing down and freezing to the point that I have to manually push in the restart button, I think the partitioning is messed up I should have a linux instalation partition a swap and a ntfs storage partition dose this look right...

TestDisk 6.6, Data Recovery Utility, February 2007
Christophe GRENIER <email address hidden>
http://www.cgsecurity.org

Disk /dev/sda - 500 GB / 465 GiB - CHS 60801 255 63
Current partition structure:
     Partition Start End Size in sectors

 1 E extended LBA 0 1 1 55816 254 63 896700042
No partition is bootable
 5 L HPFS - NTFS 2550 1 1 55816 254 63 855734292
   X extended 0 1 2 728 254 63 11711321
 6 L Linux 0 3 1 728 254 63 11711196
   X extended 729 0 1 821 254 63 1494045
 7 L Linux Swap 729 1 1 821 254 63 1493982

*=Primary bootable P=Primary L=Logical E=Extended D=Deleted
[Proceed ] [ Backup ]
                            Try to locate partition

Revision history for this message
Jim Hutchinson (jphutch) said :
#14

That shows no bootable partition and several extended partitions which as far as I know isn't normal. I think you can have more than one but in general you only need one (or none). Given that you have recovered a deleted partition and the files, and had two failed install attempts I think I would opt to reformat and start from scratch. Who knows if the recovered partition is actually functioning correctly. Before you do anything else, I would back up your important data and start fresh.

Revision history for this message
Rudewun (rudewun) said :
#15

Thats exactly what I was thinking and thinking of doing, copying all my files off my first drive onto the second with all my other important stuff and stating from scratch.

One other thing that makes me wonder whats going on is when I try to install windows (I need it to run Dreamweaver) on an unpartitioned space I made while installing Ubuntu the windows partitioner shows both drives unpartitioned of something like 100 and something gigs each keeping in mind there more like 500 each!

Also is it ok to use ntfs on a storage drive for use with Ubuntu, I'm under the impression windows wont detect anything else.

Revision history for this message
Rudewun (rudewun) said :
#16

p.s. thais is what the second drive looks like!

Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63
Current partition structure:
     Partition Start End Size in sectors

 1 E extended LBA 1 0 1 60800 254 63 976752000
No partition is bootable
 5 L HPFS - NTFS 1 1 1 60800 254 63 976751937

Revision history for this message
Jim Hutchinson (jphutch) said :
#17

Some of your partitions are Linux formatted and windows lacks the ability to read them. That is why is doesn't show close to 500GB. You can use NTFS on the storage drive. Linux can read and write to NTFS but you may need to do some additional configuring to auto mount everything (depending on your choices during install) and make it writable. It should be readable by default. If you want files to be editable from either OS that is probably the way to go. In the past it was suggested to use FAT32 as both win and lin had no issues with it but it seems NTFS support is finally here so that may be better. You will be able to store large files for example. Of course, NTFS is a somewhat flawed FS and needs frequent defraging. You could ext3 format the shared space and use a third party driver for windows to read it. I don't have any experience with that but you can read about it here http://www.fs-driver.org/. It says ext2 but I think it does ext3 and some others.

Revision history for this message
Rudewun (rudewun) said :
#18

Do you mean that because some of the partitions are non win compatible that windows cant even read the ntfs partitions!

What would the advantages be to using ext on the storage partitions, would it give me more space, because linux seems to show more space on my drives than windows even on cd dvd's?

the second drive should not be partitioned, it should be continues whats up with the extended LBA!

dose this info reflect a problem...

Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63
Current partition structure:
     Partition Start End Size in sectors

 1 E extended LBA 1 0 1 60800 254 63 976752000
No partition is bootable
 5 L HPFS - NTFS 1 1 1 60800 254 63 976751937

Revision history for this message
Jim Hutchinson (jphutch) said :
#19

Right. The Linux partitions are not seen by windows so windows doesn't count that space - because it doesn't know how.

I'm not sure ext3 would be a huge advantage but it tends to be better about maintaining itself. It is somewhat better a error recovery. You can read more at http://en.wikipedia.org/wiki/Ext3. If you plan to be mostly an Ubuntu user and sometime win user go Linux native. If you are planning to just use Ubuntu occasionally then maybe NTFS is better.

I don't know how you partitioned the second drive but extended partitions are normal. They are usually used to allow more than the normal max of 4 (iirc) partitions. I don't think it hurts anything to have it that way but I'm no expert on the subject. It may have come that way. It's not a problem.

Revision history for this message
Rudewun (rudewun) said :
#20

I get that windows wont show the Linux partitions, but when trying to install xp the partitioner shows nothing on both drives except for a bit of un formated space, it dose not show the ntfs partitions on ether drive not even the second drive.

Anyways thanks for the info on the third party driver, I plane on using Linux but I will need my barebone xp to run adobe and avid software.

Revision history for this message
Jim Hutchinson (jphutch) said :
#21

If you are reformatting that first drive, maybe try using the partition editor on the live CD to just wipe everything. Then maybe xp will be able to install to the full drive. Once that's done you can install ubuntu and use the install tools to shrink windows and install ubuntu. Might be the easiest way to clean everything up and then get both installed.

Revision history for this message
Rudewun (rudewun) said :
#22

I think you got a point there, I still don't understand why windows cant see any NTFS partitions especially the second drive considering I never touched it with Linux, it just shows both drives non formated and substantially physically smaller than they actually are!

If I end up wanting to format the second drive with Ex can I just switch the file system over from NT or do I need to reformat?

Revision history for this message
Jim Hutchinson (jphutch) said :
#23

I'm not sure what window's issue is but not being a fan I offer some thoughts...:)

You won't be able to just "switch" the file system. It will have to be a reformat so back up your data. It's possible there is some tool out there to do this (seems there is a tool to just about anything) but I'm not aware of one and not sure it would be profitable anyway as you would still want to back up just in case.

Revision history for this message
Rudewun (rudewun) said :
#24

Its all gud,

It turns out that the windows cd I was using was the problem so I installed a striped version of vista.

In the proses of transferring files to my second drive I came across some non accessible possibly overwritten files and folders, some photos were lost but I should be able to recover them off my cards I have not over written on since ;)