0

I get:

dpkg: error processing linux-image-2.6-amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-2.6.26-1-amd64
 linux-image-2.6.26-2-amd64
 linux-image-2.6-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please see full output here: http://pastebin.com/rmBsiBeS

dukevin
  • 1,630
  • 3
  • 18
  • 25

2 Answers2

1

It appears that the issue is with trying to update grub:

Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/sda1.
grub-probe: error: Cannot find a GRUB drive for /dev/sda1.  Check your device.map.

User postinst hook script [update-grub] exited with value 1
dpkg: error processing linux-image-2.6.26-1-amd64 (--configure):
subprocess post-installation script returned error exit status 1

This is caused when grub tries to read your device.map file and fails to find some of the mappings. Fortunately, assuming this is just a borked config file, it can easily be regenerated.

cp /boot/grub/device.map /boot/grub/device.map.bak
grub-mkdevicemap

Future updates should now go more smoothly. Hope this fixes your problem!

EDIT: Still empty? You have two options (at least, in this specific case):

  1. Add the device manually to /boot/grub/device.map; it should look like:

    (hd0) /dev/sda1

  2. Force grub to recheck the drives.

    grub-install --recheck /dev/sda

Andrew M.
  • 11,182
  • 2
  • 35
  • 29
  • Ah still some problems: http://pastebin.com/0bFQ8dWz I recently edited the locales file but I restored the file back, I'm not sure why it's saying these – dukevin Sep 12 '11 at 06:29
  • So, technically this is a different issue, but make sure that the locales you're using are available in `/usr/share/i18n/locales`. You should be able to run `locale-gen` manually to see if the settings work. – Andrew M. Sep 12 '11 at 11:15
  • Yes, that fixed the locales, but the grub problem seems unchanged. See output: http://pastebin.com/KQdT0yKN – dukevin Sep 12 '11 at 22:14
  • Hmm, can you post the outputs of `cat /boot/grub/device.map`, and `mount`? – Andrew M. Sep 12 '11 at 22:46
  • http://pastebin.com/iJhswwUX – dukevin Sep 13 '11 at 00:31
  • question: when I read the docs for Grub it says `"GRUB is the GRand Unified Bootloader, a very powerful newish BootLoader that can be used to boot most operating system on the intel platforms."` but looking at the output, aren't I using AMD not intel? – dukevin Sep 13 '11 at 01:00
  • I have amended the answer with additional--albeit more manual--solutions. Also, the Intel platforms are X86--which is supported by AMD and Intel both, so that is not an issue. – Andrew M. Sep 13 '11 at 02:15
  • `Rx:~# grub-install --recheck /dev/sda /dev/sda: Not found or not a block device.` So I should take the manual approach? – dukevin Sep 13 '11 at 02:21
0

Found out what the problem was.

The issue was due to some post installation scripts due to grub failing to configure. This wasn't the issue due to dependencies.

The issue was fixed by removing these packages from the server as these packages were not installed completely.

linux-image-2.6.26-1-amd64
linux-image-2.6.26-2-amd64
linux-image-2.6-amd
dukevin
  • 1,630
  • 3
  • 18
  • 25