Dual boot Linux and Windows

Linux vs Windows
If you want to install 2 OS on your PC, like Linux and Windows, I recommend you to install Windows first and then Linux. Why? Just to maintain the boot loader.
Installing Windows first and then Linux
When you install Windows first and then Linux, the boot loader that will be used come from Linux, placed in /boot/grub/menu.lst. You not need to be worried if the order installation like this, because Linux is very friendly and open to every OS, you can boot Windows using Linux boot loader, and of course Linux itself.
Installing Linux first and then Windows
If you install Linux first and then Windows, or you install Windows first and then Linux but after that the Windows broken and need repair and you repair it, Windows will automatically rewrite the MBR (Master Boot Loader), the boot loader that will be used come from Windows which is ignoring Linux, and just booting Windows itself. This will cause problem for your Linux, because the Linux can’t be boot. How to solve it?
- use your Linux live CD, don’t do the installation, just running the Linux in the live CD
- back up your boot file, placed in /boot/grub/menu.lst, but when you use live CD, your /boot is not the real /boot your Linux has but it’s belong to the Linux in the live CD, to obtain your Linux real /boot, you have to mount your Linux real / partition. After your mount, it will look like /media/[your mounted / drive]/boot/grub/menu.lst, then copy that file to you external drive, like flash disk.
- open your console or terminal
- write “sudo grub” -> enter
- write “root (hdN,M)” -> enter
- write “setup (hdN)” -> enter
- write “quit” -> enter
- write “exit” -> enter
- restart your PC
- if at booting selection screen, only Linux appear and no Windows, just go to your Linux, restore boot file (menu.lst) that you had copied to your external drive to replace the current boot file (menu.lst), and then restart again
(hdN,M) means
- N, the order of harddrive, if you only have one harddrive, the N should be 0, if you used second harddrive, the N should be 1, etc.
- M, the order of Linux OS partition on harddrive, if you place Linux at the first, the M should be 0, if after 1 other partition, the M should be 1, etc
for best pratice, see in you boot file (menu.lst), look at the Linux Section, you will see the (hdN,M)
No comments yet.