# Boot.ini



## Lembas.Bread (Oct 23, 2005)

I have Ubuntu 5.04 and Windows XP Media Center standard with sp2 (shouldn't make a difference though) installed on two different partitions. Mainly I use WIndows since when I decide to go play a game or play media files (on my xp partition) I don't have to reboot and reselect. The problem is by default Ubuntu starts up since it is at the top of the list. Normally I'd just go My Computer>Properties>Advanced>Settings for something on there (I forgot) and change the default, but it seems that only works with other Windows operating systems. How can I change this? It drives me crazy!

When I go to edit my boot.ini in Windows I do not even see my linux OS on there. Here is my boot.ini file:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows XP Media Center Edition" /noexecute=optin /fastdetect


As you can see Linux doesn't show up. Perhaps I could modify this in linux, but I am a bit of a linux noob having used it only for 6 months or so and I am unsure of how to do so. If anyone can tell me what to do wheter in Linux or Windows it would be very helpful.


Additional problem: My USB keyboard(s) never work in DOS and BIOS, only PS2 works. In BIOS I have USB support and USB 2.0 enabled, but it still does not work. USB to PS2 adapters don't help either. Oh, I have Award BIOS by the way.

Help will be VERY appreciated!


----------



## Lembas.Bread (Oct 23, 2005)

Okay it doesn't seem to be my boot.ini instead it is GNU Grub .95 (or so it said during bootup) and it came with Ubuntu. I set my default boot to XP MC through command prompt, but that didn't help so I assume it is grub that configures this. I have no idea how to access this and since Linux was installed on my secondary partition I assume GNU Grub .95 was too, but I am not very good with Linux as I haave said before and I don't know how to make these changes myself. You cannot remove Grub, but it is possible to replace it with something like lilo or another boot prog. It would make my life much easier if I could simply change a setting or edit a line rather than swap boot progs.


----------



## LoneWolf071 (Nov 10, 2004)

LOL... the Boot.ini is for windows only... what did you need to do with it, if you need to change the boot order, you need to modify the MBR or the GRUB/LILO to change boot orfer...


----------



## Aeuzent (Sep 4, 2004)

Yeah boot.ini is nothing. Actually 90% of whats in Windows is nothing. What your looking for will be under linux usually in the /boot/grub/ folder. The file you need is called menu.list


----------



## Lembas.Bread (Oct 23, 2005)

Yes, I came to that conlusion myself (boot.ini was win only). I figured so much when I started, but I was willing to grasp on to any hope for this problem. I ahve been fixing so many problems with my various computers lately, ugh. As I said I am a bit of a Linux newbie so I am still familiarizing myself with the OS that I don't use all too often... TY for your help and I will post back here next time I reboot and check out that file path.


----------



## Lembas.Bread (Oct 23, 2005)

My menu.lst looks like this. I think I know what to do, but I am not totally sure and I don't want to cause problems with something I do not fully understand. If anyone wants to help and either tell me what to do or do it yourself and show the changes (in a different color or whatever) feel free!

---------------------------------------

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## 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'. 
default 0

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

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader	+1
#
# title Linux
# root (hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hda2 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## nonaltoption boot targets option
## This option controls options to pass to only the
## primary kernel menu item.
## You can have ONLY one nonaltoptions line
# nonaltoptions=quiet splash

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## ## End Default Options ##

title Ubuntu, kernel 2.6.10-5-386 
root (hd0,1)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot

title Ubuntu, kernel 2.6.10-5-386 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot

title Ubuntu, kernel memtest86+ 
root (hd0,1)
kernel /boot/memtest86+.bin 
savedefault
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/hda1
title Windows XP Media Center Edition
root (hd0,0)
savedefault
makeactive
chainloader	+1

----------------------------------------------------

Alright that is it.... now.... go!


----------



## Aeuzent (Sep 4, 2004)

You need to change default from 0 to 5, since XP is the 5th entry. (hint: count down the title entries.)


----------



## Lembas.Bread (Oct 23, 2005)

Okay, I am still a bit confused on exactly what line I should edit. Where is the default line? I cannot seem to find it! Could someone please paste the line if they could find it. Specifiy changes in a different color if it isn't too much trouble as well. Thanks again.


----------



## Aeuzent (Sep 4, 2004)

Change 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'.
default 0
```
to 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'.
default 5
```


----------



## Lembas.Bread (Oct 23, 2005)

Thank you so much Aeuzent! You are my god. When I get home I'll go do that. Thanks again!


----------



## Lembas.Bread (Oct 23, 2005)

It's a Read Only file.... how do I change that in Linux... god damn.... so close!


----------



## Resolution (Sep 17, 2005)

chmod +w filename


----------



## Lembas.Bread (Oct 23, 2005)

What? I did not understand that... break it down for the linux newbie... I have to say, this would have been done days ago in windows -.-


----------



## Resolution (Sep 17, 2005)

Hmm. On the Linux command line, type *chmod +w /boot/grub/menu.lst* to give the file "write" access.


----------



## Lembas.Bread (Oct 23, 2005)

Okay, I assume this is the linux eqivilent to command prompt in windows. Exactly what do I open and what do I type? (EXACTLY)


----------



## Resolution (Sep 17, 2005)

You asked how to change the permissions on the file in Linux, and I gave you that. What is the problem? EXACTLY, where are you? Are you even in Linux, or are you trying to edit that file from within Windows? 

Edit: Are you trying to do this from the Ubuntu GUI/desktop?


----------



## Lembas.Bread (Oct 23, 2005)

I'm staring at my Ubuntu desktop confused. I don't know what to open and/or what to type.


----------



## Resolution (Sep 17, 2005)

Well, why don't you right-click the file and go to Properties and change the permissions that way? 

You need to open a terminal to type the command I showed you before.


----------



## Aeuzent (Sep 4, 2004)

Don't change the permssions on menu.list. That's a really bad idea.


Instead just edit the file as root
in Ubuntu (if you havn't changed the password) type

```
sudo gedit /boot/grub/menu.list
```


----------



## Lembas.Bread (Oct 23, 2005)

Okay, when I right click>properties it tells me I'm "not the owner so you can't change the file permissions" and when I try the command line I get

"chmod: changing permissions of '/boot/grub/menu.lst' : Operation not permitted"


Now what? Stupid Linux...


----------



## Resolution (Sep 17, 2005)

It's only "stupid" because you don't understand it yet. Aeuzent, is correct. Use sudo to edit the file.


----------



## Lembas.Bread (Oct 23, 2005)

I'll try Auezent's thing when I get home. I assume I type it in the root terminal since your are saying to edit the root. I know Linux isn't stupid... I'm just frustrated... permissions are so much easier in Windows (also, easier to change if you are unauthorized... lol) so I just need to get used to these things. Thanks for you're help and I'll post in this thread (hopefully for the final time) with the results.


----------



## Aeuzent (Sep 4, 2004)

Things are also much less secure in Windows. Not to mention your lucky if they work at all.


But yeah root is the adminstrator user. It can do anything. There are two ways to log in as root. You can add "sudo" to the beginning of a command which lets you run that command as root. Or you can just type "su" which lets you log in as root at the terminal. In Ubuntu they do some obnoxious stuff with the root account and sort of set it up as a extension of the main account. This annoys me so I active the root account by typing "sudo passwd" (sudo to run it as root and passwd to change the password.

If you don't use this command then the root password should be your password


----------



## Lembas.Bread (Oct 23, 2005)

I went and changed and saved everything just like you guys said, but it still goes to Ubuntu right away on booup and not Windows... here is the code I changed

## 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'. 
default 5


-------------------------------

This is what it used to be

## 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'. 
default 0









By the way, even without those spaces between the default and the number it didn't work... Are the spaces important or do they not matter?


----------



## Aeuzent (Sep 4, 2004)

So it's not on the XP partition. But it's off Ubuntu right? 

Play around with it a bit, make it four. Try six. Tweak till it works.



The spaces may or may not matter. All depends on the particular script. I'd just take the other entries as a hint and use spaces.


----------



## ricer333 (Sep 17, 2004)

If you are logged in as your 'user' account and NOT AS ROOT. Do the following.

this is how it is for Fedora Core 4 your EXACT might be spelled a bit different...

Right click on the desktop. There should be an option to 'Open terminal' or something similar. A terminal window should appear.

type: su root
you should get a prompt asking for ROOT's password. So type in whatever password you set up for ROOT.

Now you can go to that directory, where ever it is, and modify the file accordingly.

Another option is to just log out and log back in as root. Then you should be able to change the file, and have EVERYONE (user) see the changes.


----------



## Aeuzent (Sep 4, 2004)

You don't need to type "su root" just "su"

And Debian based distros wont let you log in as root

Also Ubuntu does something stupid with the root accounts. Unless you create a root password on your own (sudo passwd) then there isn't one. This kind of annoys me so I always active the root account as soon as possible.


----------



## Lembas.Bread (Oct 23, 2005)

Yah, I never remember seting up a root password. How do I do it? In all honesty I really don't care if there is one or not. It'd be one less thing for me to remember. I don't have any sensitive data on my comp so security isn't the biggest issue.


I remember Ubuntu being referred to when I was talking with one of my friends about it (he got me started with this, but he is out of town for a while I I'd like this resolved) and he mentioned something being different with Ubuntu's root files. I also remember seeing something about this on ubuntu.com


----------



## Aeuzent (Sep 4, 2004)

Well security isn't just keeping hackers out. It also means preventing you from accidentially deleting a script vital to the OS.

Root can do anything. You can actually delete everything on the HD as root with one command. There are several reasosn to keep people locked out


----------



## Lembas.Bread (Oct 23, 2005)

Alright... any idea of I can really edit this file through the root though since I don't know the pass and I don't think I ever set one


----------



## Aeuzent (Sep 4, 2004)

It's your password by default


----------

