summaryrefslogtreecommitdiff
path: root/source/installer/sources/initrd/sbin/mkbindmounts
diff options
context:
space:
mode:
Diffstat (limited to 'source/installer/sources/initrd/sbin/mkbindmounts')
-rwxr-xr-xsource/installer/sources/initrd/sbin/mkbindmounts10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/installer/sources/initrd/sbin/mkbindmounts b/source/installer/sources/initrd/sbin/mkbindmounts
new file mode 100755
index 00000000..40a9d731
--- /dev/null
+++ b/source/installer/sources/initrd/sbin/mkbindmounts
@@ -0,0 +1,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