You are not logged in.

#1 2013-06-25 15:45:42

Registered: 2013-04-20
Posts: 6

unionfs-fuse as filesystem root

I currently have Arch booted over iscsi, i want to use it in read-only mode (so multiple users can use it simultaneously) with read-write unionfs stored in RAM (tmpfs).

Currently i have this script:


# Copyright: Bernd Schubert <>
# BSD license, see LICENSE file for details

FUSE_OPT="-o allow_other,use_ino,suid,dev,nonempty"
# 2/3 wolnego RAM'u 
TMPFS_SIZE=`free -m | grep Mem: | awk '{ printf "%d\n", $4 * 2 / 3 }'`


mount -t proc proc /proc
# mount -t tmpfs tmpfs /tmp                                                  '`
mount -t tmpfs -o size=${TMPFS_SIZE}M,rw tmpfs /.unionfs

mkdir -p $CHROOT_PATH/root
mkdir -p $CHROOT_PATH/rw
mkdir -p $CHROOT_PATH/union

mount --bind / $CHROOT_PATH/root


mount -t proc proc $CHROOT_PATH/union/proc

cd $CHROOT_PATH/union
mkdir oldroot
pivot_root . oldroot

# init q

I'm pretty sure script itself is ok (when i simply execute it in working system, everything works properly except 'pivot_root').

I have no idea how to properly invoke it during system boot with systemd.

Last edited by drag0nius (2013-06-25 16:39:29)


Board footer

Powered by FluxBB