Saving changes to Grub

Asked by Mike Lighton

I am new to Ubuntu 8.10 (Linux for that matter). I am running a dual boot w/ XP Pro. Everything at present is operating fine however after a couple of installations of Ubuntu that didn´t go well, the boot screen looks a little nasty and for the present time I would like to default boot to XP. After reading several, several search results about changing the menu.lst file I just can´t get it to work correctly. Even if I just make a small change in the title ¨Other operating system¨ the change does not appear on the reboot. I don´t receive any errors etc. Is there another file somewhere I need to change. If I have edited the menu.lst file once I have done it now at lease 50 times trying different default numbers, putting the XP section up in the top section. Any help would be appreciated.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Mike Lighton
Solved:
Last query:
Last reply:
Revision history for this message
Bhavani Shankar (bhavi) said :
#1

Mine is like this

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

title Ubuntu 8.04, kernel 2.6.24-16-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=9b2f199f-93d9-4a84-8510-5fd3f70f9723 ro quiet splash vga=788
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=9b2f199f-93d9-4a84-8510-5fd3f70f9723 ro single
initrd /boot/initrd.img-2.6.24-16-generic

### END DEBIAN AUTOMAGIC KERNELS LIST

Default is xp (for my dad to do his work

Revision history for this message
Mike Lighton (mlighton) said :
#2

Thankyou for the info. But, I don´t understand how this fixes the save problem. For instance, if I add (which I have tried also) additional information in title for say Übuntu 8.04, for mine to read ¨Ubuntu 8.10 Working¨. The change never appears. I have also tried performing sudo update-grub after the change.

Revision history for this message
Hemanth (hemanth-hm) said :
#3

GRUB is the default Ubuntu boot manager. Lost GRUB after installing Windows? See https://help.ubuntu.com/community/RestoreGrub -
GRUB how-tos: https://help.ubuntu.com/community/GrubHowto

Revision history for this message
adsadasda (asdsadasdsa-deactivatedaccount) said :
#4

try edit menu.lst like this:
open the terminal and first make a backup file of menu.lst like this:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
then
sudo nano /boot/grub/menu.lst
 do any changes you want and press ctrl-x and press y and then enter
tell me if it changed...

Revision history for this message
Mike Lighton (mlighton) said :
#5

stelios - Sorry to say it didn´t work. When I make the changes in either Gedit or Nano then go back into the menu.lst file, the file does in fact reflect the changes that I made. However, when I reboot the boot acts like it´s using a different file. Just now to try your fix I inserted the word Windows in the title line that displays other operating systems. So now the line should read ¨Other operating windows system¨. While this is a non-operation change it is also non-intrusive and should not create errors but reflect changes made to the file. But again, it appears that the file I am editing and the file that is booting is not one in the same.

Revision history for this message
Tom (tom6) said :
#6

Ok, get to a command-line and try

sudo grub

find /boot/grub/stage1

This will probably show that you have grub installed in a couple of places. Find out which one is your Ubuntu one, remembering that grub counts from 0 where linux starts from "a" or "1" (eg sda3 = (hd0,2)) and Windoze starts from "C: drive". you can check this from the Partition Editor in
System - Administration - Partition Editor
but be careful not to accidentally click anything like the "Apply" button - just use it to look up what's going on. Then go back to the grub command-line and type this (after changing the numbers around to point at the right drive and partition

root (hd0,2)

setup (hd0)

Now edit the menu.lst that's in your Ubuntu on the hard-drive, not the one on the LiveCd but you will need to do that via a normal command-line and use the sudo command

Hope this helps!
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#7

Sounds like you need to fix the graphics by booting into "Recovery Mode" and use "Fix x-server". Also for ati and nVidia graphics cards try installing "envy-gtk" use it to uninstall your current driver, then reboot and install the latest driver via envy which should now be in the menu

Applications - System Tools - Envy

Also if your multimedia apps are still(?) flashing then get to a command-line and type

gstreamer-properties

in the gui click the 2nd tab "Video" and change the top option "Output" from "Auto" to "...(no Xv)". This stops the gpu trying to do everything and gives it all back to the cpu. Oddly it doesn't overwhelm the cpu although you might find your Ram getting used a little more. It definitely stops the odd and nasy flashing through to desktop 'special effect' lol

Hope this helps
Good luck and regards from
Tom :)

Revision history for this message
Mike Lighton (mlighton) said :
#8

Tom - You are correct. when I did the find command it listed;
hd0,5
hd1,4
The installation is wish to use and is working just great is on a partitioned drive with windows (C:). My menu does not have the Partition Editor. But that hard drive had a C drive for OS and a D drive partition for data then I partitioned the remaining drive for Linux. So I assume what I want is hd0,5. Were I am getting a little lost is in your instruction for making the change. I tried
sudo grub root (hd0,5) and got an error
I quit grub and just tried it from the terminal and got a Bash error.
By the way, you were correct in a way, the video problem is what start the multi installation to begin with !!

Revision history for this message
Tom (tom6) said :
#9

Ok. I agree but i wonder what sdb5 is? lol. I think maybe close the terminal console/window and open a new one or perhaps just open a new one ;)

sudo grub

root (hd0,5)

setup (hd0)

exit (or is it "quit")

Hopefully that should sort out the boot. How's the graphics? Could well be worth a new question unless i got lucky with one of those answers
https://answers.launchpad.net/ubuntu/+addquestion

Good luck and regards from
Tom :)

Revision history for this message
Mike Lighton (mlighton) said :
#10

Tom - You are the man ! The menu.lst that I have been editing is now being used for the boot file. The sdb5 is from an installation I did (number 2) on a second hard drive after I lost the video from the first installation I did on the first hard drive. But after I had already done the java install and other things on the first install so when I found out how to fix the video (using envy) I gave up the second install. The graphics now are fine. I just could not understand why I could not make the changes to the boot file and use them.
Thanks for all your help
Best regards,
Mike :)

Revision history for this message
Tom (tom6) said :
#11

Brilliant, nicely done :) Welcome to linux :)
In an Ubuntu install i usually run through the Medibuntu checklist to get all the multi-media apps sorted in one go
https://help.ubuntu.com/community/Medibuntu

and you might also be interested in
https://help.ubuntu.com/community/SwitchingToUbuntu/FromWindows
as a quick look up guide.

Hope this all helps. If you still haven't got "Partition Editor" in your System-Administration sub-menu then you can always install it through Synaptic which is further down the list. In Ubuntu and Xubuntu it's "GPartEd" but in Kubuntu it's "QtPartEd" but they both look about the same and both use the same command-line tool. Windows partition editors tend to do some fairly strange things to try to give the Windows OS a bit more of an edge. Linux ones just get on with showing what's on the disk without hiding anything.

lol, don't forget to copy stuff out of the /home on your 2nd drive before reformatting it or whatever

Good luck and regards from
Tom :)