No raspberry-kernel in /etc/apt/apt.conf.d/01autoremove-kernels

Bug #1722547 reported by Oleg Davydov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

Upgrading package raspberry-kernel removes kernel modules, leading to corrupted (before next reboot) system.

Steps to reproduce:

1) Boot raspberry with old kernel. For me, it was raspberrypi-kernel 1.20170303-1
2) Upgrade raspberrypi-kernel package (I upgraded to 1.20170703-1).
3) Try to load some module. For me it was dm-mod, needed to work with luks-encrypted storage
$ modprobe dm_mod
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.50-v7+/modules.dep.bin'

Workaround:
Just reboot system with new kernel.

Desired solution:
Add raspberrypi-kernel into /etc/apt/apt.conf.d/01autoremove-kernels like debian does with its kernels.
File /etc/apt/apt.conf.d/01autoremove-kernels is generated by /etc/kernel/postinst.d/apt-auto-removal (package apt). In my version (apt 1.0.9.8.4), it's line 44 of script
list="$(${DPKG} -l | awk '/^ii[ ]+(linux|kfreebsd|gnumach)-image-[0-9]+\./ && $2 !~ /-dbg$/ { print $2 }' | sed -e 's#\(linux\|kfreebsd\|gnumach\)-image-##')"

Seems that adding raspberry-kernel to theese two regexps may fix the problem.

Revision history for this message
Oleg Davydov (burunduk3) wrote :

May be problem is more complex because it's impossible to keep simultaneously installed different versions of raspberry-kernel.

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

Other bug subscribers

Remote bug watches

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