Problem with first loading page

Asked by Alireza

I've got windows XP plus Ubuntu on my laptop. At the starting page which I have to chose between windows or Linux to load, each time when I update the Ubuntu there is a new line added. In this link you can watch the picture of my fitst page. So please help me to get rid of them asap, thank you very much.
http://img13.imageshack.us/img13/2994/21129149qv3.jpg

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Alireza
Solved:
Last query:
Last reply:
Revision history for this message
kabotage (kabotage) said :
#1

You can modify it by editing the grub boot loader on /etc/boot/grub/menu.lst

First make a back up copy

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup

then

sudo nano /boot/grub/menu.lst

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

Ahh great, an easy one at last -thanks :) Good to see you have setup a proper decent dual-boot. I need to do some pruning too. Ok, go up to the top taskbar and click on

Applications - Accessories - Terminal

Into the terminal/command window/console type

cd /boot/grub
ls
sudo cp menu.lst menu.lst.190209

It will now ask for your user password, not your SuperUser/Root one. Note the "ls" is a little "LS" and gives a list of what's in the folder. The "sudo cp" command creates a backup copy of "menu.lst" so that if we make a mistake then we can recover easily. The "sudo" part means the command "cp" is run with root privelges, "gksu" would do just as nicely. Now into the terminal console type

ls

and you should see the "menu.lst.190209" file has been copied into the folder. Now at last we can safely type in

sudo gedit menu.lst

Although the first sudo command asked for a password this one probably wont because the first one gives a 15minute break from having to enter your password. Gedit is a great little text-editor but any of the others would do just as well. We all have our favourites. Now in the text-editor look for blocks like

title Ubuntu 8.10, k11
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=140288d8-a6d9-4aae-8b7c-f4ef625a314c ro verbose splash
initrd /boot/initrd.img-2.6.24-22-generic
quiet

title Ubuntu 8.10, k11 Recovery Mode
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=140288d8-a6d9-4aae-8b7c-f4ef625a314c ro single
initrd /boot/initrd.img-2.6.24-22-generic

title Ubuntu 8.10, k11
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=140288d8-a6d9-4aae-8b7c-f4ef625a314c ro verbose splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.10, k11 Recovery Mode
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=140288d8-a6d9-4aae-8b7c-f4ef625a314c ro single
initrd /boot/initrd.img-2.6.24-19-generic

basically the 4 blocks of text containing the numbers 2.6.24-19 & 2.6.24-22 all need to be deleted. This should leave 2 blocks that look a lot like this

title Ubuntu 8.10, k11
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=140288d8-a6d9-4aae-8b7c-f4ef625a314c ro verbose splash
initrd /boot/initrd.img-2.6.24-23-generic
quiet

title Ubuntu 8.10, k11 Recovery Mode
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=140288d8-a6d9-4aae-8b7c-f4ef625a314c ro single
initrd /boot/initrd.img-2.6.24-23-generic

These two blocks are important to keep. Yours may look a tiny bit different from mine. I have already changed the title's so that my bootup menu looks a bit less scary. It's ok to change the title to pretty much anything you want. It's important to keep the Recovery Mode one as an option that's distinct from the normal ubuntu boot. Now if you go to the very end of the file you'll see another block that looks like

### 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

I don't like this so i tend to delete it. All it does is add the line "Other operating systems:" to the bootup menu and i don't like it so i delete it. Under that should be something that looks a bit like

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

the numbers and "sda2" may be a bit different on your system because we have partitioned our drives differently (probably). Anyway move this section to between the two blocks i mentioned above so that you end up with

title Ubuntu 8.10, k11
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=140288d8-a6d9-4aae-8b7c-f4ef625a314c ro verbose splash
initrd /boot/initrd.img-2.6.24-23-generic
quiet

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

title Ubuntu 8.10, k11 Recovery Mode
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=140288d8-a6d9-4aae-8b7c-f4ef625a314c ro single
initrd /boot/initrd.img-2.6.24-23-generic

title Ubuntu 8.10, memtest86+
uuid 140288d8-a6d9-4aae-8b7c-f4ef625a314c
kernel /boot/memtest86+.bin
quiet

Now click on the "Save" button and close the text-editor and the terminal console.

When you next reboot if there are any problems then you may need to use a LiveCd of pretty much any distro, the Ubuntu one is good but i prefer Wolvix when i need to use a LiveCd
http://distrowatch.com/table.php?distribution=wolvix
now open a terminal console from the LiveCd and make yourself a SuperUser and navigate to the /boot/grub folder, probably like this

su
toor
cd /mnt/sda
cd boot/grub
cp menu.lst.190209 menu.lst

and then you should be able to boot back into Ubuntu as normal. Note that not many linux distro's have the sudo command so in Wolvix i would use "su" to make myself a SuperUser and it would need the SuperUser/Root password which is "toor" on it's LiveCd. If i was using the Ubutnu LiveCd i wouldn't use "su" but i would just sudo the "cp" command

sudo cp menu.lst.190209 menu.lst

Anyway hopefully you wont need any of this last bit as it should just boot straight into Ubuntu nice and easily.

Good luck and regards from
Tom :)

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

Blimey it took me an hour to type all that! Felt like fun though, looking stuff up and trying to get all the numbers right as much as i could. Nano is a great text-editor too. I've only used Gedit but people say Nano is good. When i make a backup i like to give it a date-stamp at the end rather than just something like "_backup" but that's a good way too.

Seems like me and kabotage both said the same thing except mine assumes you're a noob and gives a little more detail but kabotage was faster lol

Good luck and regards from
Tom :)

Revision history for this message
Alireza (alirezasefat) said :
#4

Thank you both mates
I'm very proud to become a part of this live community ;) I'll try to fix it right now, thanks agian

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

You're welcome. Good luck :)

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

Just make sure you have an Ubuntu Cd or Wolvix Cd near at hand when you try to reboot. It should be ok though. :)