openvpn server in a jail

2008-04-21 Thread Rek Jed

Hi,

Is it possible to run an openvpn server inside of a FreeBSD jail?

Cheers,

Rek.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pxeboot, TFTP only, NFS MOUNT RPC error: 60, timeout

2008-02-08 Thread Rek Jed

Erik Norgaard wrote:
OK, two things remain: Are you sure that it doesn't correctly fetch 
the kernel with tftp and then the kernel tries to mount a root device 
with nfs?
When I build the pxeloader with LOADER_TFTP_SUPPORT=YES it will fetch 
the kernel from tftp just fine, but after the NFS gracefully times out.  
It will also fetch  mount the root device from tftp ok.  It's just a 
bit annoying that I have to wait 2 extra minutes every time I need to 
install a box (I do this quite often), and look for workarounds for 
something that should just work.  But then, I'm a sysadmin not a 
developer so it might be easy for me to say.  I cannot actually fix it 
myself.
If the kernel is compiled with the slightest mention of nfs as root 
device it will use nfs, no matter that you have specified otherwise in 
loader.conf. The generic kernel has NFS_ROOT and NFS_CLIENT, since 
your root device is not NFS then you can leave out both. I recall 
having problems leaving in NFS_CLIENT although NFS_ROOT was not included.
I don't bother compiling a kernel for this at the moment.   I just 
copied the contents of /boot from a FreeBSD CD to the root of my tftp 
server.  Then I copied the custom build loader files so that I can boot 
from tftp instead of nfs:


boot0
boot1
boot2
loader.conf
loader.rc
mbr
pxeboot

Then I mount the stock mfsroot and copy my install.cfg over to script 
sysinstall.  I've actually got a script that I can use to easily update 
install.cfg when needed.


The idea behind all this is to keep it as simple to setup as possible so 
that me and my fellow network engineers at work can use this on their 
laptops without spending too much time on setting it up.  This way if we 
need to install/re-install a box on a clients site we just rock up, run 
a few commands or a script to set the laptop in jumpstart mode (once the 
main thing has been setup it's just a matter of reconfiguring an 
interface and starting a few services), plug it in to the box, netboot 
and while the box is reinstalling we can have a chat with the client, 
see how things are going, look good and provide a better service.   This 
also means that we always start with a machine that is in a know state.  
It's something that is almost impossible to achieve when installing by 
hand as everyone seems to do it differently.


I'm happy to share my docs once I've ironed it all out and tested properly.


Cheers,


Jedrek
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


pxeboot, TFTP only, NFS MOUNT RPC error: 60, timeout

2008-02-07 Thread Rek Jed

Hey,

I've been building FreeBSD jumpstart infrastructure and it mostly 
works.  I'm using tftp  to boot off the network in to scripted 
sysinstall.  I compiled the boot loader with tftp support but every time 
I boot it will first try nfs, then timeout after around two minutes (it 
cannot find nfs) and finally boot from tftp.  Is there any way that I 
can make it boot from tftp straight away rather than wait for nfs to 
timeout?


This is how I build the boot loader:

cd /usr/src/sys/boot
sudo make clean
sudo make LOADER_TFTP_SUPPORT=YES
sudo cp i386/pxeldr/pxeboot /jumpstart/tftpd/boot/pxeboot.0
sudo cp i386/boot0/boot0 /jumpstart/tftpd/boot/
sudo cp i386/boot2/boot1 /jumpstart/tftpd/boot/
sudo cp i386/boot2/boot2 /jumpstart/tftpd/boot/
sudo cp i386/mbr/mbr /jumpstart/tftpd/boot/

This is my loader.conf:

# loader.conf
init_path=/stand/sysinstall
rootfs_load=YES
rootfs_name=/boot/mfsroot
rootfs_type=mfs_root
vfs.root.mountfrom=ufs:/dev/md0c
autoboot_delay=0

And loader.rc:

#loader.rc
echo hopping the kernel...
include /boot/loader.4th
start


Many thanks,


Jedrek
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pxeboot, TFTP only, NFS MOUNT RPC error: 60, timeout

2008-02-07 Thread Rek Jed

Hi Erik,

I wrote the howto refered to in other reply, it's a while ago I played 
with this, but I have no reason to think that much has changed on the 
6.x branch, I have just tried 7.x and build of the loader this way fails.


I tried building it on 7.0-PRERELEASE and it builds fine for me.
Haven't tested if it works yet, but will do in a moment.



When building the loader make sure that your source tree is clean and 
/usr/obj is empty, or it won't work. I recall this puzzled me a long 
time until I found the trick. I don't think it is enough to do make 
clean.


Yes, I made sure that /usr/obj was empty.



# cd /usr/src/sys/boot
# make -DLOADER_TFTP_SUPPORT=YES


Originally I was doing this on 6.2.  I tried it again on a freshly
installed 6.3-RELEASE just now.  I made sure /usr/obj was empty and
build pxeboot using the above method, then copied it over to my
jumpstart server.  Unfortunately this didn't work.  It sat there for a
bit, then trowed  NFS MOUNT RPC error: 60 as usual and then sat there
forever (it never fetched the kernel).

I also tried building it like that:

# cd /usr/src/sys/boot
# make LOADER_TFTP_SUPPORT=YES  LOADER_NFS_SUPPORT=NO

This builds fine.  I copied it to my jumpstart server and it booted from
tftp after approx 2 min. pause and the NFS MOUNT RPC error: 60.  Can
anyone tell me whats the difference between -DLOADER_TFTP_SUPPORT=YES
and LOADER_TFTP_SUPPORT=YES?

I've been playing with thinbsd (http://www.thinbsd.org/) a while back.
It also boots from tftp without nfs and their boot loader works fine
(boots straight away).  Latest thinbsd is based on 5.4 so maybe it broke
in 6.x?  For a workaround I used pxeboot from thinbsd with my 6.3
jumpstart setup and it seems to work fine.  However this is quite dirty.


Cheers,


Jedrek


P.S
Thanks for the howto Erik, I found it really helpful.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: pxeboot, TFTP only, NFS MOUNT RPC error: 60, timeout

2008-02-07 Thread Rek Jed



I tried building it on 7.0-PRERELEASE and it builds fine for me.
Haven't tested if it works yet, but will do in a moment.


I can confirm that the same thing happens on 7.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]