summaryrefslogblamecommitdiffstats
path: root/source/installer/sources/initrd/sbin/mkbindmounts
blob: 40a9d7313747746af920b257dc5b9efe04120e70 (plain) (tree)
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 bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys