soup4you2
September 3rd, 2003, 17:29
This is really simple but can tend to drive a person crazy...
so i thought i would make a series of howto's on chrooting various applications..
I'm going to make the assumption you arlready have it installed and configured and working properly.. if not then do that..
the scope of this howto is just to simply chroot it.
mkdir -p /usr/chroot/dhcpd
mkdir -p /usr/chroot/dhcpd/dev
mkdir -p /usr/chroot/dhcpd/etc
mkdir -p /usr/chroot/dhcpd/usr/lib
mkdir -p /usr/chroot/dhcpd/usr/libexec
mkdir -p /usr/chroot/dhcpd/usr/local/sbin
mkdir -p /usr/chroot/dhcpd/usr/local/etc
mkdir -p /usr/chroot/dhcpd/var/db
mkdir -p /usr/chroot/dhcpd/var/run
mknod /usr/chroot/dhcpd/dev/null c 2 2
chown root:sys /chroot/dhcpd/dev/null
chmod 666 /chroot/dhcpd/dev/null
BPF="`ls -l /dev/bpf0 | awk '{ print $5; }' | sed -e 's/,//g'`"
export BPF
cd /usr/chroot/dhcpd/dev
mknod bpf0 c $BPF 0
mknod bpf1 c $BPF 1
chmod 0600 bpf*
cp /usr/lib/libc.so.5 /usr/chroot/dhcpd/usr/lib/libc.so.5
cp /usr/libexec/ld-elf.so.1 /usr/chroot/dhcpd/usr/libexec/ld-elf.so.1
cp /usr/local/etc/dhcpd.conf /usr/chroot/dhcpd/usr/local/etc/dhcpd.conf
cp /usr/local/sbin/dhcpd /usr/chroot/dhcpd/usr/local/sbin/dhcpd
cp /var/db/dhcpd* /usr/chroot/dhcpd/var/db/
now test it
chroot /usr/chroot/dhcpd /usr/local/sbin/dhcpd
congrats... now just edit your startup file.. now i'm on strike until elmore shows me that vpn howto :P
so i thought i would make a series of howto's on chrooting various applications..
I'm going to make the assumption you arlready have it installed and configured and working properly.. if not then do that..
the scope of this howto is just to simply chroot it.
mkdir -p /usr/chroot/dhcpd
mkdir -p /usr/chroot/dhcpd/dev
mkdir -p /usr/chroot/dhcpd/etc
mkdir -p /usr/chroot/dhcpd/usr/lib
mkdir -p /usr/chroot/dhcpd/usr/libexec
mkdir -p /usr/chroot/dhcpd/usr/local/sbin
mkdir -p /usr/chroot/dhcpd/usr/local/etc
mkdir -p /usr/chroot/dhcpd/var/db
mkdir -p /usr/chroot/dhcpd/var/run
mknod /usr/chroot/dhcpd/dev/null c 2 2
chown root:sys /chroot/dhcpd/dev/null
chmod 666 /chroot/dhcpd/dev/null
BPF="`ls -l /dev/bpf0 | awk '{ print $5; }' | sed -e 's/,//g'`"
export BPF
cd /usr/chroot/dhcpd/dev
mknod bpf0 c $BPF 0
mknod bpf1 c $BPF 1
chmod 0600 bpf*
cp /usr/lib/libc.so.5 /usr/chroot/dhcpd/usr/lib/libc.so.5
cp /usr/libexec/ld-elf.so.1 /usr/chroot/dhcpd/usr/libexec/ld-elf.so.1
cp /usr/local/etc/dhcpd.conf /usr/chroot/dhcpd/usr/local/etc/dhcpd.conf
cp /usr/local/sbin/dhcpd /usr/chroot/dhcpd/usr/local/sbin/dhcpd
cp /var/db/dhcpd* /usr/chroot/dhcpd/var/db/
now test it
chroot /usr/chroot/dhcpd /usr/local/sbin/dhcpd
congrats... now just edit your startup file.. now i'm on strike until elmore shows me that vpn howto :P