LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need help configuring GRUB to add the correct windows partition (Ubuntu) (https://www.linuxquestions.org/questions/linux-newbie-8/need-help-configuring-grub-to-add-the-correct-windows-partition-ubuntu-544976/)

gnanda66541 04-10-2007 07:59 PM

Need help configuring GRUB to add the correct windows partition (Ubuntu)
 
I am using Ubuntu 6.06 Dapper Drake, and when I installed it, it didn't let me configure GRUB like some distros do. It just so happened that my computer has 2 windows partitions, a normal one, and a recovery one. Automatically, it added the recovery partition as the only windows partition, and now I don't know how to add the normal one to GRUB.

sda1 is the recovery partition, and sda2 is the normal partition.

custangro 04-10-2007 08:01 PM

Post your /etc/grub.conf file

-custangro

Yoda3114 04-10-2007 08:03 PM

Configuring GRUB
 
It involves editing the GRUB config. Please check here:

http://www.geocities.com/epark/linux...w2k-HOWTO.html

Yoda3114 04-10-2007 08:23 PM

Any luck?? oh and sorry custangro you replied while I was typing :-)

Yoda3114 04-10-2007 08:24 PM

Sorry double posted by accident

gnanda66541 04-10-2007 10:12 PM

yea i got it to work, but i couldn't find the grub.conf file. Also, I was wondering how to make windows the default OS.

sn68 04-10-2007 10:53 PM

you can look for /boot/grub/menu.lst
for making windows default, change the value of default keyword, default value is 0, which corresponds to first OS, next is 1 and so on

Junior Hacker 04-11-2007 04:11 AM

Windows....................
The default OS.......................?

Them's swear words around here, you could have used reverse psychology and made it look like you wanted to make Linux the default, and use the response to figure out how-to.

gnanda66541 04-11-2007 05:35 PM

Sorry about that junior Hacker, but other people have to use this computer, and they don't know anything about linux.

Now what do i change?

Okay this is what is says:

title Ubuntu, kernel 2.6.15-23-386
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/sda3 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-386
savedefault
boot

title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/sda3 ro single
initrd /boot/initrd.img-2.6.15-23-386
boot

title Ubuntu, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows NT/2000/XP
root (hd0,0)
savedefault
makeactive
chainloader +1


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Microsoft Windows XP Home Edition
root (hd0,1)
savedefault
makeactive
chainloader +1

Junior Hacker 04-11-2007 05:47 PM

It was just a little Linux humor, nothing serious.

My Debian has allot of bullshit in the menu.list, so I just took a small section out of it, you should have a section similar to this:
Code:

# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default                0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout                5

Any line commented out with a hash (#), is not read by the system, those like "default 0" and "timeout 5" are. The default specifies which entry to boot if you don't select one from the list, making it the default. Grub starts counting from (0) not (1), so the first system in the list is number (0), you may want to change the default to (3) for Windows NT/2000/XP, or (4) for Microsoft Windows XP Home Edition. If you want it to wait longer for you to select a system, change the "timeout" to a value you prefer, mine is set at 5 seconds.

Junior Hacker 04-11-2007 05:56 PM

Sorry, it should be number (4) or (5) because you have that "title Other operating systems", I'm pretty sure ever time the word "title" is mentioned counts as another entry.

gnanda66541 04-11-2007 06:10 PM

hmm its strange it says its read-only, and I can't save my changes to it

Junior Hacker 04-11-2007 06:39 PM

You can also remove that "title Other operating systems:root" if you don't want it to show up in the list and back up the default by (1).

gnanda66541 04-11-2007 06:57 PM

Thanks for your help so far.

the problem is that it wont let me alter the file, so I can't make the changes to it

saikee 04-11-2007 07:00 PM

Nothing strange if you can't change menu.lst, especially with a graphic editor. This is because Ubuntu by default disallows a user log in a root to the GUI. No root privilege no change to any system file.

You have to edit the /boot/grub/menu.lst in terminal mode with the text editor like vi by prefix the command with "sudo" like
Code:

sudo vi /boot/grub/menu.lst


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