PXE Installation

Marten Vijn info at martenvijn.nl
Sun Jan 22 02:02:44 PST 2006


On Fri, 2006-01-20 at 03:36 +0100, Karel Miklav wrote: 
> Hi,
> 
> I'm trying to install FreeBSD 6.0 to a sub-notebook without
> floppy or optical unit. 
> <cut>
> 
> Please give me a hand, I'm playing with this for whole week.
> 
nice game aint it? sure of your friends is tcpdump :)


steps to follow (more below), create:

1 pxeboot
2 exports a nfs bootdir 
3 populate bootdir
4 config dhcpd.conf
5 add hosts to dns or /etc/hosts
6 proper config for the bootdir

1. pxe

   mkdir /tftboot
   cp /boot/pxeboot /tftboot/
   change in /etc/inetd.conf (remove #)

   #tftp   dgram   udp     wait    root    /usr/libexec/tftpd
   tftpd -l -s /tftpboot
  to
   tftp   dgram   udp     wait    root    /usr/libexec/tftpd
   tftpd -l -s /tftpboot

   /etc/rc.d/inetd restart

2. exports a nfs bootdir

  add this line to /etc/exports

/usr/   -maproot=0 -alldirs

add to /etc/rc.conf:
rpcbind_enable="yes"
nfs_server_enable="yes"

reboot (or restart this services nfsd mountd)

3. populate bootdir

cd /usr/src
make buildworld
make buildkernel
make installworld DESTDIR=/usr/bootdir
make distribution DESTDIR=/usr/bootdir
make installkernel DESTDIR=/usr/bootdir

4. add someting like this to your /usr/local/etc/dhcpd.conf

host workstation {
  hardware ethernet 00:13:d4:22:69:0c;
  fixed-address 192.168.1.6;
  filename "pxeboot";
  option root-path "192.168.1.2:/usr/workstation";
  option domain-name "martenvijn.nl";
  option domain-name-servers 192.168.1.2;
}


change the ipnumbers for your ipspace, macaddress and local config

sh /usr/local/etc/rc.d/isc-dhcpd.sh restart

5. in the hostfiles in /etc/hosts and /bootdir/etc/hosts 

  192.168.1.6  bert
  192.168.1.2  ernie

  I use dns for this.

6. in /usr/bootdir/etc/rc.conf

  hostname="workstation.martenvijn.nl"
  rpcbind_enable="yes"
  nfs_client_enable="yes"
  populate_var="yes"

in /usr/bootdir/etc/fstab

192.168.1.2:/usr/bootdir /       nfs rw,soft,lockd       0       0
md                      /var    mfs     rw,-s64m,-M     2       0
md                      /tmp    mfs     rw,-s64m,-M     2       0


This should be it. boot laptop and run sysinstall.

Note: This not a very secure setup, 


cheers Marten





More information about the freebsd-stable mailing list