startup operating system

Asked by Namai

I partitioned the Hard drive so I could have the option of starting up window xp or ubuntu. I first installed xp and then ubuntu with the rest of the space. Now everything is working fine also Ubuntu is very slow to load... Anyway the question is that my friend for whom I did that, before completely moving to Ubuntu, would like the default booting with windows xp instead of ubuntu. Within windows its not possible for I already checked this out. I look in Ubuntu but couldn't find anything to swicht that default process with xp. Anybody can help me with that?
Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Allen Chemist
Solved:
Last query:
Last reply:
Revision history for this message
Ivan Lautaro Lemos (ivancete) said :
#1

Once booted Linux run (as root) the following order:
dd if=/dev/hdb1 of=/linux.bin bs=512 count=1
This will create in the root directory a file called linux.bin. Copying the file to a floppy (or where it will stop this if we can access from Windows to Linux partition).

3) We left boots Linux and Windows XP. At the root directory of C: There is a hidden file and readonly called boot.ini, we will edit (need administrator privileges, of course). It is a text file that will contain something like this:
[Boot loader]

Timeout=0

Default=multi(0)disk(0)rdisk(0)partiti ... XP Professional "/ fastdetect

[Operating systems]

Multi(0)disk(0)rdisk(0)partition(1) \ WI ... XP Professional "/ fastdetect

4) The first section added in the [operating systems] the following line:
C:\=linux.bin"GNU/Linux Fedora Core"

5) Then change the value of the timeout, it is time to wait until the manager boot the operating system by default. We will for example 20 (ie, 20 seconds).

6) If we want our default boot Linux, change the default line:
Default = c:\linux.bin
Keep changes to boot.ini

7) copying the file linux.bin (we have to diskette or to / from the Linux partition) from the root directory of drive C:

8) Restart Windows, and the restarting us pops a menu with options to boot Windows XP or Linux.

Another solution:
Here a program to edit the grub (in spanish):
http://chamter.wordpress.com/2007/07/01/grubed-herramienta-grafica-para-editar-el-grub/

Revision history for this message
Best Allen Chemist (alchemist) said :
#2

ivancete's solution uses the windows boot manager to boot into linux. This assumes the windows boot manager is the one being called, which if you installed Windows *THEN* Ubuntu, it will be the ubuntu boot manager (grub)

I would recommend using the "Another Solution" from above, which is this:

Click "Applications -> Accessories -> Terminal"
type sudo -i
(now you will have a root prompt, so you won't need to sudo anything)
type cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
(this backs up the boot configuration)
type pico /boot/grub/menu.lst

In here, this is the configuration for the list of things you see when you first turn the computer on, where you choose Windows.

At the bottom of the file, you will find a list of linux kernels, and the option to boot windows. Mine looks like this:
=====
title Ubuntu, kernel 2.6.20-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=f795e1c7-6754-4d5a-accf-0e474a164b94 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=f795e1c7-6754-4d5a-accf-0e474a164b94 ro single
initrd /boot/initrd.img-2.6.20-16-generic

title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=f795e1c7-6754-4d5a-accf-0e474a164b94 ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
======

Start counting from zero, which one in the list is Windows? (I don't have Windows installed, but let's say I wanted to make the 2.6.20-15-generic the default) In my case, the default for me would be two (and not three!).

With this number in mind, find the section that looks like this:
## 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'.
# 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

and change that number from 0 to 2

Save this by typing ctrl+o, then quit by typing ctrl+q, and try rebooting. Hopefully you should head for windows when it first starts up unless you change it.

Hope this helps!

Revision history for this message
Namai (desthein) said :
#3

Solve! Thanks!