linux-image-generic: dependency problems - leaving unconfigured

Asked by JG

10.04 won't finish any updates. dpkg --audit yields the following, How can I fix this?? Thanks

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
 linux-image-generic Generic Linux kernel image
 linux-generic Complete Generic Linux kernel

The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 linux-image-2.6.32-34-generic Linux kernel image for version 2.6.32 on x86/x86
 linux-image-2.6.32-33-generic Linux kernel image for version 2.6.32 on x86/x86
 linux-image-2.6.32-36-generic Linux kernel image for version 2.6.32 on x86/x86

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you give the output of:

uname -a; dpkg -l | grep linux-image-2

Thanks

Revision history for this message
JG (jeffgio) said :
#2

Linux jeff-desktop 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 i686 GNU/Linux
rc linux-image-2.6.31-17-generic 2.6.31-17.54 Linux kernel image for version 2.6.31 on x86
rc linux-image-2.6.31-19-generic 2.6.31-19.56 Linux kernel image for version 2.6.31 on x86
rc linux-image-2.6.31-20-generic 2.6.31-20.58 Linux kernel image for version 2.6.31 on x86
rc linux-image-2.6.31-21-generic 2.6.31-21.59 Linux kernel image for version 2.6.31 on x86
rc linux-image-2.6.31-22-generic 2.6.31-22.73 Linux kernel image for version 2.6.31 on x86
ii linux-image-2.6.31-23-generic 2.6.31-23.75 Linux kernel image for version 2.6.31 on x86
ii linux-image-2.6.32-32-generic 2.6.32-32.62 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-33-generic 2.6.32-33.70 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-34-generic 2.6.32-34.77 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-36-generic 2.6.32-36.79 Linux kernel image for version 2.6.32 on x86

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

ok lets clean this lot up. Run:

sudo dpkg -P linux-image-2.6.31-17-generic linux-image-2.6.31-19-generic linux-image-2.6.31-20-generic linux-image-2.6.31-21-generic; sudo apt-get --purge remove linux-image-2.6.31-23-generic

You should now just have:

ii linux-image-2.6.32-32-generic 2.6.32-32.62 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-33-generic 2.6.32-33.70 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-34-generic 2.6.32-34.77 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-36-generic 2.6.32-36.79 Linux kernel image for version 2.6.32 on x86

Then retry the upgrade.

Revision history for this message
JG (jeffgio) said :
#4

I get this grub error

jeff@jeff-desktop:~$ sudo dpkg -P linux-image-2.6.31-17-generic linux-image-2.6.31-19-generic
[sudo] password for jeff:
(Reading database ... 241916 files and directories currently installed.)
Removing linux-image-2.6.31-17-generic ...
Purging configuration files for linux-image-2.6.31-17-generic ...
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found linux image: /boot/vmlinuz-2.6.31-23-generic
Found initrd image: /boot/initrd.img-2.6.31-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected (expecting "done")
User postrm hook script [/usr/sbin/update-grub] exited with value 2
Removing linux-image-2.6.31-19-generic ...
Purging configuration files for linux-image-2.6.31-19-generic ...
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found linux image: /boot/vmlinuz-2.6.31-23-generic
Found initrd image: /boot/initrd.img-2.6.31-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected (expecting "done")
User postrm hook script [/usr/sbin/update-grub] exited with value 2

Revision history for this message
JG (jeffgio) said :
#5

I get this grub error

jeff@jeff-desktop:~$ sudo dpkg -P linux-image-2.6.31-17-generic
linux-image-2.6.31-19-generic
[sudo] password for jeff:
(Reading database ... 241916 files and directories currently installed.)
Removing linux-image-2.6.31-17-generic ...
Purging configuration files for linux-image-2.6.31-17-generic ...
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found linux image: /boot/vmlinuz-2.6.31-23-generic
Found initrd image: /boot/initrd.img-2.6.31-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected
(expecting "done")
User postrm hook script [/usr/sbin/update-grub] exited with value 2
Removing linux-image-2.6.31-19-generic ...
Purging configuration files for linux-image-2.6.31-19-generic ...
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found linux image: /boot/vmlinuz-2.6.31-23-generic
Found initrd image: /boot/initrd.img-2.6.31-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected
(expecting "done")
User postrm hook script [/usr/sbin/update-grub] exited with value 2

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Thu, 19 Jan 2012 22:15:45 -0000

