Upgrade removed grub-pc, left grub with no /usr/sbin/update-grub

Bug #455619 reported by Matt Zimmerman
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This happened after a large batch of installing Karmic updates:

Calculating upgrade... Done
The following packages will be REMOVED:
  grub-doc grub-pc rtkit
The following NEW packages will be installed:
  linux-headers-2.6.31-14 linux-headers-2.6.31-14-generic
  linux-image-2.6.31-14-generic qemu-kvm
The following packages have been kept back:
  ubuntuone-client
The following packages will be upgraded:
  acpi-support alsa-base alsa-utils app-install-data apport apport-gtk
  apport-retrace apt apt-transport-https apt-utils aptdaemon at-spi audacity
  audacity-data avahi-autoipd avahi-daemon avahi-utils avant-window-navigator
  avant-window-navigator-data awn-manager binutils binutils-doc
  binutils-static brltty brltty-x11 byobu cdbs cdrdao checkbox checkbox-gtk
  claws-mail claws-mail-i18n comerr-dev command-not-found
  command-not-found-data compiz compiz-core compiz-fusion-plugins-extra
  compiz-fusion-plugins-main compiz-gnome compiz-plugins compiz-wrapper
  compizconfig-backend-gconf computer-janitor computer-janitor-gtk couchdb
  couchdb-bin cpp-4.4 cryptsetup cups cups-bsd cups-client cups-common
  cups-ppdc cupsddk cupsys cupsys-bsd cupsys-client cupsys-common desktopcouch
  devicekit-disks devicekit-power dovecot-common dovecot-imapd e2fslibs
  e2fsprogs ecryptfs-utils empathy empathy-doc evince evolution
  evolution-common evolution-couchdb evolution-data-server
  evolution-data-server-common evolution-documentation-en evolution-exchange
  evolution-plugins ffmpeg fglrx-modaliases firefox firefox-3.5
  firefox-3.5-branding firefox-3.5-gnome-support firefox-gnome-support foo2zjs
  g++-4.4 gcalctool gcc-4.4 gcc-4.4-base gcc-4.4-doc gdb gdm gdm-guest-session
  ghostscript ghostscript-cups ghostscript-x gnome-bluetooth gnome-common
  gnome-disk-utility gnome-keyring gnome-panel gnome-panel-data
  gnome-power-manager gnome-screensaver gnome-settings-daemon
  gnome-themes-ubuntu gnome-user-guide gnome-user-guide-en grub-common
  gs-common gs-esp gstreamer0.10-esd gstreamer0.10-plugins-good
  gstreamer0.10-plugins-good-doc gstreamer0.10-pulseaudio gtk2-engines
  gtk2-engines-pixbuf gtk2.0-examples gtkhtml3.8 gvfs gvfs-backends gvfs-bin
  gvfs-fuse gwibber hal-cups-utils hpijs hplip hplip-cups hplip-data
  human-theme humanity-icon-theme hwtest hwtest-gtk ibus ibus-gtk ibus-m17n
  indicator-applet indicator-applet-session indicator-session initramfs-tools
  initscripts kvm landscape-client landscape-common language-pack-en
  language-pack-en-base language-pack-gnome-en language-pack-gnome-en-base
  language-pack-kde-en language-pack-kde-en-base language-selector
  language-selector-common lftp libapparmor-perl libapparmor1 libapt-pkg-dev
  libasound2 libasound2-dev libatspi1.0-0 libavahi-client-dev libavahi-client3
  libavahi-common-data libavahi-common-dev libavahi-common3
  libavahi-compat-libdnssd1 libavahi-core6 libavahi-glib-dev libavahi-glib1
  libavahi-gobject0 libavahi-ui0 libavcodec-dev libavcodec52 libavdevice52
  libavfilter0 libavformat-dev libavformat52 libavutil-dev libavutil49 libawn0
  libbrlapi0.5 libcamel1.2-14 libcamel1.2-dev libclutter-1.0-0 libcomerr2
  libcompizconfig0 libcouchdb-glib-1.0-1 libcryptui0 libcups2 libcupscgi1
  libcupsdriver1 libcupsimage2 libcupsmime1 libcupsppdc1 libdbus-glib-1-2
  libdbus-glib-1-dev libdecoration0 libdevkit-power-gobject1 libdmx1
  libebackend1.2-0 libebook1.2-9 libecal1.2-7 libecryptfs0 libedata-book1.2-2
  libedata-cal1.2-6 libedataserver1.2-11 libedataserver1.2-dev
  libedataserverui1.2-8 libegroupwise1.2-13 libempathy-common
  libempathy-gtk-common libempathy-gtk28 libempathy30 libevdocument1
  libevview1 libexchange-storage1.2-3 libgail-common libgail-dev libgail18
  libgcc1 libgcr0 libgdata-google1.2-1 libgdata1.2-1 libgdu-gtk0 libgdu0
  libgfortran3 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx
  libglibmm-2.4-1c2a libglu1-mesa libglu1-mesa-dev libgnome-bluetooth7
  libgnome-keyring-dev libgnome-keyring0 libgnomevfs2-0 libgnomevfs2-0-dbg
  libgnomevfs2-bin libgnomevfs2-common libgnomevfs2-dev libgnomevfs2-extra
  libgomp1 libgp11-0 libgphoto2-2 libgphoto2-port0 libgpm-dev libgpm2
  libgpmg1-dev libgs8 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libgtk2.0-dev
  libgtkhtml-editor-common libgtkhtml-editor0 libgtkhtml3.14-19
  libgtkhtml3.8-15 libgtkhtml3.8-dev libgtkmm-2.4-1c2a libgudev-1.0-0
  libgvfscommon0 libgweather-common libgweather1 libibus1 libieee1284-3
  liblircclient-dev liblircclient0 libmtp-dev libmtp8 libnautilus-burn-dev
  libnautilus-burn4 libnautilus-extension-dev libnautilus-extension1
  libncurses5 libncurses5-dev libncursesw5 libnm-glib2 libnm-util1
  libntfs-3g54 libofx-dev libofx4 libpam-gnome-keyring libpanel-applet2-0
  libpcre3 libpcrecpp0 libpolkit-agent-1-0 libpolkit-backend-1-0
  libpolkit-gobject-1-0 libpolkit-gtk-1-0 libpostproc51 libpulse-browse0
  libpulse-mainloop-glib0 libpulse0 libpurple0 libpython2.6 libqt4-assistant
  libqt4-core libqt4-dbus libqt4-designer libqt4-gui libqt4-network
  libqt4-opengl libqt4-script libqt4-svg libqt4-test libqt4-xml libqtcore4
  libqtgui4 libsane libscim8c2a libselinux1 libselinux1-dev libsoup2.2-8
  libsoup2.2-dev libspeechd2 libss2 libstdc++6 libstdc++6-4.4-dev libsvga1
  libswscale0 libudev0 libusplash0 libvisual-0.4-plugins libwebkit-1.0-2
  libwebkit-1.0-common libxext-dev libxext6 libxklavier15 libxrender-dev
  libxrender1 libxxf86vm-dev libxxf86vm1 libzephyr4 linux linux-doc
  linux-firmware linux-generic linux-headers-generic linux-image
  linux-image-generic linux-libc-dev linux-sound-base locales mencoder
  mesa-common-dev mesa-utils mimms mobile-broadband-provider-info modemmanager
  mountall mplayer mplayer-doc mplayer-nogui mplayer-skin-blue mplayer-skins
  nautilus nautilus-data ncurses-base ncurses-bin ncurses-term nethack-common
  nethack-console network-manager network-manager-gnome ntfs-3g
  nvidia-173-modaliases nvidia-180-modaliases nvidia-185-modaliases
  nvidia-96-modaliases ofx onboard openoffice.org-base-core
  openoffice.org-calc openoffice.org-common openoffice.org-core
  openoffice.org-draw openoffice.org-emailmerge openoffice.org-gnome
  openoffice.org-gtk openoffice.org-help-en-us openoffice.org-impress
  openoffice.org-java-common openoffice.org-l10n-common openoffice.org-math
  openoffice.org-style-crystal openoffice.org-style-human
  openoffice.org-writer pidgin pidgin-data pidgin-otr policykit-1
  policykit-1-gnome pulseaudio pulseaudio-esound-compat
  pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-udev
  pulseaudio-module-x11 pulseaudio-utils python python-all python-all-dev
  python-apport python-aptdaemon python-aptdaemon-gtk python-avahi python-awn
  python-brlapi python-central python-cupshelpers python-desktopcouch
  python-desktopcouch-records python-dev python-distutils-extra python-doc
  python-eggtrayicon python-gksu2 python-gobject python-gobject-dev
  python-gtkhtml2 python-gtkmozembed python-gtkspell python-ibus
  python-minimal python-papyon python-problem-report python-pyatspi
  python-sip4 python-speechd python-uno python2.6 python2.6-dev python2.6-doc
  python2.6-minimal qemu rhythmbox rsyslog sane-utils scim scim-gtk2-immodule
  scim-modules-socket screen-resolution-extra seahorse software-center
  speech-dispatcher sreadahead synaptic system-config-printer-common
  system-config-printer-gnome system-config-printer-udev sysv-rc
  sysvinit-utils sysvutils telepathy-gabble telepathy-idle totem totem-common
  totem-gstreamer totem-mozilla totem-plugins transmission-common
  transmission-gtk ttf-opensymbol tzdata ubufox ubuntu-artwork ubuntu-desktop
  ubuntu-docs ubuntu-minimal ubuntu-sounds ubuntu-standard
  ubuntu-system-service ubuntu-wallpapers ubuntu-xsplash-artwork udev
  uno-libs3 update-manager update-manager-core update-notifier
  update-notifier-common upstart ure usb-creator usb-creator-common
  usb-creator-gtk usplash usplash-theme-ubuntu vinagre vino whois
  xdg-user-dirs xkb-data xnest xserver-common xserver-xephyr xserver-xorg-core
  xserver-xorg-dev xserver-xorg-input-evdev xserver-xorg-input-synaptics
  xserver-xorg-input-wacom xserver-xorg-video-ati xserver-xorg-video-intel
  xserver-xorg-video-radeon xsplash xutils-dev xvfb yelp
