summaryrefslogtreecommitdiffstats
path: root/source/installer/sources/initrd/sbin/mkbindmounts
blob: e5c95c0f1e08b36b8919d026c122ec15d4a2aed7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/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 rbind /dev /mnt/dev
mount -o rbind /proc /mnt/proc
mount -o rbind /sys /mnt/sys