Your question #185234 on update-manager in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234

    Status: Open => Answered

actionparsnip proposed the following answer:
ok lets clean this lot up. Run:

sudo dpkg -P linux-image-2.6.31-17-generic linux-image-2.6.31-19-generic
linux-image-2.6.31-20-generic linux-image-2.6.31-21-generic; sudo apt-
get --purge remove linux-image-2.6.31-23-generic

You should now just have:

ii linux-image-2.6.32-32-generic 2.6.32-32.62 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-33-generic 2.6.32-33.70 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-34-generic 2.6.32-34.77 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-36-generic 2.6.32-36.79 Linux kernel image for version 2.6.32 on x86

Then retry the upgrade.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

ok, run:

gedit /etc/grub.d/30_os-prober

What is output?

Revision history for this message
JG (jeffgio) said :
#7

OK, saw the images were actually removed and continued as you suggested,
getting the following

jeff@jeff-desktop:~$ sudo apt-get --purge remove
linux-image-2.6.31-23-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
  sdparm
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-2.6.31-23-generic*
0 upgraded, 0 newly installed, 1 to remove and 24 not upgraded.
5 not fully installed or removed.
After this operation, 90.3MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 241916 files and directories currently installed.)
Removing linux-image-2.6.31-23-generic ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms
2.6.31-23-generic /boot/vmlinuz-2.6.31-23-generic
Uninstalling: virtualbox-ose 3.1.6 (2.6.31-23-generic) (i686)

-------- Uninstall Beginning --------
Module: virtualbox-ose
Version: 3.1.6
Kernel: 2.6.31-23-generic (i686)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.31-23-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module
version.

vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.31-23-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module
version.

vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/2.6.31-23-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module
version.
depmod.......

DKMS: uninstall Completed.
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected
(expecting "done")
User postrm hook script [/usr/sbin/update-grub] exited with value 2
Purging configuration files for linux-image-2.6.31-23-generic ...
Running postrm hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected
(expecting "done")
User postrm hook script [/usr/sbin/update-grub] exited with value 2
Setting up linux-image-2.6.32-33-generic (2.6.32-33.70) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-33-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected
(expecting "done")
User postinst hook script [/usr/sbin/update-grub] exited with value 2
dpkg: error processing linux-image-2.6.32-33-generic (--configure):
 subprocess installed post-installation script returned error exit
status 2
Setting up linux-image-2.6.32-34-generic (2.6.32-34.77) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-34-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected
(expecting "done")
User postinst hook script [/usr/sbin/update-grub] exited with value 2
dpkg: error processing linux-image-2.6.32-34-generic (--configure):
 subprocess installed post-installation script returned error exit
status 2
Setting up linux-image-2.6.32-36-generic (2.6.32-36.79) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.32-36-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
/etc/grub.d/30_os-prober.save: 97: Syntax error: ")" unexpected
(expecting "done")
User postinst hook script [/usr/sbin/update-grub] exited with value 2
dpkg: error processing linux-image-2.6.32-36-generic (--configure):
 subprocess installed post-installation script returned error exit
status 2
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-2.6.32-36-generic; however:
  Package linux-image-2.6.32-36-generic is not configured yet.
dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 2.6.32.36.42); however:
  Package linux-image-generic is not configured yet.
dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport
report written because MaxReports is reached already

Errors were encountered while processing:
 linux-image-2.6.32-33-generic
 linux-image-2.6.32-34-generic
 linux-image-2.6.32-36-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Thu, 19 Jan 2012 22:15:45 -0000

Your question #185234 on update-manager in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234

    Status: Open => Answered