507 upgraded, 4 newly installed, 3 to remove and 1 not upgraded.

mizar:[~] sudo update-grub
Your /usr is broken, please fix it before call this wrapper!
mizar:[~] ls -l /usr/sbin/update-grub
ls: cannot access /usr/sbin/update-grub: No such file or directory

Installing grub-pc (which removed grub) got things working again:

The following packages will be REMOVED:
  grub
The following NEW packages will be installed:
  grub-pc
0 upgraded, 1 newly installed, 1 to remove and 1 not upgraded.
5 not fully installed or removed.
Need to get 434kB of archives.
After this operation, 762kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://archive.ubuntu.com karmic/main grub-pc 1.97~beta4-1ubuntu2 [434kB]
Fetched 434kB in 0s (3,548kB/s)
Preconfiguring packages ...
(Reading database ... 404012 files and directories currently installed.)
Removing grub ...
Processing triggers for man-db ...
Selecting previously deselected package grub-pc.
(Reading database ... 403974 files and directories currently installed.)
Unpacking grub-pc (from .../grub-pc_1.97~beta4-1ubuntu2_i386.deb) ...
Processing triggers for man-db ...
Setting up linux-image-2.6.31-14-generic (2.6.31-14.48) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.31-14-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found Debian background: moreblue-orbit-grub.png
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found linux image: /boot/vmlinuz-2.6.31-11-generic
Found initrd image: /boot/initrd.img-2.6.31-11-generic
Found linux image: /boot/vmlinuz-2.6.31-7-generic
Found initrd image: /boot/initrd.img-2.6.31-7-generic
Found linux image: /boot/vmlinuz-2.6.31-6-generic
Found initrd image: /boot/initrd.img-2.6.31-6-generic
Found linux image: /boot/vmlinuz-2.6.30-10-generic
Found initrd image: /boot/initrd.img-2.6.30-10-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms
run-parts: executing /etc/kernel/postinst.d/nvidia-common

