Kernel update not working on ubuntu 13.10 server

Asked by Wenceslaus Dsilva

Hi Everyone,

I have run a apt-get update and upgrade command on one of our AWS servers and there was a kernel update which I wanted to upgrade.
I selected yes but it got stuck "Searching for GRUB installation directory ... found: /boot/grub" and I could not cancel the operation as well.

I tried steps from all over the internet but it did not work. So I ended up on the following link https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

And I followed the steps in point 5

here is the output of those command and got stuck the same way like before after running sudo apt-get --purge autoremove:-
user@XXXX:~$ sudo rm /var/lib/dpkg/lock; sudo dpkg --configure -a
Setting up linux-image-3.11.0-20-generic (3.11.0-20.34) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/x-grub-legacy-ec2 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
Searching for GRUB installation directory ... found: /boot/grub

^CFailed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.11.0-20-generic.postinst line 1010.
dpkg: error processing linux-image-3.11.0-20-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-virtual:
 linux-image-virtual depends on linux-image-3.11.0-20-generic; however:
  Package linux-image-3.11.0-20-generic is not configured yet.

dpkg: error processing linux-image-virtual (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-virtual:
 linux-virtual depends on linux-image-virtual (= 3.11.0.20.21); however:
  Package linux-image-virtual is not configured yet.

dpkg: error processing linux-virtual (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.11.0-20-generic
 linux-image-virtual
 linux-virtual
user@XXXX:~$ ubuntu-support-status
Support status summary of 'ip-XXXXX3':

You have 695 packages (91.7%) supported until July 2014 (9m)
You have 3 packages (0.4%) supported until February 2015 (9m)

You have 8 packages (1.1%) that can not/no-longer be downloaded
You have 52 packages (6.9%) that are unsupported

Run with --show-unsupported, --show-supported or --show-all to see more details
user@XXXX:~$ ubuntu-support-status --show-unsupported
Support status summary of 'ip-XXXXX3':

You have 695 packages (91.7%) supported until July 2014 (9m)
You have 3 packages (0.4%) supported until February 2015 (9m)

You have 8 packages (1.1%) that can not/no-longer be downloaded
You have 52 packages (6.9%) that are unsupported

No longer downloadable:
afick al-threat-host ec2-ami-tools libgd3 libjson-c2 libqdbm14
linux-image-3.8.0-35-generic uptrack

Unsupported:
debsums dos2unix fail2ban htop javascript-common
libapache-mod-security libapache2-mod-evasive libapache2-modsecurity
libboost-iostreams1.49.0 libevtlog0 libfile-fnmatch-perl libgsasl7
libivykis0 libjs-cropper libjs-prototype libjs-scriptaculous
libkyotocabinet16 libmailutils4 libmcrypt4 libmongo-client0
libnet-daemon-perl libntlm0 libonig2 libphp-phpmailer libphp-snoopy
libplrpc-perl libruby libsyslog-ng-3.3.6 libtiff4
linux-headers-3.11.0-19 linux-headers-3.11.0-19-generic
linux-image-3.11.0-19-generic mailutils mailutils-common mcrypt
mod-pagespeed-stable modsecurity-crs php5-json php5-mcrypt python-pip
python-support python3-serial syslog-ng syslog-ng-core
syslog-ng-mod-json syslog-ng-mod-mongodb syslog-ng-mod-sql tinymce
vim-addon-manager wordpress wordpress-l10n wwwconfig-common

user@XXXX:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
user@XXXX:~$ dpkg --print-foreign-architectures
user@XXXX:~$ sudo grep -R proxy /etc/apt/*
user@XXXX:~$ grep proxy /etc/environment
user@XXXX:~$ echo $http_proxy

user@XXXX:~$ echo $ftp_proxy

user@XXXX:~$ grep proxy /etc/bash.bashrc
user@XXXX:~$ grep proxy ~/.bashrc
user@XXXX:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
user@XXXX:~$ sudo fuser -vvv /var/lib/dpkg/lock
user@XXXX:~$ sudo fuser -vvv /var/cache/apt/archives/lock
Specified filename /var/cache/apt/archives/lock does not exist.
user@XXXX:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
user@XXXX:~$ uname -a
Linux ip-XXXXX3 3.11.0-19-generic #33-Ubuntu SMP Tue Mar 11 18:48:34 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
user@XXXX:~$ sudo rm /var/lib/apt/lists/lock
user@XXXX:~$ sudo rm /var/cache/apt/archives/lock
rm: cannot remove â/var/cache/apt/archives/lockâ: No such file or directory
user@XXXX:~$ sudo rm /var/lib/dpkg/lock
user@XXXX:~$ sudo touch /var/lib/dpkg/lock
user@XXXX:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
user@XXXX:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
user@XXXX:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
user@XXXX:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
user@XXXX:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
user@XXXX:~$ sudo rm -rf /var/lib/dpkg/updates/*
user@XXXX:~$ sudo rm -rf /var/lib/apt/lists
user@XXXX:~$ sudo rm /var/cache/apt/*.bin
user@XXXX:~$ sudo mkdir /var/lib/apt/lists
user@XXXX:~$ sudo mkdir /var/lib/apt/lists/partial
user@XXXX:~$ LANG=C;sudo apt-get clean
user@XXXX:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
user@XXXX:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-3.11.0-20-generic (3.11.0-20.34) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-20-generic
^M
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/x-grub-legacy-ec2 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
Searching for GRUB installation directory ... found: /boot/grub

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

What is the output of:

sudo apt-get -f install

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#2

Same result its stuck

ubuntu@ip-10-0-0-183:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-image-3.11.0-20-generic (3.11.0-20.34) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.11.0-20-generic / boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-20-generic /b oot/vmlinuz-3.11.0-20-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-20-generic

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

Ok and the output of:

sudo apt-get clean
sudo apt-get upgrade
df -h; df -i

Thanks

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#4

ubuntu@ip-10-0-0-183:~$ sudo apt-get clean
ubuntu@ip-10-0-0-183:~$ sudo apt-get upgrade
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
ubuntu@ip-10-0-0-183:~$ df -h; df -i
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.8G 2.6G 4.8G 35% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 816M 12K 816M 1% /dev
tmpfs 166M 1.1M 165M 1% /run
none 5.0M 0 5.0M 0% /run/lock
tmpfs 826M 0 826M 0% /run/shm
none 100M 0 100M 0% /run/user
/dev/xvdb 147G 188M 140G 1% /mnt
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/xvda1 524288 157184 367104 30% /
none 211415 2 211413 1% /sys/fs/cgroup
udev 208783 393 208390 1% /dev
tmpfs 211415 393 211022 1% /run
none 211415 7 211408 1% /run/lock
tmpfs 211415 1 211414 1% /run/shm
none 211415 2 211413 1% /run/user
/dev/xvdb 9773056 11 9773045 1% /mnt
ubuntu@ip-10-0-0-183:~$

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

Ok what is the output of:

sudo dpkg --configure -a

Revision history for this message
Manfred Hampl (m-hampl) said :
#6

Try again with the commands

sudo dpkg --configure -a
sudo apt-get upgrade

In case that one of the commands seems to be stuck, don't get impatient. Give it at least ten minutes before you try interrupting it.

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#7

It took a lot of time but this is the output

ubuntu@ip-10-0-0-183:~$ sudo dpkg --configure -a
Setting up linux-image-3.11.0-20-generic (3.11.0-20.34) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/x-grub-legacy-ec2 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
run-parts: /etc/kernel/postinst.d/x-grub-legacy-ec2 exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.11.0-20-generic.postinst line 1010.
dpkg: error processing linux-image-3.11.0-20-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-virtual:
 linux-image-virtual depends on linux-image-3.11.0-20-generic; however:
  Package linux-image-3.11.0-20-generic is not configured yet.

dpkg: error processing linux-image-virtual (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-virtual:
 linux-virtual depends on linux-image-virtual (= 3.11.0.20.21); however:
  Package linux-image-virtual is not configured yet.

dpkg: error processing linux-virtual (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.11.0-20-generic
 linux-image-virtual
 linux-virtual

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

What you see now, most probably is a consequence of the failed installation attempts.
You have to be aware that the package management system tries to make sure that only one package management program is running at a time (to avoid concurrent update problems). Apparently there is still a process running (probably stalled), that blocks one of the package management files and prevents all further updates.

Proposals for solution:
1. rebooting (if easily possible for your server system)
or
2. "sudo fuser -vvv /var/cache/debconf/config.dat" to identify the process that locks that file for killing the process.

Then try
sudo dpkg --configure -a
sudo apt-get upgrade
again.

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#9

First off I would like to thank you guys for helping out with this, just wanted to say that.

Here is the output Manfred, its still getting stuck at that same place

ubuntu@ip-10-0-0-183:~$ sudo fuser -vvv /var/cache/debconf/config.dat
                     USER PID ACCESS COMMAND
/var/cache/debconf/config.dat:
                     root 1504 F.... frontend
ubuntu@ip-10-0-0-183:~$ sudo kill -9 1504
ubuntu@ip-10-0-0-183:~$ sudo dpkg --configure -a
Setting up linux-image-3.11.0-20-generic (3.11.0-20.34) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/x-grub-legacy-ec2 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
Searching for GRUB installation directory ... found: /boot/grub

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#10

Manfred I still tried to do an sudo apt-get upgrade and here is the output this is the output after Searching for GRUB installation directory ... found:/boot/grub from the previous command and stuck again at the same place

dpkg: error processing linux-image-virtual (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-virtual:
 linux-virtual depends on linux-image-virtual (= 3.11.0.20.21); however:
  Package linux-image-virtual is not configured yet.

dpkg: error processing linux-virtual (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.11.0-20-generic
 linux-image-virtual
 linux-virtual
ubuntu@ip-10-0-0-183:~$ sudo fuser -vvv /var/cache/debconf/config.dat
ubuntu@ip-10-0-0-183:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  dpkg dpkg-dev icedtea-7-jre-jamvm libdpkg-perl libelf1 libjbig0 libssl-dev libssl-doc libssl1.0.0 linux-headers-3.11.0-20 linux-headers-3.11.0-20-generic linux-image-3.11.0-20-generic
  linux-libc-dev openjdk-7-jre-headless openssl qemu-utils
16 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 79.4 MB of archives.
After this operation, 48.1 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main dpkg amd64 1.16.12ubuntu1.2 [2,071 kB]
Get:2 http://security.ubuntu.com/ubuntu/ saucy-security/main linux-image-3.11.0-20-generic amd64 3.11.0-20.35 [14.5 MB]
Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main libssl-doc all 1.0.1e-3ubuntu1.3 [1,033 kB]
Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main libssl-dev amd64 1.0.1e-3ubuntu1.3 [1,570 kB]
Get:5 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main libssl1.0.0 amd64 1.0.1e-3ubuntu1.3 [1,051 kB]
Get:6 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main libelf1 amd64 0.157-1ubuntu1.1 [45.7 kB]
Get:7 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main icedtea-7-jre-jamvm amd64 7u55-2.4.7-1ubuntu1~0.13.10.1 [604 kB]
Get:8 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main openjdk-7-jre-headless amd64 7u55-2.4.7-1ubuntu1~0.13.10.1 [41.6 MB]
Get:9 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main libjbig0 amd64 2.0-2ubuntu1.13.10.1 [29.0 kB]
Get:10 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main openssl amd64 1.0.1e-3ubuntu1.3 [524 kB]
Get:11 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main dpkg-dev all 1.16.12ubuntu1.2 [771 kB]
Get:12 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main libdpkg-perl all 1.16.12ubuntu1.2 [186 kB]
Get:13 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ saucy-updates/main qemu-utils amd64 1.5.0+dfsg-3ubuntu5.4 [810 kB]
Get:14 http://security.ubuntu.com/ubuntu/ saucy-security/main linux-headers-3.11.0-20 all 3.11.0-20.35 [12.6 MB]
Get:15 http://security.ubuntu.com/ubuntu/ saucy-security/main linux-headers-3.11.0-20-generic amd64 3.11.0-20.35 [1,079 kB]
Get:16 http://security.ubuntu.com/ubuntu/ saucy-security/main linux-libc-dev amd64 3.11.0-20.35 [963 kB]
Fetched 79.4 MB in 19s (4,107 kB/s)
Preconfiguring packages ...
(Reading database ... 102621 files and directories currently installed.)
Preparing to replace linux-image-3.11.0-20-generic 3.11.0-20.34 (using .../linux-image-3.11.0-20-generic_3.11.0-20.35_amd64.deb) ...
Done.
Unpacking replacement linux-image-3.11.0-20-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
Preparing to replace dpkg 1.16.12ubuntu1 (using .../dpkg_1.16.12ubuntu1.2_amd64.deb) ...
Unpacking replacement dpkg ...
Processing triggers for man-db ...
Setting up dpkg (1.16.12ubuntu1.2) ...
(Reading database ... 102621 files and directories currently installed.)
Preparing to replace libssl-doc 1.0.1e-3ubuntu1.2 (using .../libssl-doc_1.0.1e-3ubuntu1.3_all.deb) ...
Unpacking replacement libssl-doc ...
Preparing to replace libssl-dev:amd64 1.0.1e-3ubuntu1.2 (using .../libssl-dev_1.0.1e-3ubuntu1.3_amd64.deb) ...
Unpacking replacement libssl-dev:amd64 ...
Preparing to replace libssl1.0.0:amd64 1.0.1e-3ubuntu1.2 (using .../libssl1.0.0_1.0.1e-3ubuntu1.3_amd64.deb) ...
Unpacking replacement libssl1.0.0:amd64 ...
Preparing to replace libelf1:amd64 0.157-1ubuntu1 (using .../libelf1_0.157-1ubuntu1.1_amd64.deb) ...
Unpacking replacement libelf1:amd64 ...
Preparing to replace icedtea-7-jre-jamvm:amd64 7u51-2.4.4-0ubuntu0.13.10.1 (using .../icedtea-7-jre-jamvm_7u55-2.4.7-1ubuntu1~0.13.10.1_amd64.deb) ...
Unpacking replacement icedtea-7-jre-jamvm:amd64 ...
Preparing to replace openjdk-7-jre-headless:amd64 7u51-2.4.4-0ubuntu0.13.10.1 (using .../openjdk-7-jre-headless_7u55-2.4.7-1ubuntu1~0.13.10.1_amd64.deb) ...
Unpacking replacement openjdk-7-jre-headless:amd64 ...
Preparing to replace libjbig0:amd64 2.0-2ubuntu1 (using .../libjbig0_2.0-2ubuntu1.13.10.1_amd64.deb) ...
Unpacking replacement libjbig0:amd64 ...
Preparing to replace openssl 1.0.1e-3ubuntu1.2 (using .../openssl_1.0.1e-3ubuntu1.3_amd64.deb) ...
Unpacking replacement openssl ...
Preparing to replace dpkg-dev 1.16.12ubuntu1 (using .../dpkg-dev_1.16.12ubuntu1.2_all.deb) ...
Unpacking replacement dpkg-dev ...
Preparing to replace libdpkg-perl 1.16.12ubuntu1 (using .../libdpkg-perl_1.16.12ubuntu1.2_all.deb) ...
Unpacking replacement libdpkg-perl ...
Preparing to replace linux-headers-3.11.0-20 3.11.0-20.34 (using .../linux-headers-3.11.0-20_3.11.0-20.35_all.deb) ...
Unpacking replacement linux-headers-3.11.0-20 ...
Preparing to replace linux-headers-3.11.0-20-generic 3.11.0-20.34 (using .../linux-headers-3.11.0-20-generic_3.11.0-20.35_amd64.deb) ...
Unpacking replacement linux-headers-3.11.0-20-generic ...
Preparing to replace linux-libc-dev:amd64 3.11.0-20.34 (using .../linux-libc-dev_3.11.0-20.35_amd64.deb) ...
Unpacking replacement linux-libc-dev:amd64 ...
Preparing to replace qemu-utils 1.5.0+dfsg-3ubuntu5.3 (using .../qemu-utils_1.5.0+dfsg-3ubuntu5.4_amd64.deb) ...
Unpacking replacement qemu-utils ...
Processing triggers for man-db ...
Setting up linux-image-3.11.0-20-generic (3.11.0-20.35) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
run-parts: executing /etc/kernel/postinst.d/x-grub-legacy-ec2 3.11.0-20-generic /boot/vmlinuz-3.11.0-20-generic
Searching for GRUB installation directory ... found: /boot/grub

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

How long did you wait for the package management to finish?
Is there any process running with high CPU usage?

What happens if you try the command

sudo update-grub

Does it also hang at "Searching for GRUB installation directory ... found: /boot/grub"?

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#12

with the dpkg command it took like 10 mins but now with the apt-get upgrade its still stuck
for searching for GRUB it takes a few seconds and then gets stuck after that

I am trying to exit out of the of apt-get upgrade but I am unable too, as soon as it finishes I will try the command mentioned by you and post the results here

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#13

I have put the apt command in the background
and here is the top command result
top - 12:01:35 up 25 days, 17:09, 1 user, load average: 8.00, 8.02, 7.82
Tasks: 132 total, 1 running, 129 sleeping, 2 stopped, 0 zombie
%Cpu(s): 0.7 us, 0.0 sy, 0.0 ni, 0.0 id, 99.3 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 1691320 total, 1633280 used, 58040 free, 132188 buffers
KiB Swap: 0 total, 0 used, 0 free, 837264 cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
36005 ubuntu 20 0 19340 1584 1124 R 0.7 0.1 0:00.05 top
33760 mysql 20 0 544m 37m 1528 S 0.3 2.3 8:35.80 mysqld
    1 root 20 0 26956 2452 1184 S 0.0 0.1 0:02.94 init
    2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
    3 root 20 0 0 0 0 S 0.0 0.0 0:02.55 ksoftirqd/0
    4 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0
    5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
    6 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/u2:0
    7 root rt 0 0 0 0 S 0.0 0.0 0:00.09 migration/0
    8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
    9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
   10 root 20 0 0 0 0 S 0.0 0.0 3:56.28 rcu_sched
   11 root 20 0 0 0 0 S 0.0 0.0 1:23.25 rcuos/0
   12 root rt 0 0 0 0 S 0.0 0.0 0:15.80 watchdog/0
   13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
   14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
   15 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
   16 root 20 0 0 0 0 S 0.0 0.0 0:00.04 xenwatch
   17 root 20 0 0 0 0 S 0.0 0.0 0:00.04 xenbus
   18 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
   19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
   20 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
   21 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/u3:0
   22 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
   23 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ata_sff
   24 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khubd
   25 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md
   26 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 devfreq_wq
   27 root 20 0 0 0 0 S 0.0 0.0 0:40.45 kworker/0:1
   29 root 20 0 0 0 0 S 0.0 0.0 0:00.94 khungtaskd
   30 root 20 0 0 0 0 S 0.0 0.0 1:03.19 kswapd0
   31 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
   32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 fsnotify_mark
   33 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ecryptfs-kthrea
   34 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 crypto
   46 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kthrotld
   47 root 20 0 0 0 0 S 0.0 0.0 0:24.38 kworker/u2:1

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#14

Ok i did something....
put the command in the background i.e. the apt-get upgrade
and ran the command given by Manfred i.e. sudo fuser -vvv /var/cache/debconf/config.dat
killed a process called "frontend"
and then brought the apt-get upgrade command in the foreground

which gave me this

Package configuration

                                                                                                                                                                 No apport report written becaus

   âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ⤠Configuring grub-pc ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
   â The grub-pc package is being upgraded. This menu allows you to select which devices you'd like grub-install to be automatically run for, if any. â
   â â
   â Running grub-install automatically is recommended in most situations, to prevent the installed GRUB core image from getting out of sync with GRUB modules or grub.cfg. â
   â â
   â If you're unsure which drive is designated as boot drive by your BIOS, it is often a good idea to install GRUB to all of them. â
   â â
   â Note: it is possible to install GRUB to partition boot records as well, and some appropriate partitions are offered here. However, this forces GRUB to use the blocklist mechanism, â
   â which makes it less reliable, and therefore is not recommended. â
   â â
   â GRUB install devices: â
   â â
   â [ ] /dev/xvdb (160104 MB; ???) â
   â [ ] /dev/xvdf (8589 MB; ???) â
   â [ ] /dev/xvdf (8589 MB; ???) â
   â â
   â â
   â <Ok> â
   â â
   âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ

I know my partition is /dev/xvda1 or something which is not listed what should I do from here

Revision history for this message
Manfred Hampl (m-hampl) said :
#15

I am not completely sure what there is happening on your system.
The dialogue "Configuring grub-pc - The grub-pc package is being upgraded." is coming unexpected for me.

The only thing that I can conclude is that there is apparently something wrong in your grub installation, but I do not have a clue how to proceed.

Maybe the advice to run "sudo update-grub" was not correct for your system, it might be possible that your system needs "sudo update-grub-legacy-ec2" instead.

Revision history for this message
Wenceslaus Dsilva (wenceslaus-dsilva) said :
#16

Ok... I am trying to run the command now i.e. sudo update-grub-legacy-ec2
I will post the output in sometime

Can you help with this problem?

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

To post a message you must log in.