unable to make backup link of <some-file> before installing new version: Operation not permitted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dpkg (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I accidentally reported this against bug 559127 via a duplicate but then realised that bug is specific to "Input/Output Error" so I'm reposting here.
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/
(Reading database ... 30501 files and directories currently installed.)
Preparing to unpack .../linux-
Unpacking linux-image-
dpkg: error processing archive /var/local/
unable to make backup link of './boot/
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/local/
and strace reveals:
13605 utimes(
13605 link("/
Additional debug info using dpkg -D7777 ...
...
D000100: setupvnamevbs main='/boot' tmp='/boot.
D000100: tarobject already exists
D000100: tarobject directory exists
D000010: tarobject ti->name=
e>'
D000100: setupvnamevbs main='/
D000100: tarobject already exists
D000010: path_remove_tree '/boot/
D000010: path_remove_tree '/boot/
D000100: tarobject file open size=133889
D000100: tarobject file hash=2666c2e844
D000100: tarobject nondirectory, 'link' backup
dpkg: error processing archive /var/local/
unable to make backup link of './boot/
D000010: cu_installnew '/boot/
D000100: setupvnamevbs main='/
D000100: cu_installnew not restoring
D000100: secure_remove '/boot/
...
RasPi images require the boot file-system to be VFAT:
$ mount | grep /mnt/raspi/boot
/dev/mapper/
$ sudo blkid /dev/mapper/
/dev/mapper/
As far as I recall it isn't possible to hard link on VFAT.
Status changed to 'Confirmed' because the bug affects multiple users.