Setting up linux-image-generic (2.6.31.14.27) ...
Setting up linux-image (2.6.31.14.27) ...
Setting up linux (2.6.31.14.27) ...
Setting up linux-generic (2.6.31.14.27) ...
Setting up grub-pc (1.97~beta4-1ubuntu2) ...
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda
(hd1) /dev/sdb
grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda
(hd1) /dev/sdb
Generating grub.cfg ...
Found Debian background: moreblue-orbit-grub.png
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found linux image: /boot/vmlinuz-2.6.31-11-generic
Found initrd image: /boot/initrd.img-2.6.31-11-generic
Found linux image: /boot/vmlinuz-2.6.31-7-generic
Found initrd image: /boot/initrd.img-2.6.31-7-generic
Found linux image: /boot/vmlinuz-2.6.31-6-generic
Found initrd image: /boot/initrd.img-2.6.31-6-generic
Found linux image: /boot/vmlinuz-2.6.30-10-generic
Found initrd image: /boot/initrd.img-2.6.30-10-generic
Found memtest86+ image: /boot/memtest86+.bin
done

ProblemType: Package
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: mdz 2444 F.... pulseaudio
 /dev/snd/controlC0: mdz 2444 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Live'/'SB Live! 5.1 (rev.7, serial:0x80641102) at 0xdf80, irq 18'
   Mixer name : 'eMicro EM28028'
   Components : 'AC97a:454d4328'
   Controls : 216
   Simple ctrls : 38
Card1.Amixer.info:
 Card hw:1 'default'/'C-Media USB Headphone Set at usb-0000:00:02.1-1.3, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB0d8c:000c'
   Controls : 7
   Simple ctrls : 3