actionparsnip proposed the following answer:
ok lets clean this lot up. Run:

sudo dpkg -P linux-image-2.6.31-17-generic linux-image-2.6.31-19-generic
linux-image-2.6.31-20-generic linux-image-2.6.31-21-generic; sudo apt-
get --purge remove linux-image-2.6.31-23-generic

You should now just have:

ii linux-image-2.6.32-32-generic 2.6.32-32.62 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-33-generic 2.6.32-33.70 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-34-generic 2.6.32-34.77 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-36-generic 2.6.32-36.79 Linux kernel image for version 2.6.32 on x86

Then retry the upgrade.

Revision history for this message
JG (jeffgio) said :
#8

Yes, I get what you suggest

jeff@jeff-desktop:~$ uname -a; dpkg -l | grep linux-image-2
Linux jeff-desktop 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21
UTC 2011 i686 GNU/Linux
rc linux-image-2.6.31-22-generic 2.6.31-22.73
Linux kernel image for version 2.6.31 on x86
ii linux-image-2.6.32-32-generic 2.6.32-32.62
Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-33-generic 2.6.32-33.70
Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-34-generic 2.6.32-34.77
Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-36-generic 2.6.32-36.79
Linux kernel image for version 2.6.32 on x86
jeff@jeff-desktop:~$

what now, reboot then update??

Thanks

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Thu, 19 Jan 2012 22:15:45 -0000

Your question #185234 on update-manager in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234

    Status: Open => Answered

actionparsnip proposed the following answer:
ok lets clean this lot up. Run:

sudo dpkg -P linux-image-2.6.31-17-generic linux-image-2.6.31-19-generic
linux-image-2.6.31-20-generic linux-image-2.6.31-21-generic; sudo apt-
get --purge remove linux-image-2.6.31-23-generic

You should now just have:

ii linux-image-2.6.32-32-generic 2.6.32-32.62 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-33-generic 2.6.32-33.70 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-34-generic 2.6.32-34.77 Linux kernel image for version 2.6.32 on x86
iF linux-image-2.6.32-36-generic 2.6.32-36.79 Linux kernel image for version 2.6.32 on x86

Then retry the upgrade.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

ok, run:

gedit /etc/grub.d/30_os-prober

What is output?

Revision history for this message
JG (jeffgio) said :
#10

The update failed with the same message of a subprocess failure,
watching the messages it was grub related.

I have a 2nd disk which can boot with XP as a primary if I swap the disk
cables, otherwise I can select from grub. I had to make a change to a
grub config to get this to work, but afterward updates seemed to work.

When I run the command it opens grub.d in gedit and puts me to this
location, where the disk swap lines are located

EOF
      save_default_entry | sed -e "s/^/\t/"
      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"

      case ${LONGNAME} in
 # drivemap -s (hd0) \${root}
 Windows\ Vista*|Windows\ 7*)
 ;;
 *)
   cat << EOF
 set root=(hd1,2)
 drivemap (hd0) (hd1)
 drivemap (hd1) (hd0)
EOF
 ;;
      esac

      cat <<EOF
 chainloader (hd1,2)+1
}
EOF
    ;;

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Thu, 19 Jan 2012 22:31:24 -0000

Your question #185234 on update-manager in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234

    Status: Open => Needs information

actionparsnip requested more information:
ok, run:

gedit /etc/grub.d/30_os-prober

What is output?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

It's a big of a bigger file than that. Can you paste the WHOLE file

Thanks

Revision history for this message
JG (jeffgio) said :
#12

I believe I changed this section of grub.cfg back when I updated from
9.10 to 10.04

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sdb2)" {
 insmod ntfs
 set root=(hd1,2)
 drivemap -s (hd0) (hd1)
 chainloader (hd1,2)+1
}
### END /etc/grub.d/30_os-prober ###

THanks for all the help

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Thu, 19 Jan 2012 22:50:46 -0000

Your question #185234 on update-manager in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234

    Status: Open => Needs information

actionparsnip requested more information:
ok, run:

