PDA

View Full Version : [ubuntu] 9.04 Jaunty Grub Questions



wallyweb
June 13th, 2009, 01:21 AM
NEW QUESTION IN THE SECOND POST

History:
1. A while ago I burned 8.04 Hardy to a CD and eventually installed it as a stand alone on my PC
2. A bit later, I upgraded to 8.10 Intrepid.
3. After loading Samba, I met a bug #292791 (https://bugs.launchpad.net/ubuntu/+source/samba/+bug/292791)
4. I reinstalled 8.04 Hardy on a separate partition in the hopes that the bug would soon be resolved.
5. I recently received notification that the bug was resolved in 9.04 Jaunty.
6. Using the work around from the bug report, I accessed my 8.10 Intrepid, uninstalled Samba, and upgraded to 9.04 Jaunty.

I can now access my choice of Jaunty (which I want to be my default) or Hardy (which I'm keeping as a backup).
Problem #1 Hardy is still default. I see how to do this here (https://help.ubuntu.com/community/GrubHowto/ChangeDefaultOS).
Problem #2: My boot menu still shows "Ubuntu 8.10, kernel 2.6.27-9 generic" instead of 9.04:


Ubuntu 8.04, kernel 2.6.24-24 generic
Ubuntu 8.04, kernel 2.6.24-24 generic (recovery mode)
Ubuntu 8.04, kernel 2.6.24-23 generic
Ubuntu 8.04, kernel 2.6.24-23 generic (recovery mode)
Ubuntu 8.04, kernel 2.6.24-22 generic
Ubuntu 8.04, kernel 2.6.24-22 generic (recovery mode)
Ubuntu 8.04, kernel 2.6.24-19 generic
Ubuntu 8.04, kernel 2.6.24-19 generic (recovery mode)
Ubuntu 8.04, memtest 86+
Other operating system:
Ubuntu 8.10, kernel 2.6.27-9 generic
Ubuntu 8.10, kernel 2.6.27-9 generic (recovery mode)

Note that this menu item does load 9.04, How do I get Grub to change the text of this menu item?

Here is my menu.lst


# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=53a84916-ad37-4d5e-bf8e-b0f34f7bb239 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-11-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=53a84916-ad37-4d5e-bf8e-b0f34f7bb239 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=53a84916-ad37-4d5e-bf8e-b0f34f7bb239 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, kernel 2.6.27-9-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=53a84916-ad37-4d5e-bf8e-b0f34f7bb239 ro quiet splash
initrd /boot/initrd.img-2.6.27-9-generic
quiet

title Ubuntu 9.04, kernel 2.6.27-9-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=53a84916-ad37-4d5e-bf8e-b0f34f7bb239 ro single
initrd /boot/initrd.img-2.6.27-9-generic

title Ubuntu 9.04, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

wallyweb
June 27th, 2009, 03:07 AM
As seen in the previous post I have 8.04 and 9.04 dual boot.
I have one menu.lst for each.
9.04 is an upgrade from 8.10
Grub uses the 8.04 menu.lst.
The 8.04 menu.lst still shows the 8.10 listing.
That 8.10 listing boots into my 9.04 partition.
I would rather grub use the menu.lst from 9.04.

How can I do this?

studavis
June 27th, 2009, 04:02 AM
Good question, I'm in the same situation. 2 Grub Menus and it always defaults to the 8.04 menu. I boot to 9.04 and used Startupmanager to edit menu.lst (which it does) but when I reboot it always takes the menu.list from the 8.04 partition. I'm thinking just to copy the 9.04 menu to the 8.04 grub folder. Being new I'm kinda worried to do that.

Hope you can find a solution.

presence1960
June 27th, 2009, 05:22 AM
Boot the Live CD and you want to restore Jaunty's GRUB to MBR so when your rig boots the Jaunty GRUB is in control. Do this :


1. Boot your computer up with Ubuntu CD
2. Open a terminal window or switch to a tty.
3. Type sudo grub. Should get text of which last line is grub>
4. Type "find /boot/grub/stage1". You'll get a response like "(hd0,1)".
Use whatever your computer spits out for the following lines.
5. Type "root (hd0,1)", or whatever your hard disk + boot partition
numbers are for Ubuntu.
6. Type "setup (hd0)", to install GRUB to MBR, or "setup (hd0,1)" or
whatever your hard disk + partition # is, to install GRUB to a
partition.
7. Quit grub by typing "quit".
8. Reboot and remove the bootable CD.

In #4 pay attention to the (hdx,y) that get outputted. You want to use the (hdx,y) that is Jaunty's partition when you enter command in #5.
In #6 use setup (hd0) to put GRUB on MBR.

Repeat the above process but this time in #5 use Hardy's (hdx,y). In # 6 use setup (hdx,y) which corresponds to hardy's partition. What you just did in both exercises is put Jaunty's GRUB in MBR and Hardy's GRUB to Hardy's partition.

When you boot you should have Jaunty's GRUB menu. I would chainload Hardy from Jaunty's GRUB menu. From Jaunty open a terminal and run
gksu gedit /boot/grub/menu.lst At the bottom add :


title Hardy 8.04
rootnoverify (hdx,y)
chainloader +1

where (hdx,y) is hardy's partition. When you choose the chainloaded Hardy entry it will pass off to Hardy's menu.lst and you will get hardy's menu. The advantage here is when Hardy upgrades it's kernels you won't have to manually edit the menu.lsts to use the new kernels.

studavis
June 27th, 2009, 07:35 AM
Many thanks for the quick response. I booted from my 8.04 CD (9.04) has errors.

at #4 from your list, i get response (hd0,5) and (hd0,6). (9.04 is on sda6).
Then typed root (hd0,6)
then setup (hd,0).

On reboot I still get the 8.04 grub menu.

Any ideas? thanks for the help

merlinus
June 27th, 2009, 07:42 AM
If you want to install to 9.04 on sda6, then it should be:

root (hd0,5)
setup (hd0)

studavis
June 27th, 2009, 08:13 AM
Yup, that did it. Just seems counter-intuitive, 9.04 is on sda6 but i used root (hd0,5) and I now have access to the correct Grub.

Many thanks to presence1960 and merlinus!

merlinus
June 27th, 2009, 08:18 AM
Glad it is working. Numbering starts at 0 (zero) for these kinds of things, so (hd0,5) = sda6 (first hdd, sixth partition).

studavis
June 27th, 2009, 08:38 AM
Ah, of course. I did say I was new to this but thanks to such forums, learning very day! Cheers

presence1960
June 27th, 2009, 12:53 PM
Ah, of course. I did say I was new to this but thanks to such forums, learning very day! Cheers

way to go! That's how we all learn. If you don't get in there and sometimes mess something up you won't learn much. Thanks merlin for finishing this up while I slept.

wallyweb
July 21st, 2009, 04:45 AM
It only took me three weeks to notice that there are replies to my post.:o

It worked. Thank you all for your help.:D