Upgrading a neglected Kali Linux on a 2011 laptop (AMD E-450) without fear, and running Claude Code on a CPU without SSE4.2

Upgrading a neglected Kali Linux on a 2011 laptop (AMD E-450) without fear, and running Claude Code on a CPU without SSE4.2

🌐 Leer en español

We have a 2011 ASUS K73BY laptop: an AMD E-450 CPU (two “Bobcat” cores at 1.65 GHz), a Radeon HD 6470M, Atheros AR9285 Wi-Fi, Realtek Ethernet and, to its credit, 16 GB of RAM. It runs Kali Linux and had gone almost two years without an apt upgrade, out of fear that after upgrading the system wouldn’t boot or programs would stop running.

The fear had a real basis. Trying to install Claude Code with its official installer did this:

$ curl -fsSL https://claude.ai/install.sh | bash
Setting up Claude Code...
bash: line 227: Illegal instruction (core dumped)
Installation was killed before it could finish (exit code 132).

Step 1: find out what the CPU is missing

“Illegal instruction” (exit code 132, signal SIGILL) means the program used an instruction the processor doesn’t know. Check which extensions the CPU has:

grep -m1 "model name" /proc/cpuinfo
grep -m1 flags /proc/cpuinfo | tr ' ' '\n' | grep -E '^(sse4_1|sse4_2|avx|avx2|popcnt|ssse3|sse4a)$'

The E-450 has ssse3, sse4a, popcnt and abm, but no SSE4.1, SSE4.2 or AVX. In today’s x86-64 classification that is level v1: the 2003 x86-64 baseline plus a few AMD extras. Modern binaries built for x86-64-v2 (SSE4.2 and POPCNT) or v3 (AVX2) die on startup. That is what happens to Claude Code’s native executable, which is built with Bun.

Step 2: will Kali keep working after upgrading?

Yes. Debian, and Kali with it, still builds its amd64 packages for the x86-64 baseline (v1). apt full-upgrade won’t bring in binaries the E-450 can’t run. What doesn’t run are third-party binaries (Bun, AppImages, some “curl | bash” installers), and that doesn’t change whether you upgrade or not.

The hardware isn’t a worry either, because everything uses in-kernel drivers:

lspci -nnk | grep -A2 -E "VGA|Network|Ethernet|SATA"
Part Driver
Radeon HD 6470M (Seymour) radeon
Atheros AR9285 ath9k
Realtek RTL8111 r8169
SATA AHCI (SB7x0/SB8x0) ahci

The real risk wasn’t the CPU. It was two years of a rolling-release system: ~4,200 pending packages. On top of that, the system was already halfway there: libc6 was from 2026, but the desktop was from 2024.

Step 3: Claude Code on a CPU without SSE4.2

The npm package now ships the native binary too. We found the last release that was still pure JavaScript (cli.js) with a binary search over the published versions:

npm view @anthropic-ai/claude-code@2.1.112 bin   # { claude: 'cli.js' }
npm view @anthropic-ai/claude-code@2.1.113 bin   # { claude: 'bin/claude.exe' }

2.1.112 is the last JavaScript release. But with Kali’s Node 18 it fails:

TypeError: Object not disposable

That release uses Symbol.dispose, which needs Node 20 or newer. We installed Node 22 for the user only, without touching the system one. Node’s V8 does detect the CPU and works on the E-450:

