Thursday, May 14, 2009

How To Properly Uninstall Linux + GRUB Bootloader

To do this, you have to do two steps:
1. Stop using GRUB as your bootloader and resinstall the MS Bootloader that was there originally for Windows.
2. Format/Remove the partition with Linux and GRUB bootloader on it.

The following are steps explains how to do this for Windows XP, but these steps also work with Vista and Windows 7.

How to do it:

1. Reboot your laptop with windows 98 start up disc or Windows XP CD and type the command “fixmbr”.

2. Above command will repair ur bootloader and rewrite ntldr which will replace grub loader of Linux and now you can see only Windows XP in the boot menu.

3. Now Boot up in Windows xp.

4. Go to Start > Control Panel > Administrative Tools > Computer Management

5. Go to Disk Management under “Storage”

6. Select your Hard Disk and then the linux partition.

7. Delete the linux partition this will delete linux and grub.

8. Thats it done now boot your laptop or desktop normally it will be booted by default in windows xp.


Sunday, May 10, 2009

Linux + Multibooting With Multiple Versions of Windows

In order to have a multi OS system with Windows as one of the OS installed. You must install Windows first or else you would have to install a bootloader program like GRUB manually after because the Windows installation would install the Windows boot loader in the boot sector of the drive. There is nothing with this if you don't want to use Linux again, but the Windows boot loader only recognizes Windows OS and will only let you start up those OS.

Once GRUB is installed, you can modify it to say whatever you like.

**NOTE** This guide is referring to the original GRUB Bootloader, now known as GRUB Legacy. For GRUB 2, please see a later post called 'Everything You Need To Know About GRUB 2'.

In my case, I had Windows Vista Business installed, then I installed Windows 7 RC to try it out and Linux Mint 7 RC as well. With Linux Mint being the last OS I installed, my computer booted into GRUB no problem.

You can modify the GRUB boot menu (and booting options) in the menu.lst file, located at:
/boot/grub/menu.lst

In order to modify this file, you must have administrative rights (sudo). For the Linux OS, you would have seperate sections for it, but for Windows, you would have one that would load the Windows bootloader (loading another bootloader is called chain loading).

In order to load the Windows boot loader, you must figure out which harddrive/partition it resides in. It is usually installed in the boot sector of the disk you installed Windows on, although once a partition is marked active (required to install an OS on it), then it will be at the head of the partition.

In Linux, the first harddrive would be called hd0, second hd1, third hd2, etc. The first partition would be called sd0, second sd1, third sd2, etc. In my case, my laptop only has one harddrive, but three partitions. My Windows boot loader is on the second partition, which is (hd0,1). I also have a copy of the Windows bootload on (hd0,4) from my installation of Windows 7. I could use either one. Choose the one of the OS that you would keep the longest.

The Windows load sequence should look something like this:

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Windows Vista/7 (loader)
rootnoverify (hd0,1)
savedefault
makeactive
chainloader +1
boot

You could also do things, such as hiding a partition before going to the Windows bootloader, like follows:

# I added this for Windows 7
# on /dev/sda5
# Hides the Vista partition (sda2)
title Windows 7 (hide Vista)
hide (hd0,1)
rootnoverify (hd0,4) # Windows 7 installation also installed a bootloader
chainloader +1
makeactive
boot

*NOTE: Your other bootloaders should have "unhide (hd0,1)" in order to see that partition again. You can't hide the harddrive/partition that has the bootloader, otherwise there would be no way to boot into it.

This would hide the partition that Vista is on when I load Windows 7. That means that that partition will not be available when I'm running Windows 7. That's ok for me because those files were not editable without having the corrent user rights to modify them.