In order to test NanoBSD WirelessLeiden image there are various options available. One of them is via NFS
XXX: Make pretty document, with some explanations
Initial procedure
Note: All commands below needed to be executed by root
user. Make sure not to alter a production machine as you will most likely leave your machine vulnerable for attacked and undiscovered exploits. Also to be advised to have the machine run behind a NAT/firewall setup.
Install packages
$ pkg_add -r isc-dhcp3-server
Create/alter files
Hints provided below, use common sense and ask questions on the mailinglist if you do not seems to get a bit.
$ cat /etc/rc.conf hostname="richard.wleiden.net" ifconfig_xl0="inet 172.19.137.70/27" defaultrouter="172.19.137.66" sshd_enable="YES" # # PXEboot envirionment ifconfig_bfe0="inet 192.168.4.1/24" # DHCPD server, ip address, options, hints dhcpd_enable="YES" # TFTP server, initial boot inetd_enable="YES" # NFS server, kernel and more nfs_server_enable="YES" rpcbind_enable="YES" mountd_flags="-r"
$ cat /etc/exports /usr/data/base -alldirs -maproot=root -network 192.168.4.0/24 /usr/data -alldirs -maproot=root -network 192.168.4.0/24
$ cat /usr/local/etc/dhcpd.conf # ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates. ddns-update-style ad-hoc; default-lease-time 600; max-lease-time 7200; authoritative; option domain-name "example.com"; option domain-name-servers 192.168.4.1; option routers 192.168.4.1; subnet 192.168.4.0 netmask 255.255.255.0 { range 192.168.4.10 192.168.4.100; filename "pxeboot"; option root-path "192.168.4.1:/usr/data/base"; }
$ grep -v '#' /etc/inetd.conf tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot
$ mkdir /tftpboot $ cp /boot/pxeboot /tftpboot
$ grep 'rpcbind :' /etc/hosts.allow #rpcbind : 192.0.2.32/255.255.255.224 : allow #rpcbind : 192.0.2.96/255.255.255.224 : allow #rpcbind : ALL : deny
$ mkdir -p /usr/data/{base,nfs,cfg}
Restart services
XXX: Write proper list of services to restart w/o rebooting (take special care of NFS)
$ reboot
Usage procedure
- Make sure you build yourself an nanobsd image
- Choose NFS testing variant:
- Start fresh (no old configuration)
$ /root/nanobsd/tools/prepare-nfs.sh
- Use old configuration
$ /root/nanobsd/tools/prepare-nfs.sh -n
- Start fresh (no old configuration)
- When done, 'unload' image
$ /root/nanobsd/tools/prepare-nfs.sh -u
Background
- Inside your booted image
/nfs
will be mounted to your target machine directory/usr/data/nfs
pointers to pre-build images (for direct burn to CF disk) also exists in this directory cfg
will be stored on the target machine under/usr/data/cfg
Hints
%cat ~/.cshrc alias serial sudo cu -s 9600 -l /dev/cuaU0 alias on sispmctl -o all alias off sispmctl -f all alias toggle sispmctl -t all
Last modified
16 years ago
Last modified on Jun 19, 2009, 7:02:53 AM
Note:
See TracWiki
for help on using the wiki.