Information lost in one partition after new ubuntu installation
Here is my issue.
After a long time, I decided to change to Ubuntu 12.04 (I was using 10.04). I had 3 partitions in my laptop: 1 of 90GB (with the "system files"), 1 of 100 GB with the /home directory and another one of 130GB, used as an external device, called /media/datos.
I formatted the / and /home directories to install the new Ubuntu version and kept without formatting the /media/datos directory. It was almost full, because I moved all the information there so I could format the other partitions. I have done this before, when I reinstalled Ubuntu 10.04, several times, and I've never have had any problems.
But now, I have lost information :( I have lost around 28GB of information!!!
I don't know why this happened, and I wonder if is there a way I can recover them?? Is there???
Thank you all!
First of all, try to keep calm.
I actually suggest you put away the keyboard for a while, just read & think.
So, was that partition for /media/datos really reformatted, or is it just that you can't see it?
If you are going to do things on this laptop, first thing you do is make sure that the partition for /media/datos is unmounted!
You could mount it with the ro flag - that is readonly, non-writable.
This is very, very important - if you keep writing to a formatted or in some other way damaged partition you will make recovery more and more difficult!
And the system writes stuff, it's not only what you yourself does!
Now that this is (hopefully) clear, let's see what happened?
Is the partition still there? (sudo fdisk -l)
What filesystem was on it, is that fs supported in your new system?
What do you mean with "used as an external device" - is it a USB-disk?
If so, is it recognized at all? Try with some other usb-stick/drive, can you see it correctly?
You say this partition was 130GB in size, but you lost "only" 28 GB?
Is the rest there? What exactly has happened - only a lost link or what??
Thanks Pingu for you reply!! I'll try to answer all your questions.
The partition /media/datos was not reformatted. It existed before I installed this version of Ubuntu, and I have kept it for a long time. I can see it right now. It has 130Gb of space, 76% of them seem to be used now. Before I installed this Ubuntu version, I moved a lot of files there, so I guess in that moment around 99% of the space was used. That's why I said I lost around 28GB of data, because it was almost full, and now I have 24% of free space. And yes, the other data is there, only 28 GB disappeared.
Ok, I unmonted it. I unmounted it with umount, is this correct?
Here is the readout of fdisk -l:
consuelo@consuelo-Aspire-5734Z:~$ sudo fdisk -l
Disco /dev/sda: 320.1 GB, 320072933376 bytes
255 cabezas, 63 sectores/pista, 38913 cilindros, 625142448 sectores en total
Unidades = sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico / físico): 512 bytes / 512 bytes
Tamaño E/S (mínimo/óptimo): 512 bytes / 512 bytes
Identificador del disco: 0x000a1c5c
Dispositivo Inicio Comienzo Fin Bloques Id Sistema
/dev/sda1 2048 585727 291840 82 Linux swap / Solaris
/dev/sda2 * 585728 176367615 87890944 83 Linux
/dev/sda3 176367616 371679231 97655808 83 Linux
/dev/sda4 371681278 625141759 126730241 5 Extendida
/dev/sda5 371681280 625141759 126730240 83 Linux
What I meant with "used as an external device" was that the partition is placed in /media, where the external devides are mounted. It's not an external device, sorry for my not-proper definition, that's why I used the "". But as I mentioned before, I have done this before, and I never had any problems. :(
So I don't know... any ideas? Did I make myself clear now? I'm not an expert, just a girl using linux :)
Also post the output of the command:
Hi!! here it is!
Your data partition i.e. sda5 is not mounted.
As suggested mount it read only. It isn't obvious what has happened but the partition is still intact.
Okey, I mounted it read only:
Well, this is what I did when I installed Ubuntu:
However, I didn't take that screenshot when I installed Ubuntu, I did it just now, so you could understand what I did. I don't remember how much of the disk was used (or said to be used) when I installed it. :/
That screenshot looks right, exactly like it should have been (although you should be aware that a backup on the same disk you are working on can not count as backup).
I would recommend to keep the data partition mounted read-only for now (or unmounted) and use Photorec to scan the free space on that partition for your files.
Yeah, I guess it doesn't count as backup. :/ I trusted on it because it has worked before. :( I'll try photorec. Thanks
TobiSGD, I have a dummie question. Which of these partitions should I select for Photorec?
/dev/sda4 371681278 625141759 126730241 5 Extended
/dev/sda5 371681280 625141759 126730240 83 Linux
Hi!! Help!!! It seems I made a mistake! Here is what I did, step by step.
1) I run Photorec in /dev/sda4!! Yeah, my mistake! I didn't wait for a reply, I searched in Internet and found (or thought I found) people that recovered that partition... so I did. I wanted to do it while I was asleep... I also selected the wrong type of files to recover (not the ext2,ext3,ext4). So... a couple of mistake...
2) I ended up with 37 protected folders with lots of files, some of them split. Most of them were in the partition already. So, kind of useless.
3) So... I deleted them! :) they were saved in my /home folder, but as mentioned, they were protected. So I sudo nautilus and deleted them. Then, emptied the trash bin.
4) The thing, is that I'm running Photorec again (in the /dev/sda5 and recovering the right files now), but there's seems to be no free space in my /home directory. Somehow, I think those protected folders were not deleted and are messing around somewhere... ??? could it be possible??
5) What can I do to delete them?
Thank youuuu!!!! Sorry for my not perfect English!
BTW, the good news are that the files are still there...
A few things:
1) It might be that some processes keeps the files open.
# sudo lsof -n |grep file
to see all files currently in use,
# lsof | grep deleted
to see deleted files.
2) Default is still to reserve 5% of each ext# partition for root.
Change that to 1%:
tune2fs -m1 /dev/sda5
3) I also found this on one site:
"Even after emptying your trash your files will remain in ~/.local/share/Trash/expunged until after a reboot and maybe even longer. "
4) Are there hidden files?
Hidden files have a '.' as first letter, it might be that Nautilus is set not to show hidden files.
Change Nautilus settings, or in terminal "#ls -a /home/wherever"
5) you could try fsck, use it with -N then it won't do anything, just show what would have been done.
|All times are GMT -5. The time now is 08:36 AM.|