kernel update fails with /boot on FAT32

Bug #1318951 reported by Max Bruckner
54
This bug affects 11 people
Affects Status Importance Assigned to Milestone
dpkg (Debian)
New
Undecided
Unassigned
dpkg (Ubuntu)
New
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Medium
Unassigned
linux-base (Debian)
New
Undecided
Unassigned
linux-base (Ubuntu)
New
Undecided
Unassigned

Bug Description

My latest system upgrade failed because it can't upgrade the kernel:

  $sudo env LANGUAGE=en_US apt-get upgrade
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  You might want to run 'apt-get -f install' to correct these.
  The following packages have unmet dependencies:
   linux-signed-image-3.13.0-24-generic : Depends: linux-image-3.13.0-24-generic (= 3.13.0-24.47) but 3.13.0-24.46 is installed
  E: Unmet dependencies. Try using -f.

When trying to install linux-image-3.13.0-24-generic manually it fails because it can't create a backup link for the old kernel. This really doesn't surprise me, because /boot is on a fat32 filesystem ( EFI System Partition ) so it shouldn't be possible to create any links at all.

My fstab entries for boot are as follows:
  UUID=0E1E-3E58 /mnt/efi vfat defaults 0 2
  /mnt/efi/ubuntu /boot none bind 0 0

Here is the output of me trying to install the kernel manually:

  $sudo env LANGUAGE=en_US apt-get install linux-image-3.13.0-24-generic
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following packages were automatically installed and are no longer required:
    efibootmgr secureboot-db shim
  Use 'apt-get autoremove' to remove them.
  Suggested packages:
    fdutils linux-doc-3.13.0 linux-source-3.13.0 linux-tools
  Recommended packages:
    grub-pc grub-efi-amd64 grub-efi-ia32 grub lilo
  The following packages will be upgraded:
    linux-image-3.13.0-24-generic
  1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  114 not fully installed or removed.
  Need to get 0 B/15,0 MB of archives.
  After this operation, 1.024 B disk space will be freed.
  (Reading database ... 205799 files and directories currently installed.)
  Preparing to unpack .../linux-image-3.13.0-24-generic_3.13.0-24.47_amd64.deb ...
  Done.
  Unpacking linux-image-3.13.0-24-generic (3.13.0-24.47) over (3.13.0-24.46) ...
  dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-24-generic_3.13.0-24.47_amd64.deb (--unpack):
  unable to make backup link of `./boot/vmlinuz-3.13.0-24-generic' before installing new version: Operation not permitted
  dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
  Examining /etc/kernel/postrm.d .
  run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
  run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
  Errors were encountered while processing:
   /var/cache/apt/archives/linux-image-3.13.0-24-generic_3.13.0-24.47_amd64.deb
  E : Sub-process /usr/bin/dpkg returned an error code (1)

Max Bruckner (fsmaxb)
description: updated
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1318951

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: trusty
Revision history for this message
Max Bruckner (fsmaxb) wrote : Re: kernel update to 3.13.0-24.47 fails

I am not able to run apport-collect because I can't install python-apport:

$sudo env LANGUAGE=en_US apt-get install python-apport
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 linux-signed-image-3.13.0-24-generic : Depends: linux-image-3.13.0-24-generic (= 3.13.0-24.47) but 3.13.0-24.46 is to be installed
 python-apport : Depends: python-problem-report (>= 0.94) but it is not going to be installed
                 Depends: python-launchpadlib (>= 1.5.7) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can you try the following:

sudo apt-get install -f
sudo apt-get clean
sudo apt-get update

Then re-install the package.

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: bot-stop-nagging kernel-da-key
Revision history for this message
Max Bruckner (fsmaxb) wrote :
Download full text (3.9 KiB)

I did so, now inside a chroot because the network drivers don't work anymore. apt-get update works as expected, the output of the other commands below:

# env LANGUAGE=en_US apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  efibootmgr secureboot-db shim
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  linux-image-3.13.0-24-generic
Suggested packages:
  fdutils linux-doc-3.13.0 linux-source-3.13.0 linux-tools
Recommended packages:
  grub-pc grub-efi-amd64 grub-efi-ia32 grub lilo
The following packages will be upgraded:
  linux-image-3.13.0-24-generic
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
118 not fully installed or removed.
Need to get 0 B/15,0 MB of archives.
After this operation, 1.024 B disk space will be freed.
Do you want to continue? [J/n]
(Reading database ... 205799 files and directories currently installed.)
Preparing to unpack .../linux-image-3.13.0-24-generic_3.13.0-24.47_amd64.deb ...
Done.
Unpacking linux-image-3.13.0-24-generic (3.13.0-24.47) over (3.13.0-24.46) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-24-generic_3.13.0-24.47_amd64.deb (--unpack):
 unable to make backup link of `./boot/vmlinuz-3.13.0-24-generic' before installing new version: Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.13.0-24-generic_3.13.0-24.47_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

# env LANGUAGE=en_US apt-get clean
#

# env LANGUAGE=en_US apt-get -f upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  efibootmgr secureboot-db shim
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
  linux-image-3.13.0-24-generic
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
118 not fully installed or removed.
Need to get 15,0 MB of archives.
After this operation, 1.024 B disk space will be freed.
Do you want to continue? [J/n]
Get:1 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/main linux-image-3.13.0-24-generic amd64 3.13.0-24.47 [15,0 MB]
Fetched 15,0 MB in 22s (665 kB/s)
(Reading database ... 205799 files and directories currently installed.)
Preparing to unpack .../linux-image-3.13.0-24-generic_3.13.0-24.47_amd64.deb ...
Done.
Unpacking linux-image-3.13.0-24-generic (3.13.0-2...

Read more...

Revision history for this message
Max Bruckner (fsmaxb) wrote :

I was able to make the package Install by removing the following files:

* /boot/config-3.13.0-24-generic
* /boot/System.map-3.13.0-24-generic
* /boot/vmlinuz-3.13.0-24-generic
* /boot/abi-3.13.0-24-generic

And then apt-get upgrade -f

This way the package doesn't try to backup the files and the installation works fine. But this is only a workaround, not a fix. However I can't provide any further information about this bug because after having installed the new kernel, the initramfs doesn't seem to setup my encrypted root filesystem anymore and the boot fails, so I decided to give up and install Ubuntu again from scratch ( or not at all as I was just testing it out. A selfdestroying LTS release isn't exactly something that I need ).

