October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Fix “Kernel panic – not syncing: Attempted to kill init!” on a Linux VPS

A practical recovery runbook for the Linux VPS panic “Attempted to kill init,” covering older-kernel boot, initramfs and GRUB repair, chroot recovery, filesystem checks, and validation.
Length12 min Posted Quest giverVGSources Team

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The panic means Linux could not keep process ID 1 (PID 1) running. PID 1 is the first userspace process and is normally the init system, such as systemd. If it cannot be started, exits, or cannot load a required library, the kernel has no usable userspace and stops with Kernel panic - not syncing: Attempted to kill init!.

The safest sequence is to preserve the console output, snapshot the VPS, try the previous kernel from the boot menu, and repair the kernel package, initramfs, and GRUB entry. If no kernel reaches userspace, attach the boot disk to a rescue VM, repair it in a chroot, check the filesystem while it is unmounted, and then reattach it.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “attempted to kill init” actually tells you

The message is a symptom, not a diagnosis. The kernel has already started, but the first userspace process (PID 1) is unavailable or has terminated. Microsoft describes init as “the first process to be started and should never exit.” Without it, services cannot be started, mounts cannot be completed, and the normal boot sequence cannot continue.

Look at the lines immediately before the panic. They often reveal whether the failure occurred while unpacking the initramfs, mounting the root filesystem, loading a shared library, or starting systemd. A trace that shows PID 1 exiting after the root filesystem is mounted points toward a damaged userspace or an init-system crash; a failure before that point more often indicates a bad boot image, GRUB argument, storage problem, or filesystem issue.

Common causes on VPS systems

Missing, empty, or incompatible initramfs

The initramfs (also called initrd) contains the early userspace programs and drivers needed to find the root disk and switch to the real filesystem. A kernel package change can leave the image absent, zero-length, generated for a different kernel, or missing storage, filesystem, or LVM modules. If the kernel starts but cannot find its root filesystem, PID 1 never gets a chance to run normally.

GRUB selecting the wrong artifacts

GRUB can point to a kernel and initramfs that do not belong together. A missing initrd line, an incorrect root= device or UUID, or a hand-edited menu entry can send the kernel to the wrong disk. This is especially easy to trigger after changing disks, restoring snapshots, or editing GRUB configuration in a rescue environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Missing core files or shared libraries

PID 1 is an executable with dependencies. Removing the dynamic loader, a systemd library, or another core package can make init fail immediately even though the kernel and initramfs are intact. Red Hat troubleshooting examples include a missing loader or init-system library; the panic text alone does not identify which file is absent.

Filesystem damage, a full disk, or storage errors

An unclean shutdown, a completely full boot or root filesystem, and underlying I/O errors can corrupt files or prevent writes during a kernel update. Google Cloud associates boot-disk damage with these conditions. A filesystem that cannot be mounted consistently can produce the same visible panic as a broken package.

A genuine init or systemd crash

If the log shows that PID 1 started and then crashed, inspect the preceding messages and the installed systemd and kernel versions. A library ABI mismatch, an incomplete upgrade, or a damaged configuration may be involved. Do not assume that reinstalling the kernel alone will fix a userspace crash.

Choose the least invasive recovery path

Situation Preferred action Why
Serial or web console reaches the GRUB menu Boot the previous kernel Fastest route and no disk handling is required.
An older kernel reaches a login prompt Repair packages, initramfs, and GRUB from the running VPS The target filesystems are already mounted in their normal layout.
No kernel reaches userspace Snapshot the disk, then use a rescue or repair VM and chroot Works when the guest cannot complete its own boot.
Offline filesystem check reports unrecoverable damage Restore the snapshot or a known-good backup Repeated forced boots can worsen corruption.

Provider capabilities differ. Check whether your VPS offers a serial console, boot diagnostics, snapshots, detachable disks, and a documented repair-VM workflow. Azure, Google Cloud, and AWS describe similar patterns, but their console labels, detach rules, and attachment commands are different.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Phase 1: preserve evidence and stop destructive retries

  1. Capture the complete console output. Save the serial-console transcript or boot-diagnostics screenshot, including the kernel version and every line before the panic. The preceding error is usually more useful than the final sentence.
  2. Record what changed. Note the last kernel update, package transaction, disk resize, GRUB edit, filesystem alert, or unclean shutdown. If you can boot another kernel, record the output of uname -r.
  3. Take a provider snapshot or backup. Snapshot the OS disk before attaching it elsewhere or running repair tools. A snapshot gives you a rollback point if a package reinstall or filesystem repair has an unexpected result.
  4. Stop automatic reboot loops. Repeated boots can make evidence harder to read and can trigger additional filesystem journal recovery. Use the provider’s stop function or leave the machine at the boot menu while you plan the repair.

Phase 2: boot an older kernel from the VPS console

Open the provider’s serial console or equivalent out-of-band console and restart only when you can watch the complete boot. Interrupt GRUB during its countdown. Select Advanced options (the wording varies) and choose the newest kernel that predates the failure, preferably its normal entry rather than a recovery entry unless normal boot also fails.

