# PXE Boot from Jails



## atwinix (Dec 21, 2010)

Hello All,

I am setting several dummy servers which will pxe-boot.  Does anyone know if I can make them pxe-boot from jails?

In that way, I can just set up several jails and make each of the server boot off their corresponding jail.

Any ideas?

Thanks,

atwinix


----------



## SirDice (Dec 21, 2010)

Yes, you can PXE boot of a jail. There's really nothing special about a PXE boot. It's just a combination of DHCP and NFS.

Handbook: 31.7 Diskless Operation


----------



## atwinix (Dec 21, 2010)

Thank you for your reply SirDice.  I have actually implemented PXE and jails already on my "PXE Server" by following the Diskless Operation guide.

I was just wondering how I can make my clients boot off from the jail.

So, I am thinking I should NFS mount a jail where option 
	
	



```
root-path "jail1_IP:/" and filename "jail_IP:/boot/pxeboot"
```

Does that sound about right?


----------



## y2s82 (Jan 1, 2011)

Do you think it'd be possible to run Xorg on jail-hosted pxe?  
I've read sites describing pxe and xorg setup and jail and pxe setup, but read posts that was rather negative on setting up jail and xorg due to permissions.  I think they are due to limitations on jail imposed by the host and no such limitation would exist on the thin client booting from pxe, but I've learned over and over that what I think is possible is not always so.  :s


----------



## atwinix (Jan 3, 2011)

I have tried pxe booting a jail after setting up this thread, but so far I have been unsuccessful.  Apparently jails cannot NFS export.  I keep getting errors.  

Has anyone ever tried this?

[I will try to get some of the messages from the error log when I get back to work.]


----------



## atwinix (Feb 9, 2011)

Ok, the next thing I just tried and tested is to check where the files get stored.  And good news is that addition/subtraction within a jail gets replicated to the main filesystem where the jail is stored.  So if you add a test.txt to your node (jail) in /root, that file will appear in /usr/jails/node/root under the host OS's filesystem.

Knowing this, I thought I could directly PXE-boot from a jail by NFS-exporting the /usr/jails but unfortunately the jails do not have any "kernel" to boot from?!! And an NFS mount cannot see the contents of the basejail and boot directories (/usr/jails/node/basejail and /usr/jails/node/boot).

Any ideas how to fix this?

Thanks,
atwinix


----------

