I've got a request from one of our users to describe how to make a clean Windows reinstall when you're dual-booting or have Linux pre-installed, of course it shouldn't effect your previous stuff it in any way
OK, there are 4 steps to do that in secure way.
Step 1: Back up your boot menu (GRUB loader)
Boot into Linux
Go to Applications > Accessories > Terminal
Then type:
- Code: Select all
sudo gedit /boot/grub/menu.lst
This file has all the information about boot options. Scroll down that you should see content between
## ## End Default Options ##
and
### END DEBIAN AUTOMATIC KERNELS LIST
These are the Linux boot options you see when starting your PC.
Make a backup of this file by going to File > Save As and select a different location (I recommend a jump drive). Optionally you can simply copy and paste full contents into a new text file.
Remember: It is easy to mess up this file which will cause full re-installation of Linux unless you do know how to manually re-write it from scratch.
Step 2: Creating partition for Windows installation
This step applies only to folks with single partition or without previous Windows/OS2 installations.
Restart your system
Boot with Linux Live CD and start Live Session User (Try Ubuntu without any change to your computer)
Go to System > Administration > Partition Editor
Right-click on the main data partition (in most cases /dev/sda1 - your Linux space)
Select Resize/Move
Move the slider from the right side in order to shrink the partition and create free space on your hard drive for Windows
Then click Resize/Move to confirm and Apply changes.
Step 3: Windows installation
Restart your system
Boot with Windows installation CD
Install Windows
The installation will detect Linux partition as Partition 1/2 [Unknown], however Unpartitioned space is where you need to install Windows. You will also get some message... Just ignore it and finish installing Windows, basically what it says is that you will not have dual boot options, but no worries we will fix it in the next step
Step 4: Restore the GRUB loader (Final Step)
Restart system
Boot with Linux Live CD and start Live Session User (Try Ubuntu without any change to your computer)
Go to Applications > Accessories > Terminal
Then type:
- Code: Select all
sudo grub
And a few more commands (press Enter after each one):
- Code: Select all
root (hd0,0)
- Code: Select all
setup (hd0)
- Code: Select all
quit
- Code: Select all
exit
Reboot the system
Finally you'll get the GRUB loader without Windows Vista if that's what you've installed (has to be added manually)
Boot into Linux
Go to Applications > Accessories > Terminal
Type in:
- Code: Select all
sudo gedit /boot/grub/menu.lst
Scroll down to the bottom and type in the following:
- Code: Select all
title Windows XP
root (hd0,1)
makeactive
chainloader +1
Save & Reboot
When the GRUB loader launches hit ESC for the menu
Tip 1: If you want to make the GRUB menu always available, boot back into Linux and edit the MENU.LST file
Type in:
- Code: Select all
sudo gedit /boot/grub/menu.lst
Find the "hiddenmenu" text line and change it to "#hiddenmenu"
Tip 2: To increase the menu timeout, change the default timeout 3 in the same MENU.LST to something you want.
HAPPY INSTALLING