Results 1 to 7 of 7

Thread: Problems upgrading from Kali 2021.3 to 2021.4 on Raspberry Pi (Pi4 4GB)

  1. #1
    Join Date
    2019-Dec
    Posts
    8

    Problems upgrading from Kali 2021.3 to 2021.4 on Raspberry Pi (Pi4 4GB)

    Hello,

    Yesterday I decided to do an upgrade of my Raspberry Pi Kali install which has been unsuccessful several times now.

    I followed the Official Kali documentation to perform the upgrade.

    It looks like the main issue revolves around upgrading to the new kernel version.

    This is what it looks like as the upgrade is happening

    Code:
    Unpacking kalipi-kernel (5.4.83-20211204) over (5.4.83-20210516) ...
    dpkg: error processing archive /var/cache/apt/archives/kalipi-kernel_5.4.83-20211204_arm64.deb (--unpack):
     unable to make backup link of './boot/overlays/dwc2.dtbo' before installing new version: Operation not permitted
    This is what the end results of the upgrade say

    Code:
    Errors were encountered while processing:
     /var/cache/apt/archives/kalipi-kernel_5.4.83-20211204_arm64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Once done I run
    Code:
    uname -a
    on the Pi and get these results

    Code:
    Linux ninja-pi-1 5.4.83-Re4son-v8l+ #1 SMP PREEMPT Sat May 15 07:55:31 UTC 2021 aarch64 GNU/Linux
    I also downloaded a brand new Kali Raspberry Pi image from Kali and imaged it to another MicroSD card and booted it up and got the results below. The results are the same as above so it looks like the upgrade might have been successful

    Code:
    Linux kali-rpi 5.4.83-Re4son-v8l+ #4 SMP PREEMPT Debian kali-pi (2021-11-05) aarch64
    but it is still erroring any time that I run
    Code:
    sudo apt update && sudo apt upgrade -y
    ADDING: When I run
    Code:
    lsb_release -a
    I get these results back

    Code:
    └─$ lsb_release -aNo LSB modules are available.
    Distributor ID:    Kali
    Description:    Kali GNU/Linux Rolling
    Release:    2021.4
    Codename:    kali-rolling
    These are some of the errors that I am still seeing whenever I run an update / upgrade command.

    Code:
    Leaving 'diversion of /boot/overlays/vc4-kms-v3d.dtbo to /usr/share/rpikernelhack/overlays/vc4-kms-v3d.dtbo by rpikernelhack'Leaving 'diversion of /boot/overlays/vga666.dtbo to /usr/share/rpikernelhack/overlays/vga666.dtbo by rpikernelhack'
    Leaving 'diversion of /boot/overlays/w1-gpio-pullup.dtbo to /usr/share/rpikernelhack/overlays/w1-gpio-pullup.dtbo by rpikernelhack'
    Leaving 'diversion of /boot/overlays/w1-gpio.dtbo to /usr/share/rpikernelhack/overlays/w1-gpio.dtbo by rpikernelhack'
    Leaving 'diversion of /boot/overlays/w5500.dtbo to /usr/share/rpikernelhack/overlays/w5500.dtbo by rpikernelhack'
    Leaving 'diversion of /boot/overlays/waveshare32b-overlay.dtb to /usr/share/rpikernelhack/overlays/waveshare32b-overlay.dtb by rpikernelhack'
    Leaving 'diversion of /boot/overlays/waveshare32b.dtbo to /usr/share/rpikernelhack/overlays/waveshare32b.dtbo by rpikernelhack'
    Leaving 'diversion of /boot/overlays/waveshare35a-overlay.dtb to /usr/share/rpikernelhack/overlays/waveshare35a-overlay.dtb by rpikernelhack'
    Leaving 'diversion of /boot/overlays/waveshare35a.dtbo to /usr/share/rpikernelhack/overlays/waveshare35a.dtbo by rpikernelhack'
    Leaving 'diversion of /boot/overlays/waveshare35b-overlay.dtb to /usr/share/rpikernelhack/overlays/waveshare35b-overlay.dtb by rpikernelhack'
    Leaving 'diversion of /boot/overlays/waveshare35b.dtbo to /usr/share/rpikernelhack/overlays/waveshare35b.dtbo by rpikernelhack'
    Leaving 'diversion of /boot/overlays/wittypi.dtbo to /usr/share/rpikernelhack/overlays/wittypi.dtbo by rpikernelhack'
    Leaving 'diversion of /boot/overlays/wm8960-soundcard.dtbo to /usr/share/rpikernelhack/overlays/wm8960-soundcard.dtbo by rpikernelhack'
    Unpacking kalipi-kernel (5.4.83-20211204) over (5.4.83-20210516) ...
    dpkg: error processing archive /var/cache/apt/archives/kalipi-kernel_5.4.83-20211204_arm64.deb (--unpack):
     unable to make backup link of './boot/overlays/dwc2.dtbo' before installing new version: Operation not permitted
    dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.4.83-Re4son+ /boot/kernel.img
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.4.83-Re4son-v7+ /boot/kernel7.img
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.4.83-Re4son-v7l+ /boot/kernel7l.img
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.4.83-Re4son-v8+ /boot/kernel8-alt.img
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.4.83-Re4son-v8l+ /boot/kernel8l-alt.img
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.4.83-Re4son+ /boot/kernel.img
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.4.83-Re4son+ /boot/kernel.img
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.4.83-Re4son+ /boot/kernel.img
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.4.83-Re4son-v7+ /boot/kernel7.img
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.4.83-Re4son-v7+ /boot/kernel7.img
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.4.83-Re4son-v7+ /boot/kernel7.img
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.4.83-Re4son-v7l+ /boot/kernel7l.img
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.4.83-Re4son-v7l+ /boot/kernel7l.img
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.4.83-Re4son-v7l+ /boot/kernel7l.img
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.4.83-Re4son-v8+ /boot/kernel8-alt.img
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.4.83-Re4son-v8+ /boot/kernel8-alt.img
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.4.83-Re4son-v8+ /boot/kernel8-alt.img
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.4.83-Re4son-v8l+ /boot/kernel8l-alt.img
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.4.83-Re4son-v8l+ /boot/kernel8l-alt.img
    run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.4.83-Re4son-v8l+ /boot/kernel8l-alt.img
    Errors were encountered while processing:
     /var/cache/apt/archives/kalipi-kernel_5.4.83-20211204_arm64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    As it stands now this is what it looks like when I try and run an update / upgrade

    Code:
    ┌──(root��ninja-pi-1)-[/home/rstrom]└─# apt-get autoclean && apt-get autoremove && apt-get update
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
    7 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_TERMINAL = "iTerm2",
        LANG = "en_US.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    Setting up powershell-empire (4.2.0-0kali2) ...
    Traceback (most recent call last):
      File "/usr/share/powershell-empire/empire.py", line 11, in <module>
        import empire.server.server as server
      File "/usr/share/powershell-empire/empire/server/server.py", line 24, in <module>
        import socketio
      File "/usr/lib/python3/dist-packages/socketio/__init__.py", line 3, in <module>
        from .client import Client
      File "/usr/lib/python3/dist-packages/socketio/client.py", line 7, in <module>
        import engineio
      File "/usr/lib/python3/dist-packages/engineio/__init__.py", line 8, in <module>
        from .asyncio_client import AsyncClient
      File "/usr/lib/python3/dist-packages/engineio/asyncio_client.py", line 7, in <module>
        import aiohttp
      File "/usr/lib/python3/dist-packages/aiohttp/__init__.py", line 6, in <module>
        from .client import (
      File "/usr/lib/python3/dist-packages/aiohttp/client.py", line 35, in <module>
        from . import hdrs, http, payload
      File "/usr/lib/python3/dist-packages/aiohttp/http.py", line 7, in <module>
        from .http_parser import (
      File "/usr/lib/python3/dist-packages/aiohttp/http_parser.py", line 15, in <module>
        from .helpers import NO_EXTENSIONS, BaseTimerContext
      File "/usr/lib/python3/dist-packages/aiohttp/helpers.py", line 667, in <module>
        class CeilTimeout(async_timeout.timeout):
    TypeError: function() argument 'code' must be code, not str
    dpkg: error processing package powershell-empire (--configure):
     installed powershell-empire package post-installation script subprocess returned error exit status 1
    Setting up libradare2-common (5.5.0+dfsg-1) ...
    dpkg: dependency problems prevent configuration of kali-linux-headless:
     kali-linux-headless depends on powershell-empire; however:
      Package powershell-empire is not configured yet.
    
    
    dpkg: error processing package kali-linux-headless (--configure):
     dependency problems - leaving unconfigured
    Setting up libradare2-5.0.0:arm64 (5.5.0+dfsg-1) ...
    Setting up radare2 (5.5.0+dfsg-1) ...
    Setting up libradare2-dev (5.5.0+dfsg-1) ...
    dpkg: dependency problems prevent configuration of kali-linux-default:
     kali-linux-default depends on kali-linux-headless; however:
      Package kali-linux-headless is not configured yet.
    
    
    dpkg: error processing package kali-linux-default (--configure):
     dependency problems - leaving unconfigured
    Processing triggers for man-db (2.9.4-2) ...
    Processing triggers for kali-menu (2021.4.2) ...
    Processing triggers for libc-bin (2.33-1) ...
    Errors were encountered while processing:
     powershell-empire
     kali-linux-headless
     kali-linux-default
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    ┌──(root��ninja-pi-1)-[/home/rstrom]
    └─#



    Anyone out there know what is going on and how to fix this issue?

    Thanks,

    Robert
    Attached Images Attached Images
    Last edited by roberts; 2021-12-23 at 21:04.

  2. #2
    Join Date
    2021-Dec
    Posts
    1
    Hello Robert,I had the same problem. The reason for this is apparently if you skip the previous version of the kalipi-kernel. I was able to solve it by myselfapt install kalipi-kernel = 5.4.83-20211127carried out. After thatrebootand then with apt install kalipi-kernel on the last version.You can check the available versions e.g. withapt list --upgradable -adisplay.After that I had a problem with the powershell-empire package. I had to remove this with Purge, reboot and reinstall it.Greetings Rainer

  3. #3
    Join Date
    2019-Dec
    Posts
    8
    Don't know what it was / is. Don't know if this was just a problem that I experienced or if others have had the same issue.

    I decided not to futz with it any more and just started from scratch with a new install of the Kali ARM for Raspberry Pi install (2021.4) and then made my modifications from there to get back to basically the same state that my previous install was in.

    Hopefully the Offensive Security Kali folks will look at this to see if it is an issue beyond just me.

  4. #4
    So interesting enough... I just bought a Pi 4 on which I have installed the Kali imaged (obtained from Kali website). When I run: sudo apt update && sudo apt upgrade -y, I get the same errors as you. I've been reading into it and I believe it's because the version of kali we are putting on the Pi doesn't allow certain behavior. Specifically, I am trying to install a wireguard client so that I can connect to my wireguard server. I've found it impossible to install the required packages.

  5. #5
    I'm seeing the same on my system. I'm upgrading from an older distribution ... kernel version is "Linux kali 4.19.93-Re4son-v8+ #1 SMP PREEMPT", but the rest of the behavior is the same. I had to update the gpg key to get the re4son repo to work with apt before I got to this point, but otherwise my experience is the same.

  6. #6
    I had the same issue, I resolved it by renaming:
    /boot/overlays/ directory to overlaysbackup.

    Cheers

  7. #7
    Join Date
    2022-Mar
    Posts
    1
    Hi confirm this has worked also for me!

    Quote Originally Posted by DradisAdjucator View Post
    I had the same issue, I resolved it by renaming:
    /boot/overlays/ directory to overlaysbackup.

    Cheers

Similar Threads

  1. Kali 2021.2 on VBox 6.1.32 continues to have feeze problems
    By JohnnyKali in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2022-04-19, 13:58
  2. Replies: 0
    Last Post: 2021-04-28, 03:18
  3. Replies: 0
    Last Post: 2021-04-18, 21:49
  4. Kali 2021 not updating.
    By Agusdrink7 in forum TroubleShooting Archive
    Replies: 0
    Last Post: 2021-03-10, 23:59
  5. Problems on updating to Kali Linux 2021.1
    By pmlopes in forum Installing Archive
    Replies: 0
    Last Post: 2021-03-01, 11:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •