Sei sulla pagina 1di 2

FreeBSD PXE SERVER HOWTO We are going to install an unattended FreeBSD installation server which basically consists on a dual

nic server; one for accessing to the machine (through ssh I mean) and the other one with a private networ used for unattended installations and dhcp leases and so! We will ma e that machines to be installed with our new unattended installation system to boot with with "#$ and later after loading ernel mount root using an mfsroot! Finally launch sysinstall scripted by install!cfg! First of all after a freebsd fresh install I install the dhcp server port % cd &usr&ports&net&dhcp'()server (now in *!+),$-$.S$/ it0s a $S1 version) ma e install clean -ater I configure dhcpd!conf li e % allow booting; allow bootp; authoritative; option domain)name 2freebsdp3e!ramattac !net2; option subnet)mas 455!455!455!+; default)lease)time 6++; ma3)lease)time 74++; ddns)update)style none; log)facility local7; local)address (+!+!+!(; subnet (+!+!+!+ netmas 455!455!455!+ 8 range (+!+!+!7+ (+!+!+!9+; ne3t)server (+!+!+!(; filename 2boot&p3eboot2; option root)path 2&e3pert&netboot&freebsd*+2; : I will use the tftp)server that comes with freebsd!!! so in inetd!conf % ;ncomment this % tftp dgram udp wait root &usr&libe3ec&tftpd tftpd )l )s &e3pert&netboot&freebsd*+ In &etc&e3ports % &e3pert )alldirs/ro )networ (+!+!+ )mas 455!455!455!+ <es readonly!!! nothing should be written to our nfs e3ported content! =ow let0s populate &e3pert&netboot&freebsd*+ with freebsd disc ( % tar )> &e3pert&netboot&freebsd*+ )p3vf *!+),$-$.S$)amd6')disc(!iso -ater in &e3pert&netboot&freebsd*+&boot&loader!conf ?ust to be this lines % mfsroot@loadA2<$S2 mfsroot@typeA2mfs@root2 mfsroot@nameA2&boot&mfsroot2 vfs!root!mountfromA2ufs%&dev&md+2

=ow lets do an automated sysintall (<es in *!+),$-$.S$ you could build release and generate isos that use sysinstall as installer) % cd &e3pert&netboot&freebsd*+&boot gBip )d mfsroot!gB =ow for being able to automate sysintall partitioning and so!!! sysinstall searches for install!cfg file in the root of the memory filesystem provided by mfsroot!!! mfsroot is a memory dis file for loader to be able to have a & partition!!! so we need to attach it to a device memory dis for the ernel and later mount that attached memory dis for copying there the install!cfg file % m dir &onemountpoint mdconfig )a )t vnode )f &e3pert&netboot&freebsd9&boot&mfsroot )u 4++ mount &dev&md4++ &onemountpoint ( I have used the 4++ number but really it0s optional you could not specify )u @@@ and it will be attached to the first free in numerical order ernel memory dis ) cp &locationofourdefinedinstallcfg&install!cfg &onemountpoint done CC %) =ow % cd & umount &onemountpoint .fter ensuring it0s unmounted!!! let0s remove our attached ernel memory dis !!! mdconfig )d )u 4++ We ensure it0s removed with and there0s no output % mdconfig )l =ow finally let0s configure &etc&rc!conf of our p3e server for launching all services automatically % DD "#$ services dhcpd@enableA2<$S2 dhcpd@ifacesA2f3p+2 (for e3ample for f3p+ interface) inetd@enableA2<$S2 rpcbind@enableA2yes2 mountd@enableA2yes2 nfs@server@enableA2yes2 =ow important!!! without doing this tftp server won0t be able to find p3eboot under &e3pert&netboot&freebsd*+&boot& (apart from avoiding other problems doing this) % chmod ), 755 &e3pert&netboot&freebsd*+ Ehat0s all %)! .ny doubts you can write me to egoitBFramattac !net!

Potrebbero piacerti anche