LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Change boot order? (https://www.linuxquestions.org/questions/linux-software-2/change-boot-order-136719/)

panicboy 01-20-2004 10:40 AM

Change boot order?
 
I'm a newbie to Red Hat 9. I'm running a dual-boot system, and I want to change the default OS to XP instead of Linux. How do I do this? I've found lots of info on dual-booting, but none on this specifically.

TIA...

Rounan 01-20-2004 10:46 AM

You need to edit your /etc/lilo.conf file to tell Lilo what you want.
(I'm assuming you're using LILO. if you're using grub, read the man pages on grub's config file)

First do: man lilo.conf
Read that to get an idea of what's going on in the file.

Somewhere near the end of the file, you should see something like:
------------------
default=Linux

image=/boot/vmlinuz
label=Linux
#
# Maybe some other junk here
#

other=/dev/hda2
label="Windows (hda2)"
----------------------------

What you need to do is change the "default" value to whatever label your windows boot is - in this case:

default="Windows (hda2)"

But you call it whatever your local label is.

Cheers!
--Rounan

panicboy 01-20-2004 02:39 PM

Quote:

Originally posted by Rounan
You need to edit your /etc/lilo.conf file to tell Lilo what you want.

Sorry, I need a bit more hand-holding than that.

What do I edit it *with*?

Rounan 01-20-2004 02:49 PM

First, read man lilo.conf

man lilo.conf

Then, become root:
su
<root pword>

A good habit to get into is backing up working config files before you change them. so:
cp /etc/lilo.conf /etc/lilo.conf.old

Then, use a text editor to alter the file.

nano /etc/lilo.conf
OR
pico /etc/lilo.conf
OR
emacs /etc/lilo.conf
OR, if you're REALLY in a pinch,
vi /etc/lilo.conf

but if you have to use vi, first google up a howto on it - it's not at all intuitive. If you can avoid it, you don't need to learn it. ;)

If you ever want to read a file without changing it (a good idea to get a feel for different config files without worrying about screwing something up), you can:
less some.conf

Cheers!
--Neil

panicboy 01-21-2004 11:15 AM

Resolution:

1. Determined that my RH9 installation used GRUB. How? In the splash screen detailing my boot options, the word "GRUB" appeared at the top of the page. This news flash brought to you by "Duh!", the Journal of the Obvious.

2. Checked the /etc/ directory by entering my home folder thru the GUI, then going up a couple of levels until I saw /etc/. In that directory, there was a file called grub.conf

3. Using the terminal, man grub.conf got me nowhere. man grub got me some basic info, directing me to info grub, which was an index of the manual contents. I got fed up at this point, so I googled "boot grub" and found a web page with some helpful info.

4. Now into the actual file, following the helpful instructions above and substituting grub where it says lilo. grub.conf looks like this:

Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,1)
#          kernel /vmlinuz-version ro root=/dev/hdd3
#          initrd /initrd-version.img
#boot=/dev/hdd
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-6smp)
        root (hd0,1)
        kernel /vmlinuz-2.4.20-6smp ro root=LABEL=/ hda=ide-scsi
        initrd /initrd-2.4.20-6smp.img
title Red Hat Linux-up (2.4.20-6)
        root (hd0,1)
        kernel /vmlinuz-2.4.20-6 ro root=LABEL=/ hda=ide-scsi
        initrd /initrd-2.4.20-6.img
title DOS
        rootnoverify (hd0,0)
        chainloader +1

5. Time for baby steps. I replaced title DOS with title WinXP and saved the file, then rebooted; noticed that the change appeared in the splash screen. So far, so good. Next I copied/pasted a few lines from the googled GRUB page, saved, and rebooted; Linux was still the default. Finally, I tried changing the order of the entries so that WinXP came before the 2 Red Hat Linux entries. Success! Now I can walk away during the boot process and still have the Shuttle box boot into XP!

Thanks to Rounan for the assistance.

nafsnipe685 01-21-2004 01:26 PM

ill try to explain a little, but timeout=10 means that it give you ten seconds before it boots the default os
and default=0 means the first os in the list
thus try default=2
if thats not it its probably
default=3

panicboy 01-21-2004 05:55 PM

Yeah, I figured that stuff, but didn't mention it. Probably should've for the benefit of the very few individuals even further from Clueville than myself.


All times are GMT -5. The time now is 08:48 AM.