chroot mount script fstab bind

index | OSiUX | blog | docs | charlas | links

mount from script

mount -t proc proc-debdev /home/chroot/debdev/proc
mount -t sysfs sysfs-debdev /home/chroot/debdev/sys
mount -t devpts -o rw,gid=5,mode=620 none /home/chroot/debdev/dev/pts

mount --bind /home/data /home/chroot/debdev/home/debdev/data/
mount --bind /home/www  /home/chroot/debdev/var/www
mount --bind /home/www  /var/www

mount in fstab

proc-debdev     /home/chroot/debdev/proc        proc    none                0 0
sysfs-debdev    /home/chroot/debdev/sys         sysfs   none                0 0
devpts          /home/chroot/debdev/dev/pts     devpts  rw,gid=5,mode=620   0 0

/home/data      /home/chroot/debdev/home/data   none    bind                0 0
/home/www       /home/chroot/debdev/var/www     none    bind                0 0
/home/www       /var/www                        none    bind                0 0