Commits

Anonymous committed ba7dadc

Adding ro-chroot tools

Comments (0)

Files changed (3)

slave/sbin/ro-chroot

+#!/bin/bash
+
+mkdir -p CHROOT-RW CHROOT
+mount -t aufs -o br=CHROOT-RW=rw:/=ro,xino=/dev/shm/aufs.xino none CHROOT
+mount -t proc none CHROOT/proc
+mount -o bind /dev/ CHROOT/dev
+
+chroot CHROOT
+
+umount CHROOT/dev
+umount CHROOT/proc
+umount CHROOT
+

slave/sbin/ro-chroot2

+#!/bin/bash
+
+mkdir -p CHROOT-RO CHROOT-RW2 CHROOT2
+#mount -o loop,ro $1 CHROOT-RO
+mount -t aufs -o br=CHROOT-RW2=rw:CHROOT-RO=ro none CHROOT2
+mount -t proc none CHROOT2/proc
+mount -o bind /dev/ CHROOT2/dev
+
+chroot CHROOT2
+
+umount CHROOT2/dev
+umount CHROOT2/proc
+umount CHROOT2
+#umount CHROOT-RO
+#umount CHROOT
+

slave/sbin/ro-chroot3

+#!/bin/bash
+
+mkdir -p CHROOT-RO CHROOT-RW3 CHROOT3
+#mount -o loop,ro $1 CHROOT-RO
+mount -t aufs -o br=CHROOT-RW3=rw:CHROOT-RO=ro none CHROOT3
+mount -t proc none CHROOT3/proc
+mount -o bind /dev/ CHROOT3/dev
+
+chroot CHROOT3
+
+umount CHROOT3/dev
+umount CHROOT3/proc
+umount CHROOT3
+#umount CHROOT-RO
+#umount CHROOT
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.