1. Install Services for NFS:
servermanagercmd.exe -install FS-NFS-Services
2. Verify NFS server configuration:
nfsadmin server config
3. Create NFS distribution folder:
mkdir v:\nfs
nfsshare nfs=v:\nfs -o root unmapped=yes anonuid=65534 anongid=65534
nfsshare nfs=v:\nfs -o root unmapped=yes anonuid=65534 anongid=65534
4. Copy FreeBSD distribution files from the media. For example, create nfs\FreeBSD\%PROCESSOR_ARCHITECTURE%\8.2-RELEASE, and copy there contents of the 8.2-RELEASE along with boot and packages folders.
5. Make modified versions of FreeBSD's pxeboot for all required FreeBSD releases/architectures.
Sample patch for 8.2-RELEASE:
--- sys/boot/i386/libi386/pxe.h.orig 2011-05-04 14:12:52.000000000 +0400
+++ sys/boot/i386/libi386/pxe.h 2011-05-04 14:13:48.000000000 +0400
@@ -61,7 +61,7 @@
#define MAC_ARGS(mac) \
mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]
-#define PXENFSROOTPATH "/pxeroot"
+#define PXENFSROOTPATH "/nfs/FreeBSD/8.1-RELEASE/amd64"
typedef struct {
uint16_t offset;
--- sys/boot/i386/libi386/pxe.c.orig 2011-05-04 14:16:45.000000000 +0400
+++ sys/boot/i386/libi386/pxe.c 2011-05-04 14:17:17.000000000 +0400
@@ -282,7 +282,7 @@
bootp(pxe_sock, BOOTP_PXE);
if (rootip.s_addr == 0)
rootip.s_addr = bootplayer.sip;
- if (!rootpath[0])
+ if (!rootpath[1])
strcpy(rootpath, PXENFSROOTPATH);
for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++)
Note. For 8.0-RELEASE only change PXENFSROOTPATH in sys/boot/i386/libi386/pxe.h; there's no need to modify pxe.c.
6. Make everything in /sys/boot:
cd /sys/boot && make clean obj all
7. Create appropriate FreeBSD boot folders for all required releases & architectures on the deployment server, e.g. for 8.2-RELEASE:
set RISBoot=V:\RemoteInstall\Boot
for %a in (x86 x64) do mkdir %RISBoot%\%a\pxelinux\FreeBSD_8_2
:: i386 can be installed on x64
cd %RISBoot%\x64\pxelinux\FreeBSD_8_2 && mklink /J i386 %RISBoot%\x86\pxelinux\FreeBSD_8_2
8. Copy modified pxeboot files from /usr/obj/usr/src/sys/boot/i386/pxeldr/pxeboot to appropriate FreeBSD boot folders on the deployment server.
9. Add FreeBSD entries to pxelinux.cfg\default configuration files, e.g. for 8.2-RELEASE:
LABEL freebsd82
MENU LABEL ^FreeBSD 8.2-RELEASE/amd64
PXE FreeBSD_8_2\pxeboot
LABEL freebsd82-i386
MENU LABEL FreeBSD 8.2-RELEASE/i386
PXE FreeBSD_8_2\i386\pxeboot
No comments:
Post a Comment