IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

reinstall grub2(ubuntu 9.10 or later) after overwriting boot section.........

2 posters

Go down

reinstall grub2(ubuntu 9.10 or later) after overwriting boot section......... Empty reinstall grub2(ubuntu 9.10 or later) after overwriting boot section.........

Post by BIT0111-muctadir Fri Jan 15, 2010 7:23 pm

Using the Ubuntu Desktop/Live CD




Overwriting the Master Boot Record


WARNING


Do not use Ubuntu 9.10 live CD to restore the boot loader from a previous version.


The first step is to boot from a Live CD and open a
terminal. You will need to run a few commands as root. One option is to
first run sudo -i which will send you to a root shell from which you will simply run the commands without the sudo
prefix. Be extremely careful when running a root shell, especially for
typos! Even an extra space can do damage to your system. Always backup
on external media before attempting recovery, if at all possible.
Next we will need to find the partition in which your Ubuntu system is installed. Type the command fdisk -l. It will output a list of all your partitions. Example :
fdisk -l

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
reinstall grub2(ubuntu 9.10 or later) after overwriting boot section......... Screen13
create a mountpoint for your partition, for example:
mkdir /media/root


Then mount your partition in it. If you don't know
which one it is, then mount any of them, we will determine if it is the
correct one.
mount /dev/sda2 /media/root
Replace /dev/sda2 with the correct name of your partition. To check if it is the correct one, run ls /media/root which should output something like this:

reinstall grub2(ubuntu 9.10 or later) after overwriting boot section......... Screen14

cdrom initrd.img media proc selinux tmp vmlinuznow,
run
ls /media/root/boot, which should output something like this :

reinstall grub2(ubuntu 9.10 or later) after overwriting boot section......... Screen15

Once again, if what you have is not similar, unmount it and try another partition.


Now that everything is mounted, we just need to reinstall GRUB:
sudo grub-install --root-directory=/media/root /dev/sda
If you get BIOS warnings try:
sudo grub-install --root-directory=/media/root /dev/sda --recheck

If all went well, you should see something like this:
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda
Now restart your pc and remove the cd............
BIT0111-muctadir
BIT0111-muctadir
Expert
Expert

Course(s) :
  • BIT

Blood Group : B+
Posts : 233
Points : 395

Back to top Go down

reinstall grub2(ubuntu 9.10 or later) after overwriting boot section......... Empty Re: reinstall grub2(ubuntu 9.10 or later) after overwriting boot section.........

Post by BIT0129-Tabassum Mon Apr 11, 2011 4:19 am

Thanks man Smile

rep++
BIT0129-Tabassum
BIT0129-Tabassum
Global Moderator
Global Moderator

Course(s) :
  • BIT

Blood Group : A+
Posts : 1496
Points : 2298

http://probe-tabassum.blogspot.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum