Software center, etc. says downloads failed , but they didn't.

Asked by Jim O'Neil

I tried posting at the 'ask ubuntu forum but didn't get any suggested fixes;

When I download from the software center or do a system update I am getting error messages. The downloads and updates seem to be installed and operate OK in spite of the error messages.

The error messages pretty much say the download center can't find refind and that the ESP seems to be lost. None the less I can boot Ubuntu and windows 8 so I suspect there is an ESP. I've no idea why they want refind.

I sure hope someone here can offer suggestions for a fix.

To start, I'm running Ubuntu 14.04 on my Dell Inspiron 6605 desktop, with Windows 8 on another partition.

The problem, detailed below, started when I tried to upgrade from Ubuntu 13.04 to 13.10; I had all sorts of trouble and went back to 13.04. I was hoping that an installation of 14.04 would correct my problem, but it do not.

So, here's the problem: When I try to download software (via either the software center or Sysnaptic) or try to update using the Software Updater, I always get a message that the update or download failed. The programs are (apparently) actually loaded the the error message says installation failed.

Here is the failure message:

***
installArchives() failed: (Reading database ...
(Reading database ... 5%
(Reading database ... 10%

[...deleted % increases to save space in this post]

(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 316143 files and directories currently installed.)
Removing bovo (4:4.13.0-0ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Processing triggers for menu (2.1.46ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for mime-support (3.54ubuntu1) ...
Setting up refind (0.7.7-1) ...
/var/lib/dpkg/info/refind.postinst: line 4: efibootmgr: command not found
Installing rEFInd on Linux....
The ESP doesn't seem to be mounted! Trying to find it....
./install.sh: line 704: dmraid: command not found
// doesn't seem to be on a VFAT filesystem. The ESP must be
mounted at //boot or //boot/efi and it must be VFAT! Aborting!
dpkg: error processing package refind (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 refind
Error in function:
Setting up refind (0.7.7-1) ...
/var/lib/dpkg/info/refind.postinst: line 4: efibootmgr: command not found
Installing rEFInd on Linux....
The ESP doesn't seem to be mounted! Trying to find it....
./install.sh: line 704: dmraid: command not found
// doesn't seem to be on a VFAT filesystem. The ESP must be
mounted at //boot or //boot/efi and it must be VFAT! Aborting!
dpkg: error processing package refind (--configure):
 subprocess installed post-installation script returned error exit status 1
***

So! Then I tried installing refind via terminal and got pretty much the same error message:

***
jim@jim-Inspiron-660s:~$ $ sudo apt-add-repository ppa:rodsmith/refind
$: command not found
jim@jim-Inspiron-660s:~$ sudo apt-add-repository ppa:rodsmith/refind
[sudo] password for jim:
 A graphical boot manager for EFI- and UEFI-based computers, such as all Intel-based Macs and recent (most 2011 and later) PCs.
 More info: https://launchpad.net/~rodsmith/+archive/refind
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpdoqf82gq/secring.gpg' created
gpg: keyring `/tmp/tmpdoqf82gq/pubring.gpg' created
gpg: requesting key 9122E0C2 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpdoqf82gq/trustdb.gpg: trustdb created
gpg: key 9122E0C2: public key "Launchpad PPA for Roderick Smith" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
jim@jim-Inspiron-660s:~$ sudo apt-get update
Ign http://dl.google.com stable InRelease
Hit http://dl.google.com stable Release.gpg

[Again I'm deleting much of the download log from this post to save space but I still have it all on file.]

Preparing to unpack .../sbsigntool_0.6-0ubuntu7_amd64.deb ...
Unpacking sbsigntool (0.6-0ubuntu7) ...
Preparing to unpack .../refind_0.8.2-0ppa3_amd64.deb ...
Unpacking refind (0.8.2-0ppa3) over (0.7.7-1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up efibootmgr (0.5.4-7ubuntu1) ...
Setting up sbsigntool (0.6-0ubuntu7) ...
Setting up refind (0.8.2-0ppa3) ...
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.

Installing rEFInd on Linux....
The ESP doesn't seem to be mounted! Trying to find it....
// doesn't seem to be on a VFAT filesystem. The ESP must be
mounted at //boot or //boot/efi and it must be VFAT! Aborting!
dpkg: error processing package refind (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 refind
E: Sub-process /usr/bin/dpkg returned an error code (1)
jim@jim-Inspiron-660s:~$

***
Now I've downloaded the iso 'boot-repair=disk- 64 bit' and I'm tempted to try that and see what happens, if I regain ESP, refind, etc.

I did try running boot repair but it din't help.

Even though ESP is apparently lost I am still able to start the computer and choose Ubuntu or windows.

Someone at 'Ask Ubuntu suggested I include the following info:

***
lsblk output:

jim@jim-Inspiron-660s:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 350M 0 part
├─sda2 8:2 0 194.9G 0 part
├─sda3 8:3 0 1K 0 part
├─sda5 8:5 0 451.2G 0 part /
├─sda6 8:6 0 3.9G 0 part [SWAP]
└─sda7 8:7 0 281.3G 0 part
sr0 11:0 1 1024M 0 rom
jim@jim-Inspiron-660s:~$
..

jim@jim-Inspiron-660s:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 444G 45G 377G 11% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 1.9G 12K 1.9G 1% /dev
tmpfs 383M 1.2M 382M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 19M 1.9G 1% /run/shm
none 100M 36K 100M 1% /run/user
jim@jim-Inspiron-660s:~$
***

Also I ran fdisk which presented the following information:

***

jim@jim-Inspiron-660s:~$ fdisk -l
jim@jim-Inspiron-660s:~$ sudo fdisk -l
[sudo] password for jim:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xb5ea334f

   Device Boot Start End Blocks Id System
/dev/sda1 * 2048 718847 358400 7 HPFS/NTFS/exFAT
/dev/sda2 718848 409310767 204295960 7 HPFS/NTFS/exFAT
/dev/sda3 409311230 1953523711 772106241 5 Extended
Partition 3 does not start on physical sector boundary.
/dev/sda5 999247872 1945399295 473075712 83 Linux
/dev/sda6 1945401344 1953523711 4061184 82 Linux swap / Solaris
/dev/sda7 409311232 999247871 294968320 83 Linux

Partition table entries are not in disk order
jim@jim-Inspiron-660s:~$

***

dev/sda5 is, to the best of my knowledge, where Ubuntu 14.04 resides.

Bottom line: I want to get rid of the error messages. I would like to understand why I am receiving them.

addendum:
It was suggested by actionparsnip in a message below that I get install dmraid as the error code included an unfulfilled dmraid command. I tried but again, I get an installation failed at processing refind notice. Here's the terminal run to try to install it:
**
jim@jim-Inspiron-660s:~$ sudo apt-get install dmraid
[sudo] password for jim:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cabextract gnome-video-effects libboost-program-options1.53.0 libcolamd2.7.1
  libdee-qt5-3 libdns99 libebackend-1.2-6 libechonest2.0 libedata-book-1.2-17
  libedata-cal-1.2-20 libfftw3-3 libfftw3-long3 libgweather-3-3 libhud-client2
  libjs-jquery libllvm3.3 libpoppler43 libprotobuf-lite7 libqt53d5
  libqt5location5 libqt5v8-5 librhythmbox-core7 libwebp4 libx264-123
  libxcb-sync0 linux-headers-3.11.0-23 linux-headers-3.11.0-23-generic
  linux-image-3.11.0-23-generic linux-image-extra-3.11.0-23-generic
  python-apport python-keyring python-launchpadlib python-lazr.restfulclient
  python-lazr.uri python-oauth python-problem-report python-secretstorage
  python-simplejson python-wadllib
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  kpartx kpartx-boot libdmraid1.0.0.rc16
The following NEW packages will be installed:
  dmraid kpartx kpartx-boot libdmraid1.0.0.rc16
0 upgraded, 4 newly installed, 0 to remove and 65 not upgraded.
1 not fully installed or removed.
Need to get 135 kB of archives.
After this operation, 569 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main libdmraid1.0.0.rc16 amd64 1.0.0.rc16-4.2ubuntu3 [84.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/main kpartx amd64 0.4.9-3ubuntu7 [25.0 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty/main kpartx-boot all 0.4.9-3ubuntu7 [2,076 B]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty/main dmraid amd64 1.0.0.rc16-4.2ubuntu3 [22.9 kB]
Fetched 135 kB in 3s (41.8 kB/s)
Selecting previously unselected package libdmraid1.0.0.rc16.
(Reading database ... 315691 files and directories currently installed.)
Preparing to unpack .../libdmraid1.0.0.rc16_1.0.0.rc16-4.2ubuntu3_amd64.deb ...
Unpacking libdmraid1.0.0.rc16 (1.0.0.rc16-4.2ubuntu3) ...
Selecting previously unselected package kpartx.
Preparing to unpack .../kpartx_0.4.9-3ubuntu7_amd64.deb ...
Unpacking kpartx (0.4.9-3ubuntu7) ...
Selecting previously unselected package kpartx-boot.
Preparing to unpack .../kpartx-boot_0.4.9-3ubuntu7_all.deb ...
Unpacking kpartx-boot (0.4.9-3ubuntu7) ...
Selecting previously unselected package dmraid.
Preparing to unpack .../dmraid_1.0.0.rc16-4.2ubuntu3_amd64.deb ...
Unpacking dmraid (1.0.0.rc16-4.2ubuntu3) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up refind (0.8.2-0ppa3) ...
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.
Installing rEFInd on Linux....
The ESP doesn't seem to be mounted! Trying to find it....
// doesn't seem to be on a VFAT filesystem. The ESP must be
mounted at //boot or //boot/efi and it must be VFAT! Aborting!
dpkg: error processing package refind (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up libdmraid1.0.0.rc16 (1.0.0.rc16-4.2ubuntu3) ...
Setting up kpartx (0.4.9-3ubuntu7) ...
Setting up kpartx-boot (0.4.9-3ubuntu7) ...
update-initramfs: deferring update (trigger activated)
Setting up dmraid (1.0.0.rc16-4.2ubuntu3) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-30-generic
Errors were encountered while processing:
 refind
E: Sub-process /usr/bin/dpkg returned an error code (1)
jim@jim-Inspiron-660s:~$
**
The problem still seems to be not finding ESP (EFI System Partition (ESP)). Admittedly I'm a tyro, don't know much about linux systems and am feeling my way as I go along, but as I'm able to start the computer and boot either Ubuntu or Windows 8, I would think the ESP partition is there but, for some reason, after loading, Ubuntu can't find it.

Addendum II:

I wonder if this is where my problem lies, When checking the error reports I notice they all say:
“The ESP doesn't seem to be mounted! Trying to find it....
// doesn't seem to be on a VFAT filesystem. The ESP must be
mounted at //boot or //boot/efi and it must be VFAT! Aborting! “

But when I ran from terminal fdisk -l (run is included above)I got
“ Device Boot Start End Blocks Id System
/dev/sda1 * 2048 718847 358400 7 HPFS/NTFS/exFAT “

which to me suggests perhaps the ESP is somewhere in exFAT and not accessible because it's not VFAT???

Question information

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

If you run:

dmraid

Do you get a command not found output?

Revision history for this message
Jim O'Neil (joneil) said :
#2

I get:
jim@jim-Inspiron-660s:~$ dmraid
The program 'dmraid' is currently not installed. You can install it by typing:
sudo apt-get install dmraid
jim@jim-Inspiron-660s:~$

So! I can get and install it, -but is it compatible with disks/partitions containing the new windows/microsoft boot security system and what's it gonna tell me?

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

I guess so. Your output mentioned that the command is missing. You can now add it. Might fix the issue. I use hardware RAID instead of this software RAID people like using. I find it faster and much easier to setup.

Revision history for this message
Jim O'Neil (joneil) said :
#4

RAID didn't seem to make any changes. ESP is still missing.

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

How I Interpret your output:

Installing rEFInd on Linux....
The ESP doesn't seem to be mounted! Trying to find it....
// doesn't seem to be on a VFAT filesystem. The ESP must be
mounted at //boot or //boot/efi and it must be VFAT! Aborting!

I am quite sure, that ESP in that context stands for "EFI system partition".
Are you sure that your system is set up to boot from such partition? According to https://help.ubuntu.com/community/UEFI it has to be formatted as FAT32, bit I do not see any FAT32 partition in your "fdisk -l" output.

In any case the ESP partition would have to be mounted as /boot/efi (or at /boot) which isn't the case on your system.

If you temporarily mount /dev/sda1, what are its contents?

Revision history for this message
Jim O'Neil (joneil) said :
#6

No I'm not sure that, now, it's set up to boot from that partition but it was originally before the problems started. None the less, looking at it with Gparted, it's the only partition listed as boot.

If I'm not booting from there, where could I be booting from?

Right, ESP is "EFI system partition"

I tried mounting it, Manfred, and couldn't get any information (using -l, etc.) . As you can probably can tell from my disjointed post, I'm not especially knowledgeable in Linux and am feeling my way along.
----
jim@jim-Inspiron-660s:~$ mount -t /dev/sda1
jim@jim-Inspiron-660s:~$ l /dev/sda1
/dev/sda1
jim@jim-Inspiron-660s:~$ cd /dev/sda1
bash: cd: /dev/sda1: Not a directory
jim@jim-Inspiron-660s:~$ cd sda1
bash: cd: sda1: No such file or directory
jim@jim-Inspiron-660s:~$ fdisk -l /dev/sda1
Cannot open /dev/sda1
-----

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

It seems that I was not clear enough with my previous comment.

Try the following:

sudo mkdir -p /media/tempdisk
sudo mount -r /dev/sda1 /media/tempdisk
sudo ls -l /media/tempdisk
sudo umount /media/tempdisk
sudo rmdir /media/testdisk

and copy/paste all output as done before.

Revision history for this message
Jim O'Neil (joneil) said :
#8

OK Manfred I did the terminal run:
____
jim@jim-Inspiron-660s:~$ sudo mkdir -p /media/tempdisk
[sudo] password for jim:
jim@jim-Inspiron-660s:~$ sudo mount -r /dev/sda1 /media/tempdisk
jim@jim-Inspiron-660s:~$ sudo ls -l /media/tempdisk
total 409
drwxrwxrwx 1 root root 8192 Jun 9 22:27 Boot
-rwxrwxrwx 1 root root 398156 Jul 25 2012 bootmgr
-rwxrwxrwx 1 root root 1 Jun 2 2012 BOOTNXT
-rwxrwxrwx 1 root root 8192 Jan 25 14:16 BOOTSECT.BAK
drwxrwxrwx 1 root root 0 Jan 23 21:02 System Volume Information
jim@jim-Inspiron-660s:~$ sudo umount /media/tempdisk
jim@jim-Inspiron-660s:~$ sudo rmdir /media/testdisk
rmdir: failed to remove ‘/media/testdisk’: No such file or directory
jim@jim-Inspiron-660s:~$ sudo rmdir /media/tempdisk
jim@jim-Inspiron-660s:~$
_____

..and your; "It seems that I was not clear enough with my previous comment." You were quite clear you just mistakenly assumed I knew and understood what I'm doing. ;-)

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

You did well, even being able to correct my error (naming the "tempdisk" directory falsely "testdisk" in one of my commands.)

It seems to me that /dev/sda1 is the normal Windows system partition, and not an EFI system partition.

Just another test to verify whether you have EFI on your system or not: open a terminal and provide the output of the commands

ls -l /sys/firmware/efi
dmesg | grep -i EFI

and copy/paste the output.

My assumption is that you do not have your system configured for EFI booting, and so the attempt to install rEFInd fails. I expect that purging the half-installed refind package from your system will bring the package management system back to normal operations. But before you try anything, please provide the requested output.

Revision history for this message
Jim O'Neil (joneil) said :
#10

OK here it is:
___
jim@jim-Inspiron-660s:~$ ls -l /sys/firmware/efi
ls: cannot access /sys/firmware/efi: No such file or directory
jim@jim-Inspiron-660s:~$ dmesg | grep -i EFI
[ 1.413546] tsc: Refined TSC clocksource calibration: 3393.394 MHz
jim@jim-Inspiron-660s:~$ exit

______

& if we go from here to : " purging the half-installed refind package", you'll talk me through it?

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

No traces of EFI.

Try the commands

sudo dpkg --purge refind
sudo dpkg --configure -a
sudo dpkg --audit
sudo apt-get update
sudo apt-get upgrade

and copy/paste all output as done before.

Revision history for this message
Jim O'Neil (joneil) said :
#12

Great big thanks, Manfred! O Frabjous Day! Callooh! Callay!" That corrected the problem!
After the update & upgrade, to test everything, I installed/uninstalled a small game from the software center and received no error messages. I did a restart in Windows 8 and then another restart in Ubuntu, just to be sure I had not inadvertently created any problems there, and then another small game install/uninstall and everything appears to be working as designed.

BYW: I did sensibly backup my data on an external disk before starting the sudo runs, just in case.

Thanks again!!!

Revision history for this message
Jim O'Neil (joneil) said :
#13

Thanks Manfred Hampl, that solved my question.