Recover Kernel Panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | 9.0.2
  • Distro version | Debian 11.9
  • SBC model | RPi4
  • Power supply used | PoE
  • SD card used | SanDisk extreme

through some defective blocks on the SD card, I’m running into this kernel panic. Also moved everything to a new SD card, but maybe also the defective files :wink:

What’s the best way to recover/restore the system (without losing services and data). Didn’t find an image for 9.0.2 anymore.

Thanks a lot,
best,
meg

how has this been done?

Do you have a backup of the system?

We don’t keep old images.

first dd. Then backup image restore. If I remember correctly, there were just some kb of non readable data.

None before the issues starts.

Guess it’s just one (important) broken file. Kernel panic coming directly after the init of the usb bus.

Can I do some kind of inplace Upgrade?

I’ve chrooted into the system:

 ─────────────────────────────────────────────────────
 DietPi v9.0.2 : Reboot required
 ─────────────────────────────────────────────────────
 - Device model : RPi 4 Model B (aarch64)
 - CPU temp : 50 Β°C / 122 Β°F : Running warm, but safe
 - LAN IP : 192.168.0.97 (eth0)
/boot/dietpi/func/dietpi-banner: line 227: 24219 Segmentation fault      curl -sSfLm 3 'https://dietpi.com/motd' -o "$fp_motd"
 ─────────────────────────────────────────────────────

 DietPi Team     : https://github.com/MichaIng/DietPi#the-dietpi-project-team
 Patreon Legends : Chris Gelatt, ADSB.im
 Website         : https://dietpi.com/ | https://twitter.com/DietPi_
 Contribute      : https://dietpi.com/contribute.html
 Web Hosting by  : https://myvirtualserver.com

 reboot          : A reboot is required to finalise a recent kernel upgrade

 dietpi-launcher : All the DietPi programs in one place
 dietpi-config   : Feature rich configuration tool for your device
 dietpi-software : Select optimised software for installation
 htop            : Resource monitor
 cpu             : Shows CPU information and stats

No it feels somehow like this issue.

I rather think that more is broken than just a file. It seems to be quite a lot because of:

Have you already tried a file system repair?

> /forcefsck
reboot
# then after reboot
journalctl -t systemd-fsck

:cold_sweat:

Maybe it’s just cause of the chroot environment?

Jep. Boot and root. Kernel panic at the same point.

0.8979191 VFS: Mounted root (ext filesystem) readonly on device 179:2.
0.902590] deutmpfs: mounted
0.907281] Freeing unused kernel memory: 4160K
0.907806] Run /sbin/init as init process
0.953203] usb 1-1: new high-speed USB device number 2 using xhci_hcd
00000Πͺ
L
1.0975651 Kernel panic - not syncing: Attempted to kill init!

tried to rebuild the kernel image, but seems initramfs-tools aren’t installed.

sudo apt install --reinstall raspberrypi-kernel also not solve it :frowning: - beside most operations within the chroot environment running into some issues

As said, there is more file system corruption on your system. Not just one or two files.

Rodger that… how to fix/repair it?

My plan was to get the original image and binary compare files… but cause there is no original image … I opened this thread.