Kali template missing repositories

Hello.
I just downloaded kali-core version 4.2.0-202411221432 from qubes-templates-community-testing repository, then tried to install kali desktop metapackage using sudo apt install kali-linux-default but it failed saying “can not locate package kali-linux-default”
Then I checked my /etc/apt/sources.list:

deb https://deb.debian.org/debian bookworm main contrib non-free-firmware
#deb-src https://deb.debian.org/debian bookworm main contrib non-free-firmware

deb https://deb.debian.org/debian-security bookworm-security main contrib non-free-firmware
#deb-src https://deb.debian.org/debian-security bookworm-security main contrib non-free-firmware

deb https://deb.debian.org/debian bookworm-backports main contrib non-free-firmware

#deb-src https://deb.debian.org/debian bookworm-backports main contrib non-free-firmware

So it turns out kali repos were missing, I added kali-rolling repository manually, but installation of kali-linux-default still failed later on with the following error:

dpkg: warning: while removing qubes-core-agent, unable to remove directory '/rw': Device or resource busy - directory may be a mount point?
Failed to disable unit: Unknown method DisableUnitFilesWithFlagsAndInstallInfo or interface org.freedesktop.systemd1.Manager.
dpkg: error processing package qubes-core-agent (--remove):
 installed qubes-core-agent package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 qubes-core-agent
Processing was halted because there were too many errors.
sh: 1: /usr/lib/qubes/upgrades-status-notify: not found
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any tips on how to proceed here

I have the same issue, did you fix it?

My solution was to install an older kali template then update.

Amazing, thank you. I try the trixie fix with the standard template and did not work. I will try your solution and let you know, thanks again.

@fiddler the trixie fix consist in edit the sources.list file only or do I need to update any other file?

I applied the trixie fix to

/etc/apt/sources.list

and

/etc/apt/sources.list.d/qubes-r4.list

Thank you for your answer, is this how you put it?
sources.list:

deb Index of /debian trixie main contrib non-free-firmware
#deb-src Index of /debian bookworm main contrib non-free-firmware
deb Index of /debian-security trixie-security main contrib non-free-firmware
#deb-src Index of /debian-security bookworm-security main contrib non-free-firmware

and kali.list:

deb Index of / trixie main non-free contrib

Thanks again

my /etc/apt/sources.list looks like

deb https://deb.debian.org/debian trixie main contrib non-free-firmware
#deb-src https://deb.debian.org/debian bookworm main contrib non-free-firmware

deb https://deb.debian.org/debian-security trixie-security main contrib non-free-firmware
#deb-src https://deb.debian.org/debian-security bookworm-security main contrib non-free-firmware

and my /etc/apt/sources.list.d/qubes-r4.list looks like

# Main qubes updates repository
deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] https://deb.qubes-os.org/r4.2/vm trixie main
#deb-src [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] https://deb.qubes-os.org/r4.2/vm bookworm main

# Qubes updates candidates repository
#deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg] https://deb.qubes-os.org/r4.2/vm bookworm-testing main
#deb-src  [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ]  https://deb.qubes-os.org/r4.2/vm bookworm-testing main

# Qubes security updates testing repository
#deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg] https://deb.qubes-os.org/r4.2/vm bookworm-securitytesting main
#deb-src  [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] https://deb.qubes-os.org/r4.2/vm bookworm-securitytesting main

# Qubes experimental/unstable repository
#deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg] https://deb.qubes-os.org/r4.2/vm bookworm-unstable main
#deb-src  [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] https://deb.qubes-os.org/r4.2/vm bookworm-unstable main


# Qubes Tor updates repositories
# Main qubes updates repository
#deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg] tor+http://deb.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/r4.2/vm bookworm main
#deb-src  [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] tor+http://deb.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/r4.2/vm bookworm main

# Qubes updates candidates repository
#deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg] tor+http://deb.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/r4.2/vm bookworm-testing main
#deb-src  [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] tor+http://deb.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/r4.2/vm bookworm-testing main

# Qubes security updates testing repository
#deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg] tor+http://deb.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/r4.2/vm bookworm-securitytesting main
#deb-src  [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] tor+http://deb.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/r4.2/vm bookworm-securitytesting main

# Qubes experimental/unstable repository
#deb [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg] tor+http://deb.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/r4.2/vm bookworm-unstable main
#deb-src  [arch=amd64 signed-by=/usr/share/keyrings/qubes-archive-keyring-4.2.gpg ] tor+http://deb.qubesosfasa4zl44o4tws22di6kepyzfeqv3tg4e3ztknltfxqrymdad.onion/r4.2/vm bookworm-unstable main

I did not change kali.list at all.

2 Likes

Thank you, this work perfectly.