LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Grub loader (https://www.linuxquestions.org/questions/linux-general-1/grub-loader-263759/)

BorderPatrol 12-07-2004 04:38 PM

Grub loader
 
I have FC3 and XP on a dual boot. How do i change it so that it defaults to XP? I need it that way for the family.

michaelk 12-07-2004 04:50 PM

Edit the /etc/grub.conf file and change the default value. The value starts at 0 (zero) for the first menu i.e. title entry and counts up from there.
Example:
...
default=1
...
title linux (value = 0)
.....
title windows (value = 1)
...
title kernel xxxx (value = 2)
....
The default boot is windows.

MartinN 12-07-2004 04:51 PM

Hi!

You need to edit the file (in Linux) /etc/grub.conf

Open the file in some kind of text editor. It looks a little 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/hda3
#          initrd /initrd-version.img
#boot=/dev/hda2
default=0
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.7-10)
        root (hd0,1)
        kernel /vmlinuz-2.4.7-10 ro root=/dev/hda3 hdc=ide-scsi
        initrd /initrd-2.4.7-10.img
title Windows 2000
        rootnoverify (hd0,0)
        chainloader +1

The easiest thing is to move the block starting with "title" and ending with "chainloader +1" above the block starting with "title Red Hat Linux". Alternatively, change "default=0" to "default=1". Next time you boot, it will be as you wanted.

If your file looks very different from this, or if you hesitate, post your file here and we can help you sort it out.

Good luck!
Martin

BorderPatrol 12-08-2004 12:03 PM

Ok I will give it a try when I get home from school and see what happens.

BorderPatrol 12-12-2004 02:18 PM

Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd1,0)
#          kernel /boot/vmlinuz-version ro root=/dev/hdb1
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.681_FC3)
        root (hd1,0)
        kernel /boot/vmlinuz-2.6.9-1.681_FC3 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.9-1.681_FC3.img
title Fedora Core (2.6.9-1.667)
        root (hd1,0)
        kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.9-1.667.img
title Other
        rootnoverify (hd0,0)
        chainloader +1

That is what mine looks like. Should I just change "default=0" to default=2"?

Mathieu 12-12-2004 02:46 PM

Yes.
Change "default=0" to "default=2"

BorderPatrol 12-12-2004 06:36 PM

Thank you


All times are GMT -5. The time now is 05:01 PM.