My friend suddenly ask me for a Ubuntu Live CD and upon being asked he told me that he has not been able to boot his machine for getting the Operating System not found error. I'm posting here on how did I helped him out with the problem for documentation.
The program I used was gpart, and to use it in Ubuntu (Live CD) is to add Universe repository to /etc/apt/sources.list as this;
deb http://archive.ubuntu.com/ubuntu gutsy main restricted universe
and run this commands to install it.
ubuntu@ubuntu:~$ sudo apt-get update ubuntu@ubuntu:~$ sudo apt-get install gpart
By running the next command, gpart will search the whole disk for possible partitions and write it's findings to the partition table:
ubuntu@ubuntu:~$ sudo gpart /dev/sda -W /dev/sda
That's it. Just reboot and see if your system is now bootable…
p/s: Other than gpart, testdisk can also be used for partition recovery, but i'm not covering it here..
p/s: I am now maintaining this entry in my wiki site
5 Comments on this post
Leave a Comment[...] Recover lost partition table using Ubuntu Live CD + gpart Jan [...]
Thanks, it works great!
Comment left on 9.22.2009 by krzyc
my hdd have to much partitions and i want to recover one partition wich is sda1 how to do it ?
Comment left on 12.30.2009 by cffgv
Thanks a lot, you saved my life !
Comment left on 5.3.2010 by AchillesLastStand
hi..
thanks for your help.but in my case… only the partitions are detected but it is not written in the partition table which brings me again to a blank black screen after startup…. pls help me writing changes to the partition table….
Comment left on 3.1.2011 by arjun