Dieser Guide behandelt die Wiederherstellung eines nicht mehr bootfähigen Debian/Ubuntu-Systems, wenn Dateisystemfehler oder korrupte Journal-Logs den Bootvorgang blockieren.
1. Vorbereitung (Rescue System)
- Booten: Starten Sie den VPS über das Control Panel des Hosters in das Rescue-System (meist ein minimales Live-Debian).
- Identifikation: Finden Sie heraus, welche Partition die Root-Partition (
/) ist.lsblk # Oder alternativ: fdisk -lIn diesem Guide gehen wir von/dev/vda1als Root-Partition aus.
2. Dateisystemprüfung (fsck / xfs_repair)
Führen Sie die Reparatur zwingend vor dem Mounten aus.
- Für ext4 (Standard bei Debian/Ubuntu):
fsck -y /dev/vda1 - Für XFS:
xfs_repair /dev/vda1
3. Mounten und Journal-Cleanup
Nachdem das Dateisystem konsistent ist, müssen korrupte Logs entfernt werden, die den systemd-journald beim Booten zum Absturz bringen könnten.
- Mounten:
mount /dev/vda1 /mnt - Bereinigen:
rm -rf /mnt/var/log/journal/* - Abschluss:
umount /mnt reboot
Dokumentation & Hilfe
Guide: Filesystem Repair & Journal Cleanup (VPS Rescue)
This guide covers the recovery of a non-bootable Debian/Ubuntu system when filesystem errors or corrupt journal logs block the boot process.
1. Preparation (Rescue System)
- Boot: Start the VPS into the Rescue System via the provider’s control panel (usually a minimal Live-Debian).
- Identification: Identify the root partition (
/).lsblk # Alternatively: fdisk -lIn this guide, we assume/dev/vda1is the root partition.
2. Filesystem Check (fsck / xfs_repair)
Perform the repair before mounting the partition.
- For ext4 (Default on Debian/Ubuntu):
fsck -y /dev/vda1 - For XFS:
xfs_repair /dev/vda1
3. Mounting and Journal Cleanup
Once the filesystem is consistent, remove corrupt logs that might cause systemd-journald to fail during boot.
- Mount:
mount /dev/vda1 /mnt - Cleanup:
rm -rf /mnt/var/log/journal/* - Finalize:
umount /mnt reboot