-
-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux-image-5.10.0-8-amd64 upgrade fails on x86_64 Bullseye image #4788
Comments
Oh no, it is trying to create a link or symlink on upgrade it seems, which is not possible as it is a FAT partition. I haven't seen this before, so checking the latest changelog. |
Hi Michalng If I can do anything on my end to help let me know. Thank you |
I cannot find the part of the code which does this. Can you try the following: /var/lib/dpkg/info/linux-image-5.10.0-8-amd64.preinst configure
/var/lib/dpkg/info/linux-image-5.10.0-8-amd64.postinst configure It cannot be part of dpkg itself, else on RPi and Odroids it would fail the same way, which ship with a /boot FAT partition since ever. |
Okay would you like me to reboot or anything now? |
|
No please do not reboot at this stage. Okay it seems to be the It is a regular physical x86_64 machine? Can you try the following: echo 0 > /proc/sys/fs/protected_hardlinks
apt upgrade If it does not work, revert and work around the issue by removing this file: echo 1 > /proc/sys/fs/protected_hardlinks
rm /boot/System.map-5.10.0-8-amd64
apt upgrade Likely it is required for two other files (kernel config and kernel image) in |
Yes its a regular physical x86_64 machine
|
apt -f install
apt upgrade Due to the unconfigured new package APT navigated itself into a broken dependency situation. |
|
Yes as said, there are the other two files which fail the same way and hence need to be removed as well: rm -f /boot/{config,System.map,vmlinuz}-5.10.0-8-amd64
apt -f install
apt upgrade |
RESOLVED
|
Thank you |
Okay great so far. So it is I'll try to replicate this behaviour, as it strangely is not an issue on any other image with a One last thing before you reboot: dmesg -l emerg,alert,crit,err,warn |
|
The ACPI warnings seem to be common on some Intel boxes:
Not sure about the initial firmware bug, as |
Okay great....everything seems to be running smoothly. Thanks again...if you want me to do more testing etc. just let me know. |
Verified bug. I can replicate it with a little dummy package which contains an empty file in
Tested first on a Raspberry Pi image where the official one ships with FAT /boot partition where the bootloader ships packages below /boot. Hmm reinstalling it works fine, probably this is the reason for the rpikernelhack diversions back and forth 🤔. Same on Buster. It seems to be expected. Luckily for the kernel package this can be solved quite easily. |
This kernel install hook prevents the error in case of future kernel upgrades (without kernel version increment): mkdir -p /etc/kernel/preinst.d
cat << '_EOF_' > /etc/kernel/preinst.d/dietpi
#!/bin/sh -e
# Remove old kernel files if existing: https://github.com/MichaIng/DietPi/issues/4788
{
# Fail if the package name was not passed, which is done when being invoked by dpkg
if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ]
then
echo 'DPKG_MAINTSCRIPT_PACKAGE was not set, this script must be invoked by dpkg.'
exit 1
fi
# Loop through files in /boot, shipped by the package, and remove them, if existing
for file in $(dpkg -L "$DPKG_MAINTSCRIPT_PACKAGE" | grep '^/boot/')
do
[ ! -f "$file" ] || rm "$file"
done
}
_EOF_
chmod +x /etc/kernel/preinst.d/dietpi I will install it into our images. However, it is somehow a bumper for the idea to ship images with a Windows/macOS accessible boot partition, as it feels like an unclean workaround. The behaviour seems to be expected by dpkg and indeed Odroids and RPi kernel packages work around it as well, but it still feels like a bug to me, respectively I don't understand why it is better to have dpkg failing compared to letting it handle FAT partitions gracefully. If a backup is wanted, then there are other ways to achieve it when the filesystem does not support links. |
Added to PREP script: ee8ad81 And I decided to update pre-patches in |
I just asked about this matter on the Debian bug tracker: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995332 |
ADMIN EDIT
Solution
Details:
Linux DietPi 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux
apt-get -qq upgrade
Steps to reproduce:
Expected behaviour:
Actual behaviour:
Extra details:
Additional logs:
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
The text was updated successfully, but these errors were encountered: