Thursday, July 19, 2007

edit the grub boot sequence in Ubuntu 7.04 Fiesty Fawn

installed ubuntu 7.04 day before yesterday. this will be my 3rd or 4rth attempt at migrating to linux.

first thing, was to either write enable my other windows partitions, so i can continue my torrents from linux..

.. since i couldnt manage that, i decided to edit the grub loader and make windows vista the default os...

that wasnt as easy. i'd forgotten how i did it the last few times...

so for future reference am putting this here:

1) to edit the boot sequence, you need to edit the menu.lst file under root/boot/grub/

2) the file is of course write protected, the only way to edit it is with "root" priviledges. for the linux nooby, Root is like the default Administrator account on Win xp.
so log out and try to log in as root.....
didn't work? well thats coz the guys behind ubuntu realised, that allowing us noobs to log in as root was like giving a 2 year-old a stick of dynamite and a blowtorch.

3) anyway, your expected to use "sudo" (don't ask me what that is i don't know yet).....
don't know how to use sudo? then look online and findout yourself or... just read on coz i already went all over the web and figured out what to do :) .

4) heres what you do:

open a terminal ( that thing that looks like the command prompt in Win XP)

type this

gksudo gedit /boot/grub/menu.lst

hit enter

voila the menu.lst should open with save options enabled.

5) now at the top or near the top, theres this value:

default=0

this is the only thing you have to edit.

the "0" refers to the first OS listed in your boot list...by default ubuntu something or other.


just scroll down through all the mumbo jumbo untill you come to a list of all your bootloader OS options - something like:

linux....

linux safemode....

linux something or other mode...

non linux partition detected....

windows something or other...

note that windows is the fifth on the list here...
therefore go back to the top of the file and change
"default=0"
to
"default=4"

basically the entryies are numbered from 0 onwards... so 0 represents the first item on the list... and so on

thats it. save and close. now when you restart the system, windows will be the befault otion in the grub loader

8 comments:

chaitanyak said...

anyone know any comprehensive yet "clear" instructions on wine ?

mank1 said...

sudo = Super User DO Thanks for the instructions on grub.

chaitanyak said...

cool! thanks for the sudo info :)

anonymous said...

Snag writes:Heey, many thanks for this article! been looking for instructions on how to make my winxp load by default.

chaitanyak said...

Glad it was useful :) i actually started this blog so i could jot down stuff like this, that i know i'm going to forget later on. :coffee:

anonymous said...

Anonymous writes:

any idea what i can do to install xp when all i have on my pc is Ubuntu?In other words i cant boot with xp because i dont have it installedI have my XP cd, how do I boot from CD to install it?

anonymous said...

santos writes:

Thanks for the input, most sights come with mambo jambo eexplanations and explanatios its better getting the informatio plain and simple raw.CPS

chaitanyak said...

"Anonymous" the ideal(easiest) way out, is to instal xp first and then ubuntu...however i have been in your situtation before..heres what i did - i used a "bootable" xp instalation disc to instal xp and then used "super grub boot disc"(google it) to fix the grub bootloader that xp messed up during installation..this way i was able to continue using my old tweaked up ubuntu installation. :)