If the older kernel boots, do not immediately reboot into the failing entry. Keep the working session open, make the snapshot if you have not already done so, and repair the broken pair while the disk is mounted normally.

Repair from a running older kernel

Confirm the kernel and initramfs pairing

List the installed kernels and the files in /boot. On most distributions, each kernel version should have a matching kernel image and an initramfs with the same version string. Also check free space; an update can fail when /boot is full.

uname -r
ls -lh /boot
df -h /boot /
findmnt /boot

If /boot is a separate filesystem, make sure it is mounted before rebuilding anything. An apparently successful rebuild written into the root directory instead of the real boot partition will not be used at the next restart.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review the previous boot and package history

Use the journal from the failed boot and your distribution’s package history to identify an incomplete transaction or a library error.

journalctl -b -1 -p warning..alert
journalctl -b -1 | tail -n 200

On Debian and Ubuntu, inspect /var/log/apt/history.log and /var/log/dpkg.log. On Fedora and RHEL-family systems, inspect the DNF or YUM transaction history. If the log names a missing loader, systemd component, or kernel package, reinstall that package using the repository for the installed release rather than copying files from another distribution.

Debian and Ubuntu: rebuild and regenerate

Run the commands as root on the booted VPS. Replace the version in the explicit command with the kernel version shown by ls /lib/modules if you need to repair a particular entry.

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get install --reinstall linux-image-generic linux-headers-generic
sudo update-initramfs -c -k all
sudo update-grub

If your installation uses a different kernel meta-package, reinstall the package that owns the working distribution kernel instead of blindly using the generic name above. Verify that /boot now contains a non-empty initrd.img-… for every menu entry you intend to use. If the initramfs already exists but may be stale, use the distribution’s update mode for that version rather than creating a duplicate image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fedora and RHEL-family systems: rebuild with dracut

sudo dnf history
sudo dnf reinstall kernel kernel-core kernel-modules
sudo dracut --regenerate-all --force
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

On systems that boot through UEFI, the installed GRUB tooling may write to an EFI-specific location. Follow the layout already used by the machine and verify the generated configuration rather than assuming every RHEL-family release uses the same path. Reinstall a core package if the logs show that the dynamic loader or systemd libraries are missing.

Validate before rebooting

  • Confirm the repaired kernel has a corresponding initramfs in /boot and that its size is plausible rather than zero bytes.
  • Inspect the generated GRUB menu and confirm the kernel and initramfs filenames refer to the same version.
  • Check that the menu’s root= argument identifies the actual root filesystem UUID or device.
  • Ensure the root filesystem and /boot have free space.
  • Only then reboot, keep the console open, and select the repaired entry explicitly if necessary.

Phase 3: repair with a rescue or repair VM

Use this path when every kernel fails or the console cannot reach a usable shell. The exact detach and attach operations are provider-specific, so follow your provider’s safety rules. Work on a copy or snapshot whenever possible.

Attach and identify the target disk

  1. Stop the damaged VPS if the provider requires the boot disk to be detached while stopped.
  2. Attach the snapshot-derived disk or the original OS disk to a temporary Linux rescue VM. Attach it read-write only when you are ready to make repairs.
  3. On the rescue VM, identify partitions, filesystems, and volume groups.
lsblk -f
sudo blkid
sudo pvs
sudo vgs
sudo lvs

Do not guess the device name. A disk that appears as /dev/sdb on one rescue VM may have a different name on another. Use the filesystem labels, UUIDs, and sizes from lsblk -f to identify the target.

Mount root, boot, and LVM correctly

Activate LVM before mounting logical volumes. Mount the target root filesystem at a temporary directory, then mount a separate /boot or EFI partition inside it if the layout has one.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo vgchange -ay
sudo mkdir -p /mnt/target
sudo mount /dev/mapper/target-root /mnt/target
sudo mount /dev/target-boot /mnt/target/boot
sudo mount /dev/target-efi /mnt/target/boot/efi

The device names above are examples of layout, not universal names. Mount only the partitions that actually exist on the target. If the root filesystem is not LVM, mount its identified partition directly. Check the result with findmnt -R /mnt/target and ensure that the real /boot is not hidden by an empty directory on root.

Bind system interfaces and enter the chroot

Copy DNS configuration if package downloads will be needed, then bind the virtual filesystems required by package tools and boot utilities.

sudo cp -L /etc/resolv.conf /mnt/target/etc/resolv.conf
sudo mount --rbind /dev /mnt/target/dev
sudo mount --make-rslave /mnt/target/dev
sudo mount -t proc /proc /mnt/target/proc
sudo mount --rbind /sys /mnt/target/sys
sudo mount --make-rslave /mnt/target/sys
sudo mount --rbind /run /mnt/target/run
sudo mount --make-rslave /mnt/target/run
sudo chroot /mnt/target /bin/bash

Inside the chroot, / is the damaged installation. Confirm its identity before changing anything:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cat /etc/os-release
ls -l /boot
mount | grep -E ' / |/boot|/boot/efi'

A chroot does not run the target system’s kernel; it uses the rescue VM’s running kernel while operating on the target files. That is expected. Do not start services in the chroot.

Repair packages, initramfs, and GRUB in the chroot

