LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2011, 07:29 AM   #1
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Rep: Reputation: 1
Wish to make Windows the default OS instead of Centos 5.5


I have a dual boot PC, installed Win XP first, then Centos 5.5
While installing Centos, I set Centos as default. So at boot up time, it does give a choice of selecting from the two if pressed any key, otherwise boots Centos.

Now I wish to set it in such a way that Windows is the default OS to boot.

My grub.conf file:--

# 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 (hd0,5)
# kernel /boot/vmlinuz-version ro root=/dev/sda6
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5)
root (hd0,5)
kernel /boot/vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-194.el5.img
title Other
rootnoverify (hd0,0)
chainloader +1


I understand I have to edit grub.conf (change the default value to something else other than 0), but don't know what should I set it to.. How can i know information for my Windows partitions as well.

I run fdisk and get the output as follows but can't decide which value is to be set.. Should it be 1 cos Windows C drive is sda1 --

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2611 20972826 7 HPFS/NTFS
/dev/sda2 2612 19456 135307462+ f W95 Ext'd (LBA)
/dev/sda5 2612 5222 20972826 7 HPFS/NTFS
/dev/sda6 5223 7833 20972826 83 Linux
/dev/sda7 7834 8355 4192933+ 83 Linux
/dev/sda8 8356 8546 1534176 82 Linux swap / Solaris
/dev/sda9 8547 8677 1052226 83 Linux
 
Old 07-06-2011, 07:41 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
change default=0 to default=1. Job done.
 
1 members found this post helpful.
Old 07-06-2011, 10:21 AM   #3
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Original Poster
Rep: Reputation: 1
Thanks kewpie! That means my educated guess was right!
 
Old 07-06-2011, 10:25 AM   #4
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by acid_kewpie View Post
change default=0 to default=1. Job done.
Hey Chris, issue solved..but can u please further explain to me the whole output of fdisk above?
And what's that * in front of the first partition and why is it not in front of other partitions?
 
1 members found this post helpful.
Old 07-06-2011, 10:36 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
* is the dos bootable flag.

the whole output? Well it's the table of partitions and their sizes / boundaries. what specifically do you want to know?
 
Old 07-06-2011, 10:47 AM   #6
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Original Poster
Rep: Reputation: 1
And if Centos was the default OS then why is default set to 0 and not 6,7, or 9?
 
Old 07-06-2011, 10:49 AM   #7
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Original Poster
Rep: Reputation: 1
I was just curious about W95 Ext'd (LBA) in sda2...but I guess that means Extended partition..right
 
Old 07-06-2011, 10:58 AM   #8
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by acid_kewpie View Post
* is the dos bootable flag.

the whole output? Well it's the table of partitions and their sizes / boundaries. what specifically do you want to know?
I don't have any idea what a dos bootable flag is... but I guess it means that sda1 is the bootable partition for Windows.. am I right?
 
Old 07-06-2011, 10:59 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
yep. Another historical bit of crippling thanks to Microsoft.

---------- Post added 06-07-11 at 04:00 PM ----------

Quote:
Originally Posted by infinite_scale View Post
And if Centos was the default OS then why is default set to 0 and not 6,7, or 9?
it's not the partition, it's the number in the grub.conf list, which starts at zero.
 
Old 07-06-2011, 11:25 AM   #10
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by infinite_scale View Post
And if Centos was the default OS then why is default set to 0 and not 6,7, or 9?
Guys please reply..i am curious to know things and sleep won't come to me if I don't get the answers.. LOL! Please don't deprive me of sleep, be humane.. :-P
 
Old 07-06-2011, 11:27 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
I already did, calm down.
 
Old 07-06-2011, 11:35 AM   #12
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by acid_kewpie View Post
it's not the partition, it's the number in the grub.conf list, which starts at zero.
hmm... pardon me, but this is sort of confusing.. what do you mean by "number in the grub.conf list which starts at zero"..? If that's not related to the sda numbers then why changing these numbers changes the default OS..? Can you please explain in more simple manner..?

Thanks 4 help!
 
Old 07-06-2011, 03:42 PM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
how is that not simple?


default=0
timeout=5
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
hiddenmenu

title CentOS (2.6.18-194.el5) <-- 0
root (hd0,5)
kernel /boot/vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-194.el5.img

title Other <-- 1
rootnoverify (hd0,0)
chainloader +1
 
1 members found this post helpful.
Old 07-08-2011, 09:02 AM   #14
infinite_scale
Member
 
Registered: Feb 2011
Location: NCR, Uttar Pradesh, India
Posts: 74

Original Poster
Rep: Reputation: 1
Got it. Thanx.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make the default os as windows...? focused9 Linux - Newbie 1 08-19-2008 09:51 AM
How to make KDE Default Windows Manager VorlonShadow Linux - Newbie 4 07-07-2006 07:27 PM
How to make KDE my default on CentOS kencl Linux - Newbie 4 11-13-2005 11:18 AM
How to make Windows default boot Rhadryn Linux - Newbie 4 08-02-2005 04:31 PM
[ URGENT ] Make bootloader boot windows default !!! Mandrake 10.0 ninja-assassin0 Mandriva 2 04-05-2004 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration