fix: generic rescue instructions in debug command output
Some checks failed
CI/CD / typecheck (pull_request) Failing after 9s
CI/CD / test (pull_request) Failing after 9s
CI/CD / lint (pull_request) Failing after 22s
CI/CD / build (pull_request) Has been skipped
CI/CD / publish-rpm (pull_request) Has been skipped
CI/CD / publish-deb (pull_request) Has been skipped

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michal
2026-03-29 23:59:38 +01:00
parent 3835fefba1
commit 92c65b4672

View File

@@ -117,38 +117,33 @@ export function registerDebugCommand(parent: Command): void {
} }
} }
const sshdNote = opts.sshd
? `\nSSH + nc listener will start automatically. Watch bastion logs for the IP callback.
Password: debug | nc <ip> 2323 for raw shell\n`
: "";
console.log(` console.log(`
Debug mode queued for ${hostname} (${mac}). Debug mode queued for ${hostname} (${mac}).
Reboot the machine to enter Fedora rescue mode. Reboot the machine to enter Fedora rescue mode.
${sshdNote}
Once in rescue shell: Once in rescue shell:
# Activate LVM # Activate LVM and mount installed system
vgchange -ay labvg vgchange -ay
# Mount root + other volumes
mkdir -p /mnt/sysroot mkdir -p /mnt/sysroot
mount /dev/labvg/root /mnt/sysroot mount /dev/<vg>/root /mnt/sysroot
cat /mnt/sysroot/etc/fstab # check what else to mount cat /mnt/sysroot/etc/fstab
mount /dev/labvg/var /mnt/sysroot/var mount /dev/<vg>/var /mnt/sysroot/var
mount /dev/labvg/home /mnt/sysroot/home mount /dev/<vg>/home /mnt/sysroot/home
# Boot the installed system in a container # Boot installed system in a container
/mnt/sysroot/usr/bin/systemd-nspawn -D /mnt/sysroot --boot /mnt/sysroot/usr/bin/systemd-nspawn -D /mnt/sysroot --boot
# Or just chroot for quick fixes # Or chroot for quick fixes
mount --bind /dev /mnt/sysroot/dev mount --bind /dev /mnt/sysroot/dev
mount --bind /proc /mnt/sysroot/proc mount --bind /proc /mnt/sysroot/proc
mount --bind /sys /mnt/sysroot/sys mount --bind /sys /mnt/sysroot/sys
chroot /mnt/sysroot chroot /mnt/sysroot
# Check initramfs size
ls -lh /mnt/sysroot/boot/initramfs-*.img
# Rebuild initramfs without amdgpu
chroot /mnt/sysroot
echo 'omit_drivers+=" amdgpu "' > /etc/dracut.conf.d/omit-amdgpu.conf
dracut -f --regenerate-all
`); `);
}); });
} }