Saturday, September 16, 2006

Changing Default OS in Grub : Incredibly Stupid way i did it

Ok i installed Kubuntu (After destroying my master boot record and a whole lot of other stuff , did it without destroying my windows files thankfully), but now the problem was that mostly dad would want to use windows when he has to edit his excel files and all , so what Grub did was made Linux my default OS. So i send a frantic SMS to my bro in Hyderabad who tells me to edit the menu.lst file in /boot in Linux.

Cool enough , i boot up Kubuntu which manages to find an error with my hda1 every time (why dont you just leave my FAT partition alone :angry: ) ,i login and i start to edit the menu.lst file , i figure out the default section and change the OS number to 4 (Index starts from 0 for the uninitiated) , then i click on save. WHAT ????

I dont have permission to change it , i was logged in with root for god's sake , so i wasnt going to spend more time to figure this and my Internet had very happily taken the oppurtunity to be off while i needed it. Here it gets stupid.

"JUGAAD" starts here --

I make a copy of menu.lst and save it to my FAT drive , edit it using microsoft notepad, and now use Partition Magic to replace the file on the Linux partition through windows. And on my next boot Windows was default again.

Phew !!!! , I know there is an easier way but please dont tease me : P

1 comment:

Rohit said...

Which editor did you try to open it with? Did you login as root to XWIndows/KDE also? If you had used the GUI editors then that was the problem.

You should have tried

sudo vi /boot/menu.lst (that's the file I think)

Press insert to get into editing mode and edit the file as required. To save and quit, press ESC to get into command mode from the insert mode, then type :wq (w for write and q for quit) and this will save and return you to the command prompt. I cannot get more explicit in my instructions than this, but then, I can always try ;)