Read this thread.
http://marc.theaimsgroup.com/?l=openbsd-misc&m=110226865110477&w=2
Varun Dubey wrote:
Hello,
I am using the generic kernel on 3.7 and it seems that
unionfs isnt built into it. I tried to compile sys/miscfs/union/* into
a VFS lkm as suggested in /usr/share/lkm/vfs/ (for kernfs). loaded
the module successfully after compilation.
Here is the make file i used
//--------------------
SRCS=unionfsmod.c
OBJS=$(SRCS:.c=.o)
KSRCS=/sys/miscfs/union/union_vfsops.c /sys/miscfs/union/union_vnops.c
KSRCS+=/sys/miscfs/union/union_subr.c
KOBJS=union_vfsops.o union_vnops.o union_subr.o
MODOBJ=combined.o
KMOD=unionfsmod
CFLAGS+= -D_KERNEL -I/sys -I.
all:
$(MODOBJ)
clean:
rm -f $(OBJS) $(KOBJS) $(MODOBJ) $(KMOD)
load:
modload -o $(KMOD) -e$(KMOD) $(MODOBJ)
unload:
modunload -n $(KMOD)
union_vfsops.o: /sys/miscfs/union/union_vfsops.c
$(CC) $(CFLAGS) -c -o $@ $<
union_vnops.o: /sys/miscfs/union/union_vnops.c
$(CC) $(CFLAGS) -c -o $@ $<
union_subr.o: /sys/miscfs/union/union_subr.c
$(CC) $(CFLAGS) -c -o $@ $<
$(MODOBJ): $(OBJS) $(KOBJS)
$(LD) -r -o $(MODOBJ) $(OBJS) $(KOBJS)
.include <bsd.own.mk>
However when i tried
# mount -t union /sys $HOME/sys
The system died. Has anyone else faced similar problems. Please
point out what i might be doing wrong.
TIA
varun.