Restoring Grub2 on Ubuntu 9.10

It's often required to have a dual boot on any machine owing to the compatibility of the application software. I recently came across a real messy scenario where had to install Windows several times on my Ubuntu/XP dual-boot system.

This is a bit risky case for two reasons. Ubuntu 9.10 comes with Grub2 and conventional Grub restoring methods would not be applicable and also Windows 2008-sp1 is know to be a very restricted OS with huge amount of security features.
However, I managed to restore everything after installing Win 2008. Here are the steps that I followed.

Following procedure will be valid on Ubuntu 9.10/Win XP, Vista, 2008, 7

  • You need the Ubuntu 9.10 live CD
  • Boot from live CD
  • Go to 'System->Administration -> Disk Utility'
  • Find out the partition that you install Ubuntu (root). eg. 'sda4'
  • Then open a terminal and mount the partition that you found above.
  • 'sudo mount /dev/sdXY /mnt' where X - Device Descriptor and Y-Partition Id
  • 'sudo grub-install --root-directory=/mnt/ /dev/sdX'
  • Restart and boot Ubuntu (previous installation, you won't see the newly installed windows OS on grub screen)
  • Update Grub - 'sudo update-grub' to get both OS' on dual boot

This works fine for me on 64-bit Ubuntu/Windows system.

Comentários

Postagens mais visitadas deste blog

Understanding Reactor Pattern with Java NIO

A new journey.. A new working place.. WSO2 Inc.