gedit /etc/grub.d/30_os-prober

What is output?

Revision history for this message
JG (jeffgio) said :
#13

#! /bin/sh -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib

. ${libdir}/grub/grub-mkconfig_lib

found_other_os=

adjust_timeout () {
  if [ "x${found_other_os}" = "x" ] ; then
    if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
      if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
 verbose=
      else
 verbose=" --verbose"
      fi

      if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then
 cat <<EOF
if [ \${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep$verbose --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
EOF
      else
 cat << EOF
if [ \${timeout} != -1 ]; then
  if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
    set timeout=0
  fi
fi
EOF
      fi
    fi
  fi
}

if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
  adjust_timeout
  exit 0
fi

if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober
2> /dev/null`" ] ; then
  # missing os-prober and/or linux-boot-prober
  adjust_timeout
  exit 0
fi

OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
if [ -z "${OSPROBED}" ] ; then
  # empty os-prober output, nothing doing
  adjust_timeout
  exit 0
fi

for OS in ${OSPROBED} ; do
  DEVICE="`echo ${OS} | cut -d ':' -f 1`"
  LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
  LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
  BOOT="`echo ${OS} | cut -d ':' -f 4`"

  if [ -z "${LONGNAME}" ] ; then
    LONGNAME="${LABEL}"
  fi

  echo "Found ${LONGNAME} on ${DEVICE}" >&2
  found_other_os=1

  case ${BOOT} in
    chain)

      cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" {
EOF
      save_default_entry | sed -e "s/^/\t/"
      prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"

      case ${LONGNAME} in
 # drivemap -s (hd0) \${root}
 Windows\ Vista*|Windows\ 7*)
 ;;
 *)
   cat << EOF
 set root=(hd1,2)
 drivemap (hd0) (hd1)
 drivemap (hd1) (hd0)
EOF
 ;;
      esac

      cat <<EOF
 chainloader (hd1,2)+1
}
EOF
    ;;
    linux)
      LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' '
'^' | paste -s -d ' '`"

      for LINUX in ${LINUXPROBED} ; do
        LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
        LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
        LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
        LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
        LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
        LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"

        if [ -z "${LLABEL}" ] ; then
          LLABEL="${LONGNAME}"
        fi

         if [ "${LROOT}" != "${LBOOT}" ]; then
           LKERNEL="${LKERNEL#/boot}"
           LINITRD="${LINITRD#/boot}"
         fi

        cat << EOF
menuentry "${LLABEL} (on ${DEVICE})" {
EOF
 save_default_entry | sed -e "s/^/\t/"
 prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/"
 cat << EOF
 linux ${LKERNEL} ${LPARAMS}
EOF
        if [ -n "${LINITRD}" ] ; then
          cat << EOF
 initrd ${LINITRD}
EOF
        fi
        cat << EOF
}
EOF
      done
    ;;
    macosx)
      OSXUUID="`grub-probe --target=fs_uuid --device ${DEVICE}
2> /dev/null`"
        cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" {
EOF
 save_default_entry | sed -e "s/^/\t/"
 prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
 cat << EOF
        insmod vbe
        do_resume=0
        if [ /var/vm/sleepimage -nt10 / ]; then
           if xnu_resume /var/vm/sleepimage; then
             do_resume=1
           fi
        fi
        if [ \$do_resume == 0 ]; then
           xnu_uuid ${OSXUUID} uuid
           if [ -f /Extra/DSDT.aml ]; then
              acpi -e /Extra/DSDT.aml
           fi
           xnu_kernel /mach_kernel boot-uuid=\${uuid} rd=*uuid
           if [ /System/Library/Extensions.mkext
-nt /System/Library/Extensions ]; then
              xnu_mkext /System/Library/Extensions.mkext
           else
              xnu_kextdir /System/Library/Extensions
           fi
           if [ -f /Extra/Extensions.mkext ]; then
              xnu_mkext /Extra/Extensions.mkext
           fi
           if [ -d /Extra/Extensions ]; then
              xnu_kextdir /Extra/Extensions
           fi
           if [ -f /Extra/devtree.txt ]; then
              xnu_devtree /Extra/devtree.txt
           fi
           if [ -f /Extra/splash.jpg ]; then
              insmod jpeg
              xnu_splash /Extra/splash.jpg
           fi
           if [ -f /Extra/splash.png ]; then
              insmod png
              xnu_splash /Extra/splash.png
           fi
           if [ -f /Extra/splash.tga ]; then
              insmod tga
              xnu_splash /Extra/splash.tga
           fi
        fi
}
EOF
    ;;
    hurd|*)
      echo " ${LONGNAME} is not yet supported by grub-mkconfig." >&2
    ;;
  esac
done

adjust_timeout

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Thu, 19 Jan 2012 23:10:58 -0000

Your question #185234 on update-manager in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234

    Status: Open => Needs information

actionparsnip requested more information:
It's a big of a bigger file than that. Can you paste the WHOLE file

Thanks

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#14

Can you give the output of:

ls /etc/grub.d/

Thanks

Revision history for this message
JG (jeffgio) said :
#15

00_header 10_linux 30_os-prober 30_os-prober.dpkg-dist
30_os-prober_original.old 40_custom
05_debian_theme 20_memtest86+ 30_os-prober~
30_os-prober_jag_original.old 30_os-prober.save README

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Thu, 19 Jan 2012 23:25:42 -0000

ls /etc/grub.d/

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#16

Why do you have so many os-prober files?

Revision history for this message
JG (jeffgio) said :
#17

Not sure, teh *.old are ones I copied. I believe the change I made was
to the 30-os_prober script to reflect the disk image swap for booting
into XP.

Which ones are needed, just 30-os_prober? I can move the other into a
folder and run the grub refresh config command, does this sound useful?

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Thu, 19 Jan 2012 23:41:00 -0000

Your question #185234 on update-manager in Ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234

    Status: Open => Needs information

actionparsnip requested more information:
Why do you have so many os-prober files?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#18

Try:

sudo mv /etc/grub.d/30_os-prober.save ~; sudo update-grub

Is it cleaner?

Revision history for this message
JG (jeffgio) said :
#19

After moving all the other 30 files to a new folder I get the following
from grub-update, which I expect has fixed the issue, as this was the
sequence that seemed to cause the problem??

Thanks again for all your help

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-37-generic
Found initrd image: /boot/initrd.img-2.6.32-37-generic
Found linux image: /boot/vmlinuz-2.6.32-36-generic
Found initrd image: /boot/initrd.img-2.6.32-36-generic
Found linux image: /boot/vmlinuz-2.6.32-34-generic
Found initrd image: /boot/initrd.img-2.6.32-34-generic
Found linux image: /boot/vmlinuz-2.6.32-33-generic
Found initrd image: /boot/initrd.img-2.6.32-33-generic
Found linux image: /boot/vmlinuz-2.6.32-32-generic
Found initrd image: /boot/initrd.img-2.6.32-32-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sdb2
done

-----Original Message-----
From: actionparsnip <email address hidden>
Reply-to: <email address hidden>
To: <email address hidden>
Subject: Re: [Question #185234]: linux-image-generic: dependency
problems - leaving unconfigured
Date: Fri, 20 Jan 2012 05:41:05 -0000

sudo update-grub

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#20

can you now boot to the newest kernel?

Revision history for this message
JG (jeffgio) said :
#21

Yes, all the updates have cleared and I've removed one older image that didn't install completely with Ubuntu Tweak.

Thanks again for the help and pointing me in the proper direction!

---- actionparsnip <email address hidden> wrote:
> Your question #185234 on update-manager in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> can you now boot to the newest kernel?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/update-manager/+question/185234
>
> You received this question notification because you asked the question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#22

Plese mark as solved if the question is answered. Thanks

Can you help with this problem?

Provide an answer of your own, or ask JG for more information if necessary.

To post a message you must log in.