Date: Mon Oct 19 18:15:27 2009
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 2
HibernationDevice: RESUME=UUID=61db81ef-28be-4e70-8bdb-bc2b0d20be2a
IwConfig:
 lo no wireless extensions.

 eth1 no wireless extensions.
MachineType: HP Pavilion 061 D7223K-ABA A650E
Package: linux-image-2.6.31-14-generic 2.6.31-14.48
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-11-generic root=UUID=daf1bf61-d974-4e90-b2c7-5f4dfa4e56cf ro crashkernel=384M-2G:64M,2G-:128M quiet splash
ProcVersionSignature: Ubuntu 2.6.31-11.38-generic
RelatedPackageVersions: linux-firmware 1.24
RfKill:

SourcePackage: linux
Title: package linux-image-2.6.31-14-generic 2.6.31-14.48 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
Uname: Linux 2.6.31-11-generic i686
WpaSupplicantLog:

dmi.bios.date: 06/01/2004
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 3.10
dmi.board.name: Diablo
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr3.10:bd06/01/2004:svnHPPavilion061:pnD7223K-ABAA650E:pvr0p_1211RE101DIABL10:rvnASUSTeKComputerINC.:rnDiablo:rvr1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: D7223K-ABA A650E
dmi.product.version: 0p_1211RE101DIABL10
dmi.sys.vendor: HP Pavilion 061

Revision history for this message
Matt Zimmerman (mdz) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

grub-pc and grub are supposed to conflict; there was a window during which they didn't, at which point grub seems to have gotten installed on your system, and now apt is removing the wrong one on upgrade. Can we see the older apt logs, to see why grub got pulled in to begin with? (You don't have startupmanager installed, do you?)

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 455619] Re: grub-pc removed, update-grub fails

On Mon, Oct 19, 2009 at 09:35:38PM -0000, Steve Langasek wrote:
> grub-pc and grub are supposed to conflict; there was a window during
> which they didn't, at which point grub seems to have gotten installed on
> your system, and now apt is removing the wrong one on upgrade. Can we
> see the older apt logs, to see why grub got pulled in to begin with?
> (You don't have startupmanager installed, do you?)

Thinking about it further, I don't think I ever transitioned this system to
grub2, and it had been happily using grub.

The setup I ended up with after the upgrade was this:

ii grub 0.97-29ubuntu5 GRand Unified Bootloader
ii grub-common 1.97~beta4-1ub GRand Unified Bootloader, version 2 (common

with /usr/sbin/update-grub missing. Here's my best guess at what happened:

1. grub/grub-common were installed, with /usr/sbin/update-grub present

2. Something caused grub-pc to be installed while it did not conflict with
   grub, and grub-pc replaced /usr/sbin/update-grub (grub-pc Replaces: grub)

3. /usr/sbin/update-grub from grub-pc was being used for a while, updating
   grub.cfg and not menu.lst (but I didn't notice because I didn't reboot
   for a while)

4. The most recent upgrade opted to remove grub-pc in favour of keeping grub

5. /usr/sbin/update-grub was removed along with grub-pc, leaving nothing in
   its place

--
 - mdz

affects: linux (Ubuntu) → grub2 (Ubuntu)
summary: - grub-pc removed, update-grub fails
+ Upgrade removed grub-pc, left grub with no /usr/sbin/update-grub
Colin Watson (cjwatson)
affects: grub2 (Ubuntu) → grub (Ubuntu)
Revision history for this message
Matt Zimmerman (mdz) wrote :

<mdz> slangasek: cjwatson: mightn't it fix the problem to just make a new grub upload, so that if grub-pc is removed, grub gets upgraded as well and /usr/sbin/update-grub comes back?
<slangasek> mdz: if the new grub also adds a Conflicts to ensure the removal of grub-pc happens first, yes
<cjwatson> mdz: yes, probably - I'll do that
<cjwatson> mdz: I can't guarantee that it will avoid all fallout, since there may well be a period between removal of grub-pc and upgrade of grub in which update-grub is missing

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub - 0.97-29ubuntu59

---------------
grub (0.97-29ubuntu59) karmic; urgency=low

  * Conflict with grub-pc, grub-coreboot, grub-efi-ia32, grub-efi-amd64, and
    grub-ieee1275; this upload ensures that /usr/sbin/update-grub is put
    back on systems that erroneously had both grub and grub-pc installed
    (LP: #455619).

 -- Colin Watson <email address hidden> Tue, 20 Oct 2009 10:47:11 +0100

Changed in grub (Ubuntu):
status: New → Fix Released
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.