Hosting more that one OS on your hard disk can be a pain if you’re not really sure on configuring the boot loader. I’ll confine the scope of this post to parenting only Debian based Linux OS ( Ubuntu ) and WIndoze. Because for the most part of it, I’ve only worked on them.

Why would you have to Install / reconfigure Grub in the first case?

1) You had to install Windows after you installed Ubuntu/Linux which led to the Grub ( Previously installed by Ubuntu ) to be over written by the Windows Boot loader.

2) You screwed up an installation right at the wrong spot and now you can boot neither Windows nor Linux.

Installing Grub through a Live CD:

  1. Insert the Ubuntu Live CD into the tray and restart your system
  2. Once you’re at the Live CD Desktop, Navigate to the terminal ( Applications>Accessories>Terminal)
  3. Type sudo fdisk -l /* This would list all the OS installations and drives that you have. Make note in which drive Ubuntu has been installed – Let’s say it’s hda3*/
  4. Next we’ll have to enter the Grub shell. Fot that type sudo grub
  5. In the grub menu type find /boot/grub/stage1 . This would return a listing of the drives in which the OS’s/ boot records are installed.
  6. Identify where Ubuntu’s Grub is on, by relating the output from step 3 and the above output.Now to let the Grub shell know what grub files are to be used, type root (hd0, 3) /* You’ll have to change this accordingly as per your output from step 3*/
  7. Now to install Grub on MBR,  type setup (hd0)
  8. By now, You should have got a success message from the grub shell telling you that the Grub has successfully been installed.
  9. Type quit and exit the terminal. Reboot and this should have properly fixed your Grub.

Installing Grub using the Super Grub disk:

If in case you do not have a Live CD, you can download a super grub disk and use it to setup the Grub for you. Check this page for more info on using the Super grub disk.

Note:

Installing Grub in your MBR will overwrite WIndows bootloader. If in case you do not find Windows in your boot menu after rebooting, all that you have to do is to make an entry in the Grub boot list.

Making an Entry of Windows in the Grub boot list:

  • In the terminal , type sudo gedit /boot/grub/menu.lst /* Always have a backup of this file. Screwing this will only cause more trouble */
  • Add the following lines wherever you would like the Windows entry to be listed

title WIndows XP Professional Edition

root(hdX,Y) /* Based on the fdisk -l output. Note: /dev/hda1 ==(hd0,0). /dev/hda2==(hd0,1) –> Grub  convention */

savedefault

makeactive

chainloader +1

  • Save Menu.lst and reboot. This should resolve the issue

Just ten minutes before I was supposed to leave for work yesterday,  I had this remote urge to get back Hardy running on my desktop. I had it installed but because of a windows re-install, the GRUB boot menu was overwritten. So all that I had to do was to re-install Grub!

 Powered the CPU , inserted Gutsy’s Live CD, logged into the desktop and fired a few commands in the terminal. The shell gave in a success message and I quickly rebooted to check if the Grub was installed. And boy, it did get installed right in the first go :-) !

I had to catch the 10:45 service so I powered the CPU off and ran my might to reach in time. Post work when I get back home and turn on the Desktop to check back on sweet old Ubuntu, I’m in for a surprise – I didn’t remember the Password for my Admin acccount ! Even before my instincts to re-install the OS took control, I rebooted and logged into Windoze. Googling a bit had even more surprises in store – A few posts in the Ubuntu Forum stated a minutes walk to Glory - You could override the admin’s password by a few quick commands! And till date, I was thinking Linux gave me all the security in the world. How wrong I was ! Or was I ?

This only made me think if Linux had a backgate entry, Bill’s Windoze should as well. Again thanks to Sergey and Larry, I realized hacking the windoze admin password was a cake walk too! Damn, it took me so many years to realise that. It was no damn rocket science!

This incident forked out a few salient points

1) If there’s a password – It can and will be hacked. It’s only a matter of when and how!

2) Linux is still a better vault when it comes to data security- Check this link

3) If you’re really worried about data security, You have every reason to be! It’s a murky world out there ;-) !

4) We’ve got one of the best processors – the Brain. High time we knew how to use it effectively :-) !

With the Left and the Right is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

With the Left and the Right

There is much more in life…