Click to See Complete Forum and Search --> : OS Boot Order
rclendenon
07-14-2004, 09:39 AM
After many, many failed attempts I have successfully installed Linux (Libranet) for the first time. It is installed on a machine that also runs Windows XP. When I start the machine I am given the options of starting Linux or XP. However, it defaults to Linux and automatically loads Linux after a few seconds. I would like to change this so that it defaults to Windows XP. How can this be done? Please remember that I am a very inexperienced Linux user.
Thanks in advance
Dark Ninja
07-14-2004, 09:50 AM
Well, the first question is -- what bootloader are you using? (It's going to be Lilo or Grub.)
Answer that, and then we can help you. (The bootloader is what gives you those two options during bootup. Basically, you'll just need to edit one file and tell it what the default selection is. That easy!)
/etc/lilo.conf <-- If you use Lilo
/boot/grub/grub.conf <-- If you use grub. Although, I could be wrong about this, 'cause this may be specific to Gentoo's installation. Not sure.
Reply back with your bootloader, and someone here will give you more detailed instructions. :)
rclendenon
07-14-2004, 10:33 AM
Dark Ninja,
Thanks for the quick response. It appears that I am using the 'Grub' bootloader. Below is the /boot/grub/menu.lst file (i assume this is the correct file to edit). What exactly do I need to change to make XP the default?
Thanks again!
# /boot/grub/menu.lst - See: grub(8), info grub, update-grub(8)
# -------------------- grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5
# Pretty colours
color cyan/blue white/blue
# Display a splashscreen
splashimage (hd0,1)/boot/splash.xpm.gz
foreground bbbbbb
background 000000
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hdc2 ro hda=scsi hdb=scsi
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(single user mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## ## End Default Options ##
title Libranet GNU/Linux, kernel 2.4.21
root (hd0,1)
kernel /boot/vmlinuz-2.4.21 root=/dev/hdc2 ro hda=scsi hdb=scsi
savedefault
boot
title Libranet GNU/Linux, kernel 2.4.21 (single user mode)
root (hd0,1)
kernel /boot/vmlinuz-2.4.21 root=/dev/hdc2 ro hda=scsi hdb=scsi single
savedefault
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
title Windows on /dev/hdc1
rootnoverify (hd0,0)
makeactive
chainloader +1
Dark Ninja
07-14-2004, 10:39 AM
Okay, well, there is only one thing you need to edit.
The line that says:
default 0
Make it say:
[I DID NOT EDIT THIS]
default 2
[/I DID NOT EDIT THIS] :D
The reason for this is because, the list of the different boot options you have is:
title Libranet GNU/Linux, kernel 2.4.21
root (hd0,1)
kernel /boot/vmlinuz-2.4.21 root=/dev/hdc2 ro hda=scsi hdb=scsi
savedefault
boot
title Libranet GNU/Linux, kernel 2.4.21 (single user mode)
root (hd0,1)
kernel /boot/vmlinuz-2.4.21 root=/dev/hdc2 ro hda=scsi hdb=scsi single
savedefault
boot
### END DEBIAN AUTOMAGIC KERNELS LIST
title Windows on /dev/hdc1
rootnoverify (hd0,0)
makeactive
chainloader +1
If you notice, Windows is the third option. Now, your default should be Windows. (NOTE: This won't put it first in the list! However, it will be automatically selected.)
rclendenon
07-14-2004, 10:52 AM
Dark Ninja,
Due to the numbering sequence starting with '0' the correct setting turned out to be '2'. Thanks again for your help!
MorphiusFaydal
07-14-2004, 11:08 AM
Originally posted by rclendenon
Dark Ninja,
Due to the numbering sequence starting with '0' the correct setting turned out to be '2'. Thanks again for your help!
i was just readin this.. and i was about to say :)
where did that fourth install go? :-P
saikee
07-14-2004, 12:16 PM
To me the most important line is to change the timeout line's 5 (seconds) to say 30 (seconds) so that you can at least have time read the choices before they disapper.
Dark Ninja
07-14-2004, 12:20 PM
Originally posted by rclendenon
Dark Ninja,
Due to the numbering sequence starting with '0' the correct setting turned out to be '2'. Thanks again for your help!
:D Isn't that what I said? :D
(Thanks for the correction, BTW. Even a super genius like me makes mistakes at times.) ;) :p
To me the most important line is to change the timeout line's 5 (seconds) to say 30 (seconds) so that you can at least have time read the choices before they disapper.
Ah, but what if you only use one OS? (AKA - Linux) There is really no reason to have more than 5 seconds. Plus, of course, I never have to reboot unless I'm upgrading the kernel. :)