Debian and Ubuntu chroot commands

dpkg --configure -a
apt-get -f install
apt-get install --reinstall systemd libsystemd0
apt-get install --reinstall linux-image-generic linux-headers-generic
update-initramfs -c -k all
update-grub

If the installed release uses a versioned kernel package or a cloud-specific kernel meta-package, reinstall that package instead. Use dpkg -S against a named missing file to find its owning package, then reinstall the owner. Avoid removing all kernels: keep at least one known-good entry until the repaired system has booted.

Fedora and RHEL-family chroot commands

dnf reinstall systemd glibc
 dnf reinstall kernel kernel-core kernel-modules
dracut --regenerate-all --force
grub2-mkconfig -o /boot/grub2/grub.cfg

Remove the accidental leading space before dnf reinstall kernel if your shell treats it specially; the command itself is the same. If the rescue VM cannot resolve repositories, repair the initramfs and GRUB with locally cached packages or configure DNS and repository access for the chroot. Never copy a loader or systemd binary from the rescue VM’s distribution into the target.

Check the generated files and configuration

Still inside the chroot, verify the selected kernel modules directory and boot files.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ls -ld /lib/modules/*
ls -lh /boot
for image in /boot/initr* /boot/initramfs*; do [ -e "$image" ] && file "$image"; done
grep -R "menuentry|initrd|linux" /boot/grub* 2>/dev/null | tail -n 80

There must be an initramfs for the kernel you plan to boot. If the target uses a separate EFI system partition, confirm it is mounted at /boot/efi and that the installed GRUB tooling updated the files there. Check the target’s /etc/fstab and compare its root and boot UUIDs with blkid; a stale UUID can make a perfectly generated initramfs fail to find the disk.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Check the filesystem while it is offline

Exit the chroot and unmount the target filesystems before running a repair checker. Never run a destructive filesystem repair against a mounted root filesystem.

exit
sudo umount -R /mnt/target

For an ext-family filesystem, run the checker against the unmounted target partition. For XFS, use its filesystem-specific checking and repair workflow; XFS repair tools do not use the same command as ext filesystems. Identify the exact filesystem with lsblk -f before choosing a tool.

Investigate why the check was needed. Look for a full disk, provider-reported I/O errors, or evidence of an unclean shutdown in the console log. If the checker cannot make the filesystem consistent, stop forcing boots and restore the snapshot or another known-good backup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Detach, reattach, and validate the repaired VPS

  1. Unmount every target mount and deactivate its volume group on the rescue VM. A clean detach prevents cached writes from being lost.
  2. Detach the repaired disk according to the provider’s procedure and reattach it as the VPS boot disk.
  3. Start the VPS with the serial console or boot diagnostics visible. Watch for the expected kernel version, initramfs loading, root mount, and transition to userspace.
  4. After SSH becomes available, verify uname -r, findmnt /, systemctl is-system-running, and application health.
  5. Perform one controlled reboot while monitoring the console. Keep the snapshot until that reboot and your critical services complete normally.

Troubleshooting branches when the first repair fails

The older kernel also panics

Stop treating the incident as a single bad kernel. Compare the console output from both entries. If both fail before mounting root, prioritize disk identification, GRUB’s root argument, initramfs contents, and filesystem integrity. If both reach userspace and then lose PID 1, inspect systemd, the dynamic loader, and recently changed core libraries.

GRUB shows no older kernel

Use the rescue VM to inspect /boot and the package database. If older kernel files were deleted, reinstall a kernel package in the chroot, generate its initramfs, and regenerate the menu. Ensure the rescue mount includes the real boot partition; otherwise GRUB may be rebuilt in the wrong directory.

The initramfs rebuild completes but boot still cannot find root

Compare the UUID in /etc/fstab, the GRUB root= argument, and blkid output from the attached disk. Confirm that the initramfs includes the storage driver, filesystem driver, and LVM or RAID modules required by the VPS layout. Rebuild for the exact kernel version shown in the GRUB entry.

Package tools report a missing loader or systemd library

Use the installed release’s package manager to reinstall the package that owns the missing path. Do not substitute binaries from the rescue VM. After reinstalling, rebuild the initramfs and regenerate GRUB so the repaired userspace and boot image are used together.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The disk is full

Free space only after preserving the snapshot and identifying safe candidates. Old kernels can consume most of a small /boot; remove obsolete entries with the distribution’s package manager, never by deleting the currently running kernel or manually removing files that the package database still expects. Then rerun the interrupted package transaction and regenerate the initramfs.

Preventing a repeat outage

  • Keep at least one older, bootable kernel until the replacement has completed a normal reboot.
  • Monitor free space on both /boot and the root filesystem before kernel upgrades.
  • Maintain provider snapshots or backups that can be restored without booting the guest.
  • Enable and test serial-console or equivalent out-of-band access before an emergency.
  • Keep recovery-VM procedures documented for disk attachment, LVM activation, chroot bind mounts, and clean detach.
  • After upgrades, verify that the kernel and initramfs pair exists and that GRUB references the intended root UUID.
  • Investigate I/O errors and unclean shutdowns rather than treating each panic as a package-only problem.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.