Every time you have to mount a system with a live-boot-CD and chroot
into the system to repair grub, you have to type so many lines to mount into the right partition:
fdisk -l
find the right partition for example /dev/sda1
mount /dev/sda1 /mnt/
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev
mount -t sysfs sys /mnt/sys
chroot /mnt/
Is there a way to optimize this with a single script?
Best Answer
Copy this script as
mount-root
on your usb-devicesource: https://gist.github.com/rubo77/eac3313ea5302acfca60