I've just encountered this with 16.04 whilst developing a bash script
that cross-builds (on amd64) a complete custom armhf RasPi 2/3
installation image.

It triggered when linux-image packages were being unpacked by 'dpkg' to
the chroot target /boot/ directory.

The amd64 system has qemu-user-static and binfmt-support installed so
that commands can be executed in the armhf target chroot.

The command:

$ sudo chroot /mnt/raspi dpkg -i 
/var/local/cache/apt/archives/linux-image-4.5.0-v7+_4.5.0-v7+-2_armhf.deb
(Reading database ... 30501 files and directories currently installed.)
Preparing to unpack .../linux-image-4.5.0-v7+_4.5.0-v7+-2_armhf.deb ...
Unpacking linux-image-4.5.0-v7+ (4.5.0-v7+-2) over (4.5.0-v7+-2) ...
dpkg: error processing archive 
/var/local/cache/apt/archives/linux-image-4.5.0-v7+_4.5.0-v7+-2_armhf.deb 
(--install):
 unable to make backup link of './boot/config-4.5.0-v7+' before installing new 
version: Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/local/cache/apt/archives/linux-image-4.5.0-v7+_4.5.0-v7+-2_armhf.deb

and strace reveals:

13605 utimes("/boot/config-4.5.0-v7+.dpkg-new", {{1462489111, 0}, {1458064430, 
0}}) = 0
13605 link("/boot/config-4.5.0-v7+", "/boot/config-4.5.0-v7+.dpkg-tmp") = -1 
EPERM (Operation not permitted)

RasPi images require the boot file-system to be VFAT:

$ mount | grep /mnt/raspi/boot
/dev/mapper/VG_DATA-raspi1 on /mnt/raspi/boot type vfat 
(rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

$ sudo blkid /dev/mapper/VG_DATA-raspi1
/dev/mapper/VG_DATA-raspi1: SEC_TYPE="msdos" LABEL="RASPI_4084" 
UUID="C5B8-3907" TYPE="vfat" PARTLABEL="primary" 
PARTUUID="009a2020-4eec-451a-9bb7-b18241729fd1"

As far as I recall it isn't possible to hard link on VFAT.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/559127

Title:
  various packages failed to install/upgrade: ErrorMessage: unable to
  make backup link of <some file> before installing new version:
  Input/output error

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/559127/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to