installed ub7.10, but had to replace txt in a file

Asked by dancing

When I recently installed Ubuntu 7.04 and then 7.10, in order to boot I had to go into the file boot/grub/menu.lst and change the "UUID number" to /dev/sda5 Then the upgrades worked fine.
We think this is because my brother, a programmer who recommends linux and who helped me install my original ubuntu 6.10, made up a grub file for me. He uses gentoo himself. (I unfortunately have to use windows for some of my programs, and I have 3 windows partitions, which is why linux is sda5. Linux is also sda4 and sda6.)
My question is:
What should I do to change my grub or boot procedure so that it is standard and I can install future ubuntu upgrades without hitches?

Question information

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

I'm not too clear on what the problem is...

What do you me by making it "so that it is standard"? Do you want it to boot to ubuntu by default or what are you trying to do?

Are you upgrading previous ubuntu installation? Or are you installing from scratch (such as a live-CD)?

Revision history for this message
dancing (dancingmusic) said :
#2

Thanks for replying, and here's more information.
Right now it is working. I'm running 7.10 gutsy and my grub has ubuntu default but I have 10 seconds to choose to boot into windows. That is okay.
What happened is that when I upgraded from 6.10 to 7.04, the 7.04 didn't boot up until I had made that change to the menu.lst file. (I could never have figured out myself what to do. I booted into ubuntu from my CD, then looked at what files in the boot directory had that day's date, which included menu.lst and menu.lst~ Then I read the file to my brother, and he told me to try changing the UUID number, which worked.) Then when I upgraded from 7.04 to 7.10, I couldn't boot up until I had made the same change to the menu.lst file. Now 7.10 works fine.
However, this makes me think that when I install 8.04 (or any other upgrade), this will probably happen again. My brother said that when he made up my grub, he probably did it in a different way than it is usually done, which is probably why I have to have the /dev/sda5 address instead of the UUID number.
I thought that if someone knows the "usual" way (apparently most /boot/grub/menu.lst files point to a UUID number), I might be able to change my boot file(s) so that the UUID numbers need to be used. Then when I upgrade in the future I wouldn't need to ask for assistance.

Revision history for this message
Brewster Malevich (brews) said :
#3

Well, I have a similar dual boot setup were I rely on the GRUB to boot. When I update, I've always just backed-up my personal configuration files and slapped on a fresh installation (it's my version of spring cleaning).

As of right now, my GRUB script section for 8.04 beta (and it's recovery mode) for the current Ubuntu kernel looks like this:

title Ubuntu hardy (development branch), kernel 2.6.24-16-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=330831e5-95f7-462e-b7d8-b0f733ec74ee ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu hardy (development branch), kernel 2.6.24-16-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=330831e5-95f7-462e-b7d8-b0f733ec74ee ro single
initrd /boot/initrd.img-2.6.24-16-generic

You are welcome to use this information. This may very well end up changing. And it can differ depending on your installation setup. My advice is to wait until 8.04 is actually released, for all you know, there may not even be a problem. I'm guessing that you will be fine, but who knows.

If you are taking your GRUB scripts from the CD, I'm not too sure how much more 'usual way' you can get, perhaps consider a fresh installation?

Revision history for this message
dancing (dancingmusic) said :
#4

Dear Spike,

Where your grub file says:
root=UUID=330831e5-95f7-462e-b7d8-b0f733ec74ee

mine says: root=/dev/sda5

I don't think we took grub scripts from the cd. I had to boot from the
original installation cd because my newly installed versions wouldn't
boot at all.
Do you have any idea what the UUID refers to, and why my grub doesn't
work when I had the root=UUID...?

I appreciate your comments!

     Alova
<email address hidden>

Revision history for this message
Best Brewster Malevich (brews) said :
#5

UUID stands for "Universally Unique Identifier". It's used for building software, think of it as a personal hardware address combined with a finger-print. (I'm sure that Wikipedia is a plethora of everything you didn't want to know about UUIDs.)

The UUID isn't "/dev/sda5". It's the long stream of nonsense as seen in my example above.

So, lets find your UUID for /dev/sda5:
Open up a terminal and enter:

sudo vol_id -u /dev/sda5

The output should be your UUID.

Copy and paste the long-lost UUID into /dev/sda5's place in "root=/dev/sda5" and save it.

Give it a try and see what you get!

Revision history for this message
dancing (dancingmusic) said :
#6

ok, I got b17900e1-1b3e-49c6-a676-14140dd8c941 (no spaces). This is
a different number than was in my menu.lst file before, which would
probably explain why it didn't boot.
I'll copy and paste and try rebooting again later, and let you know.
Thanks!

     Alova
<email address hidden>

Revision history for this message
dancing (dancingmusic) said :
#7

Yes, this worked! Thank you, Spike the Dingo!
Next time I upgrade it will probably work the first time.

Revision history for this message
Brewster Malevich (brews) said :
#8

Sweet, happy to help.