Thursday, August 14, 2014

Recovering Ubuntu after loading windows in dual booting environment

How to recover Ubuntu 10 after installing windows in dual booting environment?

How to recover Ubuntu 10 after installing windows in dual booting environment?

Setup:
Machine with 2 disks and Ubnutu 10 and Windows xp installed in second disk /dev/sdb. Due to some problem in Windows, reinstalled the windows XP. After re-installation, ubuntu grub is over writen by windows and only windows is booting.
Procedure to recover:
1. Boot through Ubnutu Live CD
2. Type $ sudo fdisk -l to confirm the disk availbility.
3. Here Ubuntu is installed in /dev/sdb7 which is / partition and /dev/sdb8 is swap and /dev/sdb1 is windows partition.
4. For modifying Grub, root partition to be mounted first.
$ sudo mount /dev/sdb7 /mnt
5. For installing grub on /dev/sdb , give following command,
$ sudo grub-install --root-directory=/mnt /dev/sdb
6. Rebooted the machine. Now grub options coming for Ubnutu. But If we select windows, it gives "Insert system disk" error and was not booting.
7. Now booted in Ubnutu OS and given following command for updating grub.
$ sudo update-grub2
8. Restared the desktop now and verified both Ubnutu and windows XP booting.
9. Problem solved.

No comments:

Ansible Playbook to collect uptime of servers

Hi,  This is to explain how we can write a small playbook to collect uptime of all servers in our environment. We can use our own server l...