LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   losing grub made a partition unlocated!!!! (https://www.linuxquestions.org/questions/linux-desktop-74/losing-grub-made-a-partition-unlocated-4175411873/)

hamidhqs 06-17-2012 12:54 AM

losing grub made a partition unlocated!!!!
 
i had ubuntu 12.04, backtrack and windows7 installed on my netbook. then i installed win xp instead of 7 (first i delete 7 then installed xp) and now grub is gone and when i boot a live ubuntu cd,with gparted utility,my home file which were in a separate ext4 partition is gone and there is "unallocated partition" instead. it was so important for me. how do you think i can have it again???

prabampm 06-17-2012 01:06 AM

Try this,
ubuntu@ubuntu:~$ sudo apt-get update
ubuntu@ubuntu:~$ sudo apt-get install gpart
ubuntu@ubuntu:~$ sudo gpart /dev/sda
[you will have to verify if the detected partition data is correct before proceeding, this command is supposed to take some time]
ubuntu@ubuntu:~$ sudo gpart /dev/sda -W sudo gpart /dev/sda
[Restart if this command is completed successfully, This command may take considerable time

TobiSGD 06-17-2012 01:26 AM

If your data was important for you you should have a backup of it (made regularly, but especially when doing system critical tasks, like installing an OS).

Anyways, if the above mentioned approach with gpart fails you can use photorec (part of the testdisk package) to try to recover your files.

pixellany 06-17-2012 02:41 AM

ham*;
To maximize your chances of recovering data from that disk, be careful to not do anything that would cause a write to the disk. I am not familiar with "gpart", but it sounds like it might only write to the mbr (i.e. to fix the partition table). In principle, that won't affect any data, but think twice before doing **anything**

If the data is really important, then consider making a clone of the disk before trying any experiments.

some questions:
1. How did you delete win 7?
2. When installing XP, did you make any selections to tell the installer how to partition?
3. Post the complete output from GParted---i.e. the list of ALL partitions, types, and sizes


All times are GMT -5. The time now is 12:15 AM.