Windows/Linux Boot

Status
Not open for further replies.

Bumblebee Tuna

In Runtime
Messages
213
I just installed Linux on a separate HDD. When I start my PC, it gives me the option of which OS, to boot to. Linux is first and Windows is second. I would like to change this so Windows will boot first (automatically). Then if I want to go into Linux, I will have to do it manually. Does anyone know how to change this?
 
Yeah, I'm assuming you're using GRUB for your bootloader. Boot into Linux and open a terminal, if you're using GNOME, type "sudo gedit /boot/grub/menu.lst" and if you're using KDE, type "sudo kate /boot/grub/menu.lst".

Then scroll down to where the OS entries are, you'll see that Windows is last, just cut and paste it's entry (the whole block of code that starts with the title line and ends with (I think) chainloader +1. Paste it above Linux's entry. Then save the file, reboot your PC, and it should be fixed.
 
Since GRUB is the most popular boot loader, I'll assuming your using that one.

Try this, when the boot selection screen comes up, count the line that your Windows is on. So if they were listed like this, then their respected numbers would be:

0. Ubuntu Linux
1. Windows RG
2. FreeBSD

So the one you want is on line 1. Now that you know this, press 'C' to get the command line interface to grub and type in:

"default 1" without the quotes (number may be different if your Windows was on a different line)

I'm not 100% sure on this, but give it a try and let me know how it works.
 
I don't think that will work, I haven't had any success in changing GRUB options unless I boot into Linux. I had a problem when I reinstalled Windows and it installed on a different partition than previously, both OS'es were moved to different partition numbers. I could edit the boot line temporarily to boot, but it wouldn't save from within GRUB.
 
I think I'm right... but if you've tried it before... then I guess I'm wrong.

If I wasn't at work right now... I'd test it...

Edit: Though, I believe the "default num" is in that menu.lst file too... if for some reason he would rather have Windows as the second option, but still the default, he can.
 
Yeah, I'm assuming you're using GRUB for your bootloader. Boot into Linux and open a terminal, if you're using GNOME, type "sudo gedit /boot/grub/menu.lst" and if you're using KDE, type "sudo kate /boot/grub/menu.lst".

Then scroll down to where the OS entries are, you'll see that Windows is last, just cut and paste it's entry (the whole block of code that starts with the title line and ends with (I think) chainloader +1. Paste it above Linux's entry. Then save the file, reboot your PC, and it should be fixed.

This is the best way to do it. The only thing is that it is absolutely necessary to put your Windows entry before the line that says ### BEGIN AUTOMAGIC KERNELS LIST. This is a section where it automatically adds updated linux kernels to boot to. If you accidentally put it at the top of the Automagic list, it will just put updated kernels above your Windows entry and that will be the default boot. But if you put it before the Automagic line, it will always be on top.

aetherh4cker's method does work as well. The thing about it is that when new kernel updates are "automagically" entered, the line numbers change. You're better off going with the first option of cutting and pasting your Windows entry to the top, unless you know you will never update your kernel.

edit:
You can also change the line in menu.lst that says "timeout" to be whatever number of seconds you want before it automatically boots to the default.
 
Status
Not open for further replies.
Back
Top Bottom