| | 1 | In order to test NanoBSD there are various options available. One of them is via NFS |
| | 2 | |
| | 3 | XXX: Make pretty document |
| | 4 | |
| | 5 | {{{ |
| | 6 | %cat /etc/rc.conf |
| | 7 | hostname="richard.wleiden.net" |
| | 8 | ifconfig_xl0="inet 172.19.137.70/27" |
| | 9 | defaultrouter="172.19.137.66" |
| | 10 | |
| | 11 | sshd_enable="YES" |
| | 12 | |
| | 13 | # |
| | 14 | # PXEboot envirionment |
| | 15 | ifconfig_bfe0="inet 192.168.4.1/24" |
| | 16 | |
| | 17 | # DHCPD server, ip address, options, hints |
| | 18 | dhcpd_enable="YES" |
| | 19 | |
| | 20 | # TFTP server, initial boot |
| | 21 | inetd_enable="YES" |
| | 22 | |
| | 23 | # NFS server, kernel and more |
| | 24 | nfs_server_enable="YES" |
| | 25 | rpcbind_enable="YES" |
| | 26 | mountd_flags="-r" |
| | 27 | }}} |
| | 28 | |
| | 29 | {{{ |
| | 30 | %cat /etc/exports |
| | 31 | /data -alldirs -maproot=root -network 192.168.4.0/24 |
| | 32 | /data -alldirs -maproot=root 127.0.0.1 |
| | 33 | }}} |
| | 34 | |
| | 35 | {{{ |
| | 36 | %cat /usr/local/etc/dhcpd.conf |
| | 37 | # ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates. |
| | 38 | ddns-update-style ad-hoc; |
| | 39 | |
| | 40 | default-lease-time 600; |
| | 41 | max-lease-time 7200; |
| | 42 | authoritative; |
| | 43 | |
| | 44 | option domain-name "example.com"; |
| | 45 | option domain-name-servers 192.168.4.1; |
| | 46 | option routers 192.168.4.1; |
| | 47 | |
| | 48 | subnet 192.168.4.0 netmask 255.255.255.0 { |
| | 49 | range 192.168.4.10 192.168.4.100; |
| | 50 | |
| | 51 | filename "pxeboot"; |
| | 52 | option root-path "192.168.4.1:/data"; |
| | 53 | } |
| | 54 | }}} |
| | 55 | |
| | 56 | {{{ |
| | 57 | %grep -v '#' /etc/inetd.conf |
| | 58 | tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot |
| | 59 | }}} |
| | 60 | |
| | 61 | {{{ |
| | 62 | # mkdir /tftpboot |
| | 63 | # cp /boot/pxeboot /tftpboot |
| | 64 | }}} |
| | 65 | |
| | 66 | |
| | 67 | |
| | 68 | {{{ |
| | 69 | # mkdir /data |
| | 70 | # MD=`mdconfig -a -t vnode -f /usr/obj/nanobsd.wleiden/._disk.image` |
| | 71 | # mount /dev/${MD}a /data |
| | 72 | }}} |