kernel upgrade does not adjust grub2 default parameter when it is non-zero

Bug #619129 reported by flashydave
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I was running a tweaked command line version of 2.6.35-12 to get over bugs in nouveau as a new grub entry.
This required me to set GRUB_DEFAULT=6 in my /etc/defaultgrub

On upgrade to 2.6.35-14 as part of Maverick updates the new kernel was "inserted" and results (either by update-grub or by grub-pc itself during boot) with the entries (normal and recovery versions) being the first in the list. GRUB_DEFAULT should have been set to 8 to compensate for the new entries but it remained at 6 resulting in the system booting the wrong image upon restart. (It booted memtest86 as it happens!).

Obviously the workaround to get the system working is to interrupt grub with shift key, select the right kernel and once booted manually update the default to the required entry (in my case editing the entry to point to the new kernel).

It is not reasonable to cope with all possible manual alterations to grub settings but this one should have been dealt with automatically as it is 100% deterministic and the consequence of the kernel upgrade scriplet.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: linux-generic 2.6.35.15.16
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.35-14.20-generic 2.6.35
Uname: Linux 2.6.35-14-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: I82801BAICH2 [Intel 82801BA-ICH2], device 0: Intel ICH [Intel 82801BA-ICH2]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: dwilliams 1318 F.... xfce4-volumed
                      dwilliams 1326 F.... pulseaudio
                      dwilliams 1369 F.... xfce4-mixer-plu
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'I82801BAICH2'/'Intel 82801BA-ICH2 with AD1885 at irq 17'
   Mixer name : 'Analog Devices AD1885'
   Components : 'AC97a:41445360'
   Controls : 38
   Simple ctrls : 27
Date: Tue Aug 17 09:58:54 2010
HibernationDevice: RESUME=UUID=fbce8d08-8d33-4e5f-b2f3-346a1028a9b2
InstallationMedia: Xubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100803)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
Lsusb:
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: Hewlett-Packard HP Vectra
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-14-generic root=UUID=053be657-1f44-4636-89c5-2cc550a839ef ro nouveau.modeset=0
ProcEnviron:
 LANG=en_GB.utf8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.38
RfKill:

SourcePackage: linux
dmi.bios.date: 07/19/2001
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: JA.01.03US
dmi.board.name: HP System Board
dmi.board.vendor: Hewlett-Packard
dmi.board.version: A06
dmi.chassis.type: 3
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: Version 1.00
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrJA.01.03US:bd07/19/2001:svnHewlett-Packard:pnHPVectra:pvrVL420:rvnHewlett-Packard:rnHPSystemBoard:rvrA06:cvnHewlett-Packard:ct3:cvrVersion1.00:
dmi.product.name: HP Vectra
dmi.product.version: VL420
dmi.sys.vendor: Hewlett-Packard

Revision history for this message
flashydave (dave-opensourcesolutions) wrote :
Revision history for this message
Charlie Kravetz (cjkgeek) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 55400, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.

affects: linux (Ubuntu) → grub (Ubuntu)
Changed in grub (Ubuntu):
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

This isn't really a duplicate as the situation is different with grub2.

We tend to get into a bit of an arms race if we try to edit /etc/default/grub automatically, and so I don't plan to fix this exactly as requested. However, there's a new feature in grub2 which I recommend you use instead: you can write the full name of a menu entry in GRUB_DEFAULT, rather than its number. So instead of GRUB_DEFAULT=6, you could have written something like:

  GRUB_DEFAULT='Ubuntu, with Linux 2.6.35-14-generic'

This is more descriptive and less error-prone.

affects: grub (Ubuntu) → grub2 (Ubuntu)
Changed in grub2 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
flashydave (dave-opensourcesolutions) wrote :

Thanks for your response. The technique works fine!
(Note for careless users - no errors are reported if the string is wrong when upgrade-grub is run)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.