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?
none
for proc or and tht there is no slash beforesys
? – rubo77 Sep 25 '14 at 11:29devpts
is a filesystem like proc and sysfs:mount -t devpts none $M/dev/pts
, though I don't think there's a difference in effect - see http://unix.stackexchange.com/q/98405/70524 ). – muru Sep 25 '14 at 11:31