Revision history for this message
Alfredo Todini (alfredo-todini) wrote :

I am also experiencing this bug. But I am using Ubuntu 12.04 LTS. I also have /boot on a FAT32 partition.
This is the output:

alfredo@alfredo-CQ2903EG:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  linux-image-3.2.0-61-generic
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
12 not fully installed or removed.
Need to get 0 B/38.7 MB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]? Y
(Reading database ... 541444 files and directories currently installed.)
Preparing to replace linux-image-3.2.0-61-generic 3.2.0-61.92 (using .../linux-image-3.2.0-61-generic_3.2.0-61.93_amd64.deb) ...
Done.
Unpacking replacement linux-image-3.2.0-61-generic ...
dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-61-generic_3.2.0-61.93_amd64.deb (--unpack):
 unable to make backup link of `./boot/System.map-3.2.0-61-generic' before installing new version: Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-61-generic /boot/vmlinuz-3.2.0-61-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-61-generic /boot/vmlinuz-3.2.0-61-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.2.0-61-generic_3.2.0-61.93_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Manfred Hampl (m-hampl) wrote :

Potential workaround that seems to have worked for an 3.2.0-61.92 to 3.2.0-61.93 upgrade on precide with /boot on a FAT32 partition:

Boot into a previous kernel version, uninstall the -61.92 kernel, and install -61.93 kernel from scratch.

Boot into the -60 kernel and issue the following commands:
sudo dpkg --purge linux-image-3.2.0-61-generic
sudo apt-get install linux-image-3.2.0-61-generic
sudo apt-get upgrade

see https://answers.launchpad.net/ubuntu/+question/248740

Max Bruckner (fsmaxb)
summary: - kernel update to 3.13.0-24.47 fails
+ kernel update fails with /boot on FAT32
Revision history for this message
Max Bruckner (fsmaxb) wrote :

Am I understanding it correctly that the package script is trying to create a symlink ( I am not that familiar with how Debian packages work, so I haven't looked at it myself )? If this is the case, wouldn't it be possible to fix this bug by not creating links on filesystems that don't support them?

Revision history for this message
giacof (giacof) wrote :

I had the same issue with kernel 3.13.0-40.69.
I could successfully update the kernel by editing the configuration file /etc/kernel-img.conf as follows:

do_symlinks = no

Revision history for this message
wensveen (wensveen) wrote :

Could this be a duplicate of #559127?

Revision history for this message
Max Bruckner (fsmaxb) wrote :

@wensveen I don't think so. I'm pretty sure that the other bug isn't caused by a filesystem that doesn't support links

Revision history for this message
bademux (bademux) wrote :

the same with linux-image-4.4.0-22-generic
I'm happy with efi boot and I don't need grub.

Revision history for this message
bademux (bademux) wrote :

Ubuntu 16.04

Unpacking linux-image-4.4.0-22-generic (4.4.0-22.40) over (4.4.0-22.39) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-22-generic_4.4.0-22.40_amd64.deb (--unpack):
 unable to make backup link of './boot/System.map-4.4.0-22-generic' before installing new version: Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-22-generic /boot/vmlinuz-4.4.0-22-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-4.4.0-22-generic_4.4.0-22.40_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Dark Dragon (darkdragon-001) wrote :

Any news here?

After I dumped grub in order to use systemd-boot, I would like to mount my EFI partition (FAT32) on /boot directly but continue to update my kernels using apt.

Revision history for this message
Lynoure Braakman (lynoure) wrote :

This still happens with a 18.04 LTS to 20.04 LTS upgrade!

It's really surprising that a years old bug affecting a long term support version is not yet handled or assigned. Needing to install from scratch instead of having the LTS upgrade work means lost time and significant loss of trust. Note, the workaround with /etc/kernel-img.conf is not possible any more.

Revision history for this message
Patrick Pleneficsh (byteit101) wrote :

I just ran into this on a 18.04 LTS to 20.04 LTS upgrade

Note that I was actually able to use the /etc/kernel-img.conf workaround with two properties:

do_symlinks = No
no_symlinks = Yes

Revision history for this message
Hunter Miller (dougdimmadome) wrote (last edit ):

Verified this is still happening installing linux-image-generic_5.15.0.56.54_amd64.deb. /etc/kernel-img.conf workaround still does not work and computer is placed in the grub command line after reboot.

Revision history for this message
Ward Nakchbandi (cosmohq) wrote :

This problem has 2 parts linux base and dpkg

for dpkg this patch fixes it

Revision history for this message
Ward Nakchbandi (cosmohq) wrote (last edit ):

and for linux-base

i moved /usr/bin/linux-update-symlinks to /usr/bin/linux-base-update-symlinks
and put

#! /bin/bash

set -e

BOOT_FS=$(df -P -h -T "/boot" | awk 'END{print $2}')

if [[ $BOOT_FS == vfat ]]
then
echo 'vfat does not support symlinks...'
echo 'doing nothing'
exit 0
else
/usr/bin/linux-base-update-symlinks "$@"
fi

in it's place

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.