I am trying to mount a Raspberry Pi FreeBSD image file in my "dev" jail for I can modify it.
I had to make a few tweaks to my jail configuration to allow access to /dev/md* devices. I am able to intialize the image with
I already checked that I have jail configuration options for allowing mounting. Below is my config file, I am not sure which part I am missing.
I had to make a few tweaks to my jail configuration to allow access to /dev/md* devices. I am able to intialize the image with
mdconfig
. The image gets assigned to /dev/md0, but when I try to run mount /dev/md0s2 /mnt/pi
it says "Operation not permitted".I already checked that I have jail configuration options for allowing mounting. Below is my config file, I am not sure which part I am missing.
Code:
dev01 {
devfs_ruleset = 6;
mount.devfs = true;
//mount.fdescfs = true;
//mount.procfs= true;
enforce_statfs= 2;
allow.mount = true;
allow.mount.devfs = true;
host.hostname = "dev01";
vnet;
vnet.interface = "epair2b";
allow.raw_sockets;
path ="/usr/local/jails/dev01/root";
exec.clean;
exec.consolelog = "/var/log/jail.$name.console.log";
exec.prestart = "ifconfig epair2 create up";
exec.prestart += "ifconfig bridge0 addm epair2a";
exec.start = "/bin/sh /etc/rc";
exec.start += "ifconfig epair2b inet 172.16.0.13/24";
exec.start += "route add default 172.16.0.1";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.prestop += "ifconfig epair2b -vnet $name";
exec.poststop = "ifconfig bridge0 deletem epair2a";
exec.poststop += "sleep 2";
exec.poststop += "ifconfig epair2a destroy";
}