I assume those steps relate to grub
, not grub2
. With grub2
, the file structure has changed, so there are no more stage
file in the grub
directory. In this thread, under #13, you will find a description how to restore grub2 from a LiveCD. EDIT2: It has the following steps (credits drs305):
Boot the Ubuntu Live CD (Try without installing).
From the Desktop, open a terminal - Applications, Accessories, Terminal.
Determine your normal system partition - sudo fdisk -l
(That is a lowercase L).
If you aren't sure, run df -Th
. Look for the correct disk size and ext3 or ext4 format.
Mount your normal system partition:
sudo mount /dev/sdXY /mnt
- If you aren't sure if you mounted the correct partition, once it's mounted run "
nautilus /mnt
" to inspect the partition. If it is the correct partition, you should see the normal Ubuntu folders such as /bin, /boot, /etc, /home, etc
- Example:
sudo mount /dev/sda1 /mnt
- Note: The partition to mount is normally the partition on which Ubuntu was installed: sda1, sdb5, etc. If you have a separate /boot partition, use the device on which the /boot partition is located. Grub 2 works best when installed in the MBR of the drive to which BIOS boots. Also remember that you mount the partition (including the number) in this step, but you do not include the partition number when you run the "sudo grub-install" command later.
- Note: GRUB 2 counts the first drive (X) as "0", but the first partition (Y) as "1"
Only if you have a separate boot partition:
sudo mount /dev/sdXY /mnt/boot
with sdXY being your /boot partition designation.
Reinstall GRUB 2:
sudo grub-install --root-directory=/mnt /dev/sdX
Do NOT include the partition number.
Example:
sudo grub-install --root-directory=/mnt /dev/sda
- Note: Substitute the device on which Ubuntu was installed - sda, sdb, etc. Do NOT specify a partition number.
Unmount the partition *:
sudo umount /mnt
- Note: If you mounted a separate /boot partition, unmount it first:
sudo umount /mnt/boot
Reboot.
After reboot: Update the grub menu using sudo update-grub
Here's another description. Good luck!
EDIT1: Some more information is also available in the Ubuntu Wiki on grub2
.
m not sure which partition i
ll use : http://pastebin.com/qXEeipCd . Also please look at to last addition of question. thank you. – Eray Nov 21 '11 at 14:06grub2
has to be placed in the MBR of the hard disk. So you will just have to choose the correct hard drive. Your partition list looks as if there's just only on HDD:/dev/sda
. EDIT: There's only one linux partition/dev/sda5
so i assume you don't have a special boot partition. – tohuwawohu Nov 21 '11 at 14:11/dev/sda5
so i assume you don't have a separate boot partition. – tohuwawohu Nov 21 '11 at 14:18a9115410-9342-47d0-9585-59174e7149db
. And then i executedf -Th
on terminal./dev/sda5
mounted on/media/a9115410-9342-47d0-9585-59174e7149db
. So, i found my partitions name, it's sda5 – Eray Nov 21 '11 at 14:25grub2
menu using the commandsudo update-grub
. – tohuwawohu Nov 21 '11 at 14:32sudo upgrade-grub
. I'm getting same screen like this after BIOS loading : http://imageshack.us/photo/my-images/232/vmwarei.png/sr=1 (I found this screenshot from internet) – Eray Nov 21 '11 at 14:44fd -Th
command. Also you said, "There's only one linux partition /dev/sda5" – Eray Nov 21 '11 at 15:53