#!/bin/bash # Create bind mounts from / to /mnt for /dev/, /proc, and /sys. # This may be useful for chrooting to a system partition mounted # on /mnt (for example to run mkinitrd_command_generator.sh or to # reinstall boot loaders). mkdir -p /mnt/{dev,proc,sys} mount -o bind /dev /mnt/dev mount -o bind /proc /mnt/proc mount -o bind /sys /mnt/sys