cd ~/.local/lib
V=$(curl -fsSL https://nodejs.org/dist/latest-v22.x/SHASUMS256.txt | grep -o "node-v22[0-9.]*-linux-x64.tar.xz" | head -1)
curl -fsSLO https://nodejs.org/dist/latest-v22.x/$V
curl -fsSL https://nodejs.org/dist/latest-v22.x/SHASUMS256.txt | grep " $V\$" | sha256sum -c -
mkdir node22 && tar -xJf $V -C node22 --strip-components=1 && rm $V

Then Claude Code 2.1.112 in ~/.local/lib/claude-code, and a small script that starts it with that Node:

npm pack @anthropic-ai/claude-code@2.1.112
mkdir -p ~/.local/lib/claude-code ~/.local/bin
tar -xzf anthropic-ai-claude-code-2.1.112.tgz -C ~/.local/lib/claude-code --strip-components=1

cat > ~/.local/bin/claude <<'EOF'
#!/bin/sh
export DISABLE_AUTOUPDATER=1
exec "$HOME/.local/lib/node22/bin/node" "$HOME/.local/lib/claude-code/cli.js" "$@"
EOF
chmod +x ~/.local/bin/claude
claude --version     # 2.1.112 (Claude Code)

DISABLE_AUTOUPDATER=1 is essential. If Claude Code updates itself, it switches to the native binary and the “illegal instruction” comes back.

Gotcha: at first ~/.local/bin/claude was a symlink to cli.js. Writing the script over it with cat > made the shell follow the link and overwrite cli.js. We had to delete the link (rm) before creating the script and extract the package again. Always rm before writing over something that may be a link.

Step 4: back up before the upgrade

On rolling Kali the repository only has the newest version of each package. If something goes wrong, the 2024 versions can no longer be downloaded. That’s why you save them first. On this laptop /home lives on another disk (LUKS-encrypted) with plenty of space, so the backup went there. /home itself isn’t backed up because the upgrade doesn’t touch it.

The dpkg database (what is installed, and which version):

R=~/backup-preupgrade
mkdir -p $R/debs $R/dpkg-db $R/system $R/repack
dpkg-query -W -f='${Package}_${Version}_${Architecture}\n' | sed 's/:/%3a/' | sort > $R/installed-with-version.txt
dpkg --get-selections > $R/dpkg-selections.txt
apt-mark showmanual   > $R/apt-manual.txt
rsync -a /var/lib/dpkg/ $R/dpkg-db/

The .deb files in the apt cache that match the installed versions exactly. The cache had 2,639 .deb files; 2,598 were the installed versions (4.5 GB):

cd /var/cache/apt/archives
ls *.deb | sed 's/\.deb$//' | sort | comm -12 $R/installed-with-version.txt - | sed 's/$/.deb/' > $R/debs-copied.txt
rsync -a --files-from=$R/debs-copied.txt ./ $R/debs/

The system:

sudo tar -cpzf $R/system/etc.tar.gz       -C / etc
sudo tar -cpzf $R/system/usr-local.tar.gz -C / usr/local
sudo tar -cpzf $R/system/opt.tar.gz       -C / opt
sudo cp -a /boot/grub/grub.cfg $R/system/

Plus your own scripts that live outside any package. On this laptop that’s the one that opens the LUKS disk and mounts /home.

The critical packages that were not in the cache (lightdm, nfs-common, xserver-xorg-core, libc6, and the AMD, Atheros and Realtek firmware) are rebuilt from what’s installed with dpkg-repack. The new dpkg-repack requires Perl 5.40 and the laptop had 5.38. We downloaded it without installing it and adjusted one line:

apt-get download dpkg-repack && dpkg-deb -x dpkg-repack_*.deb x
sed -i 's/^use v5\.40;/use v5.36; use feature qw(try); no warnings qw(experimental::try);/' x/usr/bin/dpkg-repack
cd $R/repack
for p in lightdm nfs-common xserver-xorg-core libc6 firmware-amd-graphics firmware-atheros firmware-realtek firmware-misc-nonfree; do
  sudo perl ../x/usr/bin/dpkg-repack $p
done

The last lifeline is the old kernel. It isn’t removed until the new one is proven to boot, so you can always pick the previous one in GRUB.

Step 5: Kali’s new signing key

In April 2025 Kali changed the key it signs its repository with. On an old Kali, apt update fails until you install the new one:

sudo wget https://archive.kali.org/archive-keyring.gpg -O /usr/share/keyrings/kali-archive-keyring.gpg
gpg --show-keys /usr/share/keyrings/kali-archive-keyring.gpg    # rsa4096 2025-04-17 ... ED65462EC8D5E4C5
sudo apt update

Step 6: simulate, then upgrade inside tmux

First a simulation, which installs nothing. That’s where you check what will be removed:

sudo apt-get -s full-upgrade > $R/simulation.txt
grep -c ^Inst $R/simulation.txt
grep ^Remv $R/simulation.txt | awk '{print $2}'
grep ^Remv $R/simulation.txt | grep -E ' (cryptsetup|lightdm|nfs-common|xserver-xorg|firmware-|linux-image|grub)'

On the E-450 the simulation alone took over ten minutes. The result: 4,200 packages to upgrade, 1,508 new, 398 to remove and a 10.9 GB download. Almost everything being removed was expected: old libraries that change names, php8.1 → php8.4, mariadb-server-10.6 → 11.8, openjdk-17, policykit-1 → polkitd, and wireshark-qt, which is now wireshark.

But there was a trap: kali-linux-firmware and firmware-atheros were being removed too, and firmware-amd-graphics (the Radeon firmware) stayed at its 2022 version. apt-cache policy told the story:

$ apt-cache policy firmware-atheros
  Installed: 20221012-1+kali1
  Candidate: 20221012-1+kali1

The cause: since 2023, Debian and Kali moved firmware out of non-free into its own component, non-free-firmware. An old sources.list doesn’t include it, so apt can’t see the new firmware and prefers removing it to leaving dependencies broken. The fix is one word:

sudo sed -i 's#kali-rolling main contrib non-free$#kali-rolling main contrib non-free non-free-firmware#' /etc/apt/sources.list
sudo apt update
apt-cache policy firmware-atheros     # Candidate: 20260916-1

Always check this on an old Kali before upgrading. Without firmware, Wi-Fi or video acceleration can die on the next boot.

The second simulation came out clean: 4,218 to upgrade, 1,510 new, 396 to remove. Now the firmware gets upgraded (firmware-amd-graphics, -atheros, -realtek and -misc-nonfree go from 20221012 to 20260916), and so do the packages the boot depends on:

Package Before After
linux-image-amd64 6.10.9 7.2.15
cryptsetup 2.7.5 2.8.8
lightdm 1.32.0 1.33.1
nfs-common 2.6.2 3.1.1
xserver-xorg-core 21.1.4 21.1.25
lxde (this laptop’s desktop) 12 13.1

xserver-xorg-video-radeon has no newer version and stays as it is.

Then the real upgrade, inside tmux. That way, if the SSH connection drops, the upgrade keeps going, and anyone can peek in with tmux attach -t upgrade (to leave without stopping it: Ctrl+b, then d). We used a small script: download first, then install. It logs everything and never stops to ask. When a config file has been modified, it keeps yours (--force-confold):

cat > upgrade.sh <<'EOF'
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none NEEDRESTART_MODE=a
OPTS="-y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold"
{
echo "=== START $(date)"
sudo -E apt-get $OPTS -d full-upgrade && echo "=== DOWNLOAD OK $(date)"
sudo -E apt-get $OPTS full-upgrade    && echo "=== INSTALL OK $(date)"
echo "=== END $(date)"
} 2>&1 | tee -a upgrade.log
exec bash
EOF
chmod +x upgrade.sh
tmux new-session -d -s upgrade ./upgrade.sh

On a laptop, also make sure it doesn’t suspend halfway (or when you close the lid) until the log says === END:

sudo systemd-run --unit=upgrade-no-suspend systemd-inhibit --what=sleep:idle:handle-lid-switch \
  --why="apt full-upgrade" sh -c "until grep -q '=== END' $HOME/upgrade.log; do sleep 30; done"

This runs as root, which brings two details. It watches the log rather than the tmux session, because root can’t see the user’s session: with tmux has-session, the inhibitor would end instantly and protect nothing. And the double quotes are on purpose: $HOME expands to your folder before it reaches root; with ~, inside root it would point to /root.

The download: 10.9 GB in 27 minutes over Wi-Fi.

Gotcha 1: SSH stops accepting connections halfway

Partway through the install, the laptop’s SSH started dropping every connection, even to localhost:

kex_exchange_identification: read: Connection reset by peer

The new OpenSSH split part of the server into a separate program (sshd-session). The old sshd, still running, tries to use files that have already changed and drops the connection. The upgrade isn’t affected, because it runs in tmux. It’s fixed by restarting the service (sudo systemctl restart ssh) or once apt configures openssh-server. The host keys don’t change. If connecting to localhost shows a “new” fingerprint, that’s because localhost is a different name in your known_hosts.

This warning also showed up in the terminal:

/etc/ssh/ssh_config line 53: Unsupported option "gssapiauthentication"

The new client comes without GSSAPI (Kerberos), but the old ssh_config was kept (--force-confold). Commenting out that line is enough.

Gotcha 2: two wallpaper packages collide

An hour later, the install stopped:

dpkg: error processing archive .../kali-wallpapers-2026_2026.3.0_all.deb (--unpack):
 trying to overwrite '/usr/share/backgrounds/kali/login.svg', which is also in package kali-wallpapers-2024 (2024.1.1)
E: Sub-process /usr/bin/dpkg returned an error code (1)

A typical Kali clash: two packages ship the same file. Nothing is damaged: out of ~5,700 packages only 80 had been configured, and 2,176 were left unpacked and waiting. The fix: install that package allowing it to overwrite the file, then carry on with --fix-broken. A plain full-upgrade refuses to run while dependencies are incomplete.

sudo dpkg -i --force-overwrite /var/cache/apt/archives/kali-wallpapers-2026_2026.3.0_all.deb
sudo apt-get -f install          # picks up where it stopped
sudo apt full-upgrade            # whatever is left

Don’t use --force-overwrite for the whole upgrade. That way each clash is reviewed on its own and a real problem doesn’t get hidden.

In total there were three clashes, all from packages Kali renamed or merged:

New package File Already owned by
kali-wallpapers-2026 /usr/share/backgrounds/kali/login.svg kali-wallpapers-2024
python3-pyspnego /usr/bin/pyspnego-parse python3-spnego
powershell-empire 7.0 /usr/bin/starkiller starkiller

To avoid doing it by hand, the script became a loop. It runs apt-get -f install. If that fails with trying to overwrite, it pulls the .deb name out of the error, installs it with --force-overwrite from /var/cache/apt/archives, logs the case in clashes.log and starts over. Any other error stops it. Careful: after forcing it, dpkg -i may still exit with an error because the package is missing dependencies (powershell-empire was waiting for pyinstaller). That isn’t a failure: the package was unpacked (iU) and gets configured in the next round. Check its state with dpkg-query -W -f='${db:Status-Abbrev}', not the exit code.

Gotcha 3: GRUB doesn’t know which disk to install to

At the end a single package was left unconfigured, the most delicate one:

grub-pc: Running grub-install ...
You must correct your GRUB install devices before proceeding:
  DEBIAN_FRONTEND=dialog dpkg --configure grub-pc

debconf-show grub-pc showed install_devices empty. In non-interactive mode, apt can’t ask. The GRUB already on disk is still intact, so there’s no need to panic or reboot. First, find where GRUB is:

[ -d /sys/firmware/efi ] && echo EFI || echo BIOS
for d in sda sdb; do echo -n "$d: "; sudo dd if=/dev/$d bs=512 count=1 2>/dev/null | grep -ao GRUB | head -1; done

Both disks had GRUB in the MBR. Since you can’t tell from the running system which one the BIOS boots, we installed it on both, after saving their first 1 MB:

for d in sda sdb; do sudo dd if=/dev/$d of=mbr-$d.bin bs=512 count=2048; done
echo "grub-pc grub-pc/install_devices multiselect /dev/disk/by-id/ata-DISK1, /dev/disk/by-id/ata-DISK2" | sudo debconf-set-selections
sudo dpkg --configure -a

(The real names come from ls -l /dev/disk/by-id/.)

And Windows was missing from the menu. Since 2.06, GRUB no longer runs os-prober unless you ask it to:

sudo sed -i 's/^#GRUB_DISABLE_OS_PROBER=false/GRUB_DISABLE_OS_PROBER=false/' /etc/default/grub
sudo update-grub      # Found Windows 10 on /dev/sda1

One last check before rebooting: that the new kernel ships the modules for this hardware.

for m in radeon ath9k r8169 ahci dm_crypt xfs nfs; do modinfo -k 7.2.15+kali-amd64 -F filename $m >/dev/null && echo "$m ok"; done

Result

The laptop booted the 7.2.15 kernel on the first try. The full upgrade took about six and a half hours: download from 16:32 to 17:00, install from 17:00 to 22:55, including the pauses for the clashes. Afterwards:

What Result
Kernel 7.2.15 (6.10.9 stays in GRUB, just in case)
Radeon HD 6470M video radeon driver, X and LXDE as usual
Atheros AR9285 Wi-Fi / Realtek Ethernet ath9k / r8169, connected
LUKS disk for /home opens and mounts as always (cryptsetup 2.8.8)
Failed services none
Microsoft Edge 158 and Chromium load pages on the E-450, no “illegal instruction”
Claude Code 2.1.112 (Node 22) works
Input Leap built on another machine runs: uses no SSE4/AVX instructions (checked with objdump)
Kali tools (nmap, msfconsole, sqlmap, wireshark, john, hashcat) work
System Node / Python 18 → 24.22, 3.12 → 3.14

The fear of “after upgrading nothing will run” turned out to be unfounded. What could break wasn’t the CPU, but the firmware, because of the old sources.list, and GRUB, because of the question it couldn’t ask. Both were caught before rebooting.

To check whether a binary built on a modern machine will run on an old CPU, look for instructions the CPU doesn’t have:

objdump -d --no-show-raw-insn ./program | awk '{print $2}' \
  | grep -cE '^(v[a-z0-9]+|pcmpistri|crc32[bwlq]?|popcnt|ptest|pmovzx[a-z]+|pinsr[bdq]|lzcnt|tzcnt|andn|shlx|pdep|pext)$'

If it returns 0, there’s no AVX, SSE4.x or BMI. Then run it once: exit code 132 means illegal instruction.

Summary

  • “Illegal instruction” on an old CPU = missing extensions (here SSE4.2 and AVX). You can see it in /proc/cpuinfo.
  • Debian and Kali are still x86-64 v1: upgrading doesn’t break the system because of the CPU. What doesn’t run are third-party binaries.
  • Claude Code: release 2.1.112 (pure JavaScript) + Node 22 in ~/.local + DISABLE_AUTOUPDATER=1.
  • Before a big upgrade on a rolling release: save the dpkg database, the exact .deb files from the cache, a dpkg-repack of the critical packages, /etc, and keep the old kernel in GRUB.
  • Kali’s new key (2025) before apt update; simulate before installing; upgrade inside tmux.

Got an old PC, a backup or a question? Tell us in the blog's Telegram group: Telegram group

Enjoyed it? Follow us on social media

We post new things every week: don't miss them.

YouTubeFacebookXInstagramTelegram