Linux rescues

Rescue shell for Linux

If you forgot the password for your Ubuntu system you can recover using the following steps:

Source : https://askubuntu.com/questions/24006/how-do-i-reset-a-lost-administrative-password/165248#165248


Reset language and keyboard

sudo vi /mnt/etc/default/keyboard
dpkg-reconfigure locales
dpkg-reconfigure tzdata
dpkg-reconfigure keyboard-configuration
dpkg-reconfigure console-setup

Sources : https://askubuntu.com/questions/1135719/keyboard-layout-stuck-into-cz-german-no-english-layout-after-update-restore-int/1135720#1135720

https://rs1.es/tutorials/2021/11/12/useful-dpkg-reconfigure-commands.html


Mount LUKS from Live system

sudo apt-get update
sudo apt-get install lvm2 cryptsetup
sudo modprobe dm-crypt
sudo fdisk -l
sudo cryptsetup luksOpen /dev/sde3 myvolume
sudo mount /dev/system/root /mnt/
sudo mount --bind /dev /mnt/dev 
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt

Source : https://askubuntu.com/questions/653408/mounting-encrypted-luks-partition-from-live-cd



Zurück zur Hauptseite