Screaming Electron Forums

Go Back   Screaming Electron Forums > How-To's & Testimonials > How-To's
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old September 3rd, 2003
soup4you2's Avatar
soup4you2 soup4you2 is offline
Electron
 
Join Date: Jan 2003
Posts: 1,055
soup4you2 is on a distinguished road
Default

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
__________________
"Tomorrow will be canceled due to lack of interest."

http://bsd.box.sk
http://bsdhound.com
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 23:40.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
This Page hosted by Network Synapse