chroot mount script fstab bind

· osiux's blog


.org | .md | .gmi | .html

mount from script #

1mount -t proc proc-debdev /home/chroot/debdev/proc
2mount -t sysfs sysfs-debdev /home/chroot/debdev/sys
3mount -t devpts -o rw,gid=5,mode=620 none /home/chroot/debdev/dev/pts
4
5mount --bind /home/data /home/chroot/debdev/home/debdev/data/
6mount --bind /home/www  /home/chroot/debdev/var/www
7mount --bind /home/www  /var/www

mount in fstab #

1proc-debdev     /home/chroot/debdev/proc        proc    none                0 0
2sysfs-debdev    /home/chroot/debdev/sys         sysfs   none                0 0
3devpts          /home/chroot/debdev/dev/pts     devpts  rw,gid=5,mode=620   0 0
4
5/home/data      /home/chroot/debdev/home/data   none    bind                0 0
6/home/www       /home/chroot/debdev/var/www     none    bind                0 0
7/home/www       /var/www                        none    bind                0 0