You are not logged in.
Pages: 1
A powerfailure when upgrading or forgotten password, is example when the computer can get unbotable or impossible to log in to.
To remedy it, you can boot an rescue or live CD and chroot in to your faulty installation.
I ad an skript to ease mounting of devices.
Edit it to suite your installation. If you in chroot, need to mount other drives listed in /etc/fstab, just issue command "mount -a"
The script must be run as root.
#!/bin/sh
# chroot.sh Skript to ease chroot mounts. Adjust devices if applicable
# More about chroot at https://wiki.archlinux.org/index.php/Chroot and
# https://wiki.debian.org/chroot
echo
echo " chroot with sda2 mounted at / and sda3 at /boot"
echo
echo " After finishing work in chroot, make exit and reboot or make umount:"
echo " 'umount -lf /srv/chroot/'" # lf= --lazy --force
echo ""
echo " Press ENTER to continye or CTRL+C to abort..."
echo ""
read stdin
mkdir -p /srv/chroot # -p = --parents (no error if existing, make parent directories as needed)
export MY_CHROOT=/srv/chroot
mount -rw /dev/sda3 $MY_CHROOT # -rw = --read-write
mount -rw /dev/sda2 $MY_CHROOT/boot
mount -o bind -t proc /proc $MY_CHROOT/proc # -o = --options -t = --types
mount -o bind /dev $MY_CHROOT/dev
mount -t devpts /dev/pts $MY_CHROOT/dev/pts
mount -t sysfs /sys $MY_CHROOT/sys
mount -o bind /tmp $MY_CHROOT/tmp
echo "/srv/chroot" > /etc/debian_chroot
chroot $MY_CHROOT /bin/bash
echo ""
echo " After finishing work in chroot, make exit and reboot or unmount:"
echo " 'umount -lf /srv/chroot/'" # lf= --lazy --force
echo ""
rm /etc/debian_chroot
Last edited by rbh (2022-01-07 20:04:10)
// Regards rbh
Please read before requesting help: "Guide to getting help", "Introduction to the Bunsenlabs Lithium Desktop" and other help topics under "Help & Resources" on the BunsenLabs menu
Offline
Cool, thank you!
Usually I got an USB-key containig rescatux but this comes really handy...
naik --greetz
"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen Codeberg
Offline
Pages: 1