This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:crash_recovery [2015/10/31 19:53] tkilla |
linux:crash_recovery [2022/07/10 02:07] tkilla [Full Disc Encrypted System Rescue] |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Strato Root Server ===== | ===== Strato Root Server ===== | ||
- | Recovery Console: | + | |
+ | Login to Remote-Console first, so you can see boot messages, ... and kernel panics, if unlucky | ||
+ | |||
+ | Re-Install takes 1h | ||
+ | |||
+ | ==== Recovery Console: | ||
Set Boot mode to recovery in " | Set Boot mode to recovery in " | ||
Wait for 15-20min!! until " | Wait for 15-20min!! until " | ||
+ | |||
+ | Strato sets RAIDs to /md/126 and md127 - **that sucks!** - via grub install, ...,.. you can mess up the system | ||
log in to recovery via | log in to recovery via | ||
Line 30: | Line 38: | ||
To exit the recovery console you need to set boot mode to normal and wait 10min until " | To exit the recovery console you need to set boot mode to normal and wait 10min until " | ||
+ | |||
+ | ===== SoYouStart / OVH Root Server ===== | ||
+ | |||
+ | **You need to setup your ssh key in the webmanager to enter in rescue mode without password!** the password will be sent by mail as well. | ||
+ | |||
+ | - Change netboot mode in web-manager: | ||
+ | - Click " | ||
+ | |||
+ | Mount partitions: | ||
+ | mkdir /mnt/md2 | ||
+ | mount /dev/md2 /mnt/md2/ | ||
+ | |||
+ | After restore, click " | ||
+ | |||
+ | |||
+ | |||
+ | ===== Full Disc Encrypted System Rescue ===== | ||
+ | |||
+ | If the system does not boot anymore, **you can open the encrypted device anyway with a live system** on USB stick or CD. | ||
+ | |||
+ | # find the correct partitions: | ||
+ | fdisk -l | ||
+ | | ||
+ | # open the container | ||
+ | # " | ||
+ | cryptsetup luksOpen /dev/sdXY sdXY_sdb5_crypt | ||
+ | | ||
+ | # activate the LVM volume group (if you use LVM2): | ||
+ | vgchange -ay | ||
+ | | ||
+ | # find new volume groups in / | ||
+ | mount / | ||
+ | | ||
+ | # mount the unencrypted boot parti: | ||
+ | mount /dev/sdXZ /mnt/boot | ||
+ | | ||
+ | # bind mount some important dirs: | ||
+ | mount -t proc proc /mnt/proc | ||
+ | mount -o bind /dev /mnt/dev | ||
+ | mount -t sysfs none /mnt/sys | ||
+ | |||
+ | |||
+ | Now you can take your data back already. | ||
+ | |||
+ | To repair what is broken, you probably need to change root into that system: | ||
+ | |||
+ | chroot /mnt | ||
+ | |||
+ | All following commands are executed inside the broken system. Some hints for repairs: | ||
+ | |||
+ | apt install lvm2 cryptsetup-initramfs | ||
+ | |||
+ | If your root system is BTRFS, you need btrfs-progs and the kernel module during the early initramfs boot stage: | ||
+ | |||
+ | apt install btrfs-progs | ||
+ | |||
+ | |||
+ | Add a missing module to initramfs - inside the chroot: | ||
+ | |||
+ | mcedit / | ||
+ | |||
+ | |||
+ | Write one module name like " | ||
+ | |||
+ | Then regenerate the initramfs for all installed kernels: | ||
+ | |||
+ | update-initramfs -u -k all | ||
+ | |||
+ | |||
+ | * Check that the name in / | ||
+ | * Also check the UUID entries in / | ||
+ | |||
+ | |||
+ | TbC.. There may be various other reasons for bootproblems... | ||
+ | |||
+ | |||
+ | |||
+ | == Links: == | ||
+ | |||
+ | * really helpul! https:// | ||
+ | * various other hints https:// | ||
+ | |||
+ | |||
+ | |||
+ |