devuan
We use debootstrap and need to enter the jail to fix the last stuff.
mkdir debootstrap-devuan cd debootstrap-devuan fetch http://deb.devuan.org/devuan/pool/main/d/debootstrap/debootstrap_1.0.140devuan1_all.deb tar xf debootstrap* tar xf data.tar.gz cp usr/share/debootstrap/scripts/daedalus /usr/local/share/debootstrap/scripts/
zfs create -p tank/jails/devuan debootstrap –no-check-gpg –arch=amd64 daedalus /usr/local/jails/devuan/ http://pkgmaster.devuan.org/merged/
cp /etc/resolv.conf /usr/local/jails/void/etc/resolv.conf cp /etc/localtime /usr/local/jails/void/etc/localtime
chroot /usr/local/jails/devuan /bin/bash
Set Cache-Start
echo “APT::Cache-Start 251658240;” > /etc/apt/apt.conf.d/00chroot
Fix base packages
dpkg –force-depends -i /var/cache/apt/archives/*.deb
Install OpenRC
apt –allow-insecure-repositories update apt –allow-unauthenticated install openrc
cd /usr/local/jails/devuan0/etc/ echo “root::0:0::0:0:Charlie &:/root:/bin/bash” > master.passwd pwd_mkdb -d ./ -p master.passwd
Restore the Linux passwd file
cp passwd- passwd
devuan.conf ``` exec.clean; allow.raw_sockets;
devuan {
STARTUP/LOGGING
exec.start = “/sbin/openrc default”; exec.stop = “/sbin/openrc shutdown”;
exec.consolelog = “/var/log/jailconsole${name}.log”;
# PERMISSIONS allow.raw_sockets; exec.clean; mount.nodevfs;
devfs_ruleset=4;
allow.mount;
allow.mount.devfs;
allow.mount.fdescfs;
allow.mount.procfs;
allow.mount.linprocfs;
allow.mount.linsysfs;
allow.mount.tmpfs;
enforce_statfs=1;
# HOSTNAME/PATH host.hostname = “${name}.${domain}”; path = “/usr/local/jails/${name}”;
# NETWORK $bridge = ““; $domain = “dflund.se”; ip4 = “inherit”;
# MOUNT mount += “devfs $path/dev devfs rw 0 0”; mount += “tmpfs $path/dev/shm tmpfs rw,size=1g,mode=1777 0 0”; mount += “fdescfs $path/dev/fd fdescfs rw,linrdlnk 0 0”; mount += “linprocfs $path/proc linprocfs rw 0 0”; mount += “linsysfs $path/sys linsysfs rw 0 0”; mount += “/tmp $path/tmp nullfs rw 0 0”;
persist; allow.socket_af; }
test your config with
jail -c -f /etc/jail.conf.d/devuan.conf
# void
Simple! Just extract the rootfs
`zfs create -p tank/jails/void`
fetch https://repo-default.voidlinux.org/live/current/void-x86_64-ROOTFS-20250202.tar.xz
tar xf void-x86_64-ROOTFS-20250202.tar.xz -C /usr/local/jails/void/
cd /usr/local/jails/void/etc/
echo "root::0:0::0:0:Charlie &:/root:/bin/bash" > master.passwd
pwd_mkdb -d ./ -p master.passwd
cp /etc/resolv.conf /usr/local/jails/void/etc/resolv.conf
cp /etc/localtime /usr/local/jails/void/etc/localtime
now we're ready to start the jail
void.conf
exec.clean; allow.raw_sockets; #mount.devfs; # we really dont want /dev
void {
STARTUP/LOGGING
exec.start = "/bin/sh /etc/runit/2 &";
exec.stop = "/bin/sh /etc/runit/3";
exec.consolelog = “/var/log/jailconsole${name}.log”;
# PERMISSIONS allow.raw_sockets; exec.clean; mount.nodevfs; # empty /dev as we use devfs
devfsruleset=4; allow.mount; allow.mount.devfs; allow.mount.fdescfs; allow.mount.procfs; allow.mount.linprocfs; allow.mount.linsysfs; allow.mount.tmpfs; enforcestatfs=1;
# HOSTNAME/PATH host.hostname = “${name}.${domain}”; path = “/usr/local/jails/${name}”;
# NETWORK $bridge = ““; $domain = “dflund.se”; ip4 = “inherit”;
# MOUNT
# MOUNT mount += “devfs $path/dev devfs rw 0 0”; mount += “tmpfs $path/dev/shm tmpfs rw,size=1g,mode=1777 0 0”; mount += “fdescfs $path/dev/fd fdescfs rw,linrdlnk 0 0”; mount += “linprocfs $path/proc linprocfs rw 0 0”; mount += “linsysfs $path/sys linsysfs rw 0 0”; mount += “/tmp $path/tmp nullfs rw 0 0”;
persist; allow.socket_af;
}


