I installed Ubuntu 12.04 in my computer without problems, but after rebooting i got the following error
Error: No such partition
grub rescue>
I know this is a common problem and i tryed all the solutions i found before posting this question.
I tryed to restore the grub using the following commands (from this guide):
1. sudo mount /dev/sda6 /mnt
2. sudo mount --bind /dev /mnt/dev
3. sudo mount --bind /proc /mnt/proc
4. sudo mount --bind /sys /mnt/sys
5. sudo mount --bind /usr/ /mnt/usr
6. sudo chroot /mnt
7. update-grub
8. grub-install /dev/sda
9. sudo grub-install --recheck /dev/sda
10. sudo umount /mnt/dev
11. sudo umount /mnt/proc
12. sudo umount /mnt/sys
13. sudo umount /mnt/boot
14. sudo umount /mnt/usr
15. sudo umount /mnt
16. sudo reboot
But after executing those commands i still can't boot.
On my previous tries after executing grub-install i got 2 warnings about some application called FlexNet was occupying sectors 33 and 34. So i removed those sectors and now there isn't any warning.
This seems to be a problem specific to my laptop, because when i change the hard drive to another laptop the grub loads fine. I have a HP Compaq 7300 in case that would help, and i installed Ubuntu using a LiveUSB.
Any help would be really apreciated, thanks.
Output from: sudo fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7db8a635
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 125833215 62813184 7 HPFS/NTFS/exFAT
/dev/sda3 125833216 283121663 78644224 7 HPFS/NTFS/exFAT
/dev/sda4 283123710 312580095 14728193 5 Extended
/dev/sda5 310505472 312580095 1037312 82 Linux swap / Solaris
/dev/sda6 283123712 310505471 13690880 83 Linux