Question about reinstalling GRUB
Jkhatri
khatri.jatin at gmail.com
Thu May 24 05:00:18 UTC 2012
On 05/24/2012 08:44 AM, Bill Stanley wrote:
> I have an older (but still good) computer that dual boots Ubuntu and
> Windows. The Windows partition needs the Windows OS to be reinstalled.
>
after installing windows, boot using live cd ( ubuntu )
1] select " try without any change to your computer"
2] once you have login start the terminal
3] change to root using " sudo -i" ( prompt will be changed to
root at ubuntu:~# )
4] find partition location of your ubuntu:-
root at ubuntu:~# fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x10031003
Device Boot Start End Blocks Id System
/dev/sda1 * 1 6374 51199123+ 7 HPFS/NTFS
/dev/sda2 6375 19457 105089197+ f W95 Ext'd (LBA)
/dev/sda5 6375 11473 40957686 7 HPFS/NTFS
*/dev/sda6* 11474 19457 64131448+ 83 Linux<--- Here
5] Create mount-point for ubuntu's partition
root at ubuntu:~# mkdir /media/root
6] mount the partition using following line/command
root at ubuntu:~# mount */dev/sda6* /media/root
7] confirm your root location by typing "ls /media/root"
root at ubuntu:~# ls /media/root
bin dev initrd.img lib32 media proc selinux tmp vmlinuz
boot etc initrd.img.old lib64 mnt root srv usr vmlinuz.old
cdrom home lib lost+found opt sbin sys var
8] if the output of the above command looks similar to the above result
we can now install GRUB2
root at ubuntu:~# sudo grub-install --root-directory=/media/root /dev/sda
You may see -----> "Installation finished. No error reported. This is
the contents of the device map
/media/root/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"
9] reboot your system !!!
10] No windows entry in grub menu ??
11] boot to your ubuntu
12] start terminal run " update grub2 "
user1 at linbox:~$ sudo update-grub2
[sudo] password for ubuntu:
Generating grub.cfg ...
Found Debian background: apollo.tga
Found linux image: /boot/vmlinuz-2.6.31-15-generic
Found initrd image: /boot/initrd.img-2.6.31-15-generic
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 7 (loader) on /dev/sda1
done
13] again reboot ..... you should be able to see windows at grub menu
!!!!!!!!!!!!!!!!
Warm Regards
--
*/
Jatin Khatri
RHCSA RHCE CCNA
www.fedoraproject.org/wiki/Jatin <http://www.fedoraproject.org/wiki/Jatin>
Phone (+91) 98250 20393
Save Paper, Save Environment.**
/*(Plant at least one tree in your life and nurture it !!!)*/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20120524/cffbae4e/attachment.html>
More information about the ubuntu-users
mailing list