Changes between Version 3 and Version 4 of TestingViaNFS
- Timestamp:
- Jun 19, 2009, 7:02:31 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TestingViaNFS
v3 v4 1 In order to test [wiki:NanoBSD WL NanoBSD] there are various options available. One of them is via NFS1 In order to test [wiki:NanoBSD NanoBSD WirelessLeiden image] there are various options available. One of them is via NFS 2 2 3 XXX: Make pretty document, with some explanations 3 '''XXX: Make pretty document, with some explanations''' 4 5 = Initial procedure = 6 7 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. 8 9 == Install packages == 10 {{{ 11 $ pkg_add -r isc-dhcp3-server 12 }}} 13 14 == Create/alter files == 15 Hints provided below, use common sense and ask questions on the mailinglist if you do not seems to get a bit. 4 16 5 17 {{{ 6 %cat /etc/rc.conf18 $ cat /etc/rc.conf 7 19 hostname="richard.wleiden.net" 8 20 ifconfig_xl0="inet 172.19.137.70/27" … … 28 40 29 41 {{{ 30 %cat /etc/exports31 / data-alldirs -maproot=root -network 192.168.4.0/2432 / data -alldirs -maproot=root 127.0.0.142 $ cat /etc/exports 43 /usr/data/base -alldirs -maproot=root -network 192.168.4.0/24 44 /usr/data -alldirs -maproot=root -network 192.168.4.0/24 33 45 }}} 34 46 35 47 {{{ 36 %cat /usr/local/etc/dhcpd.conf48 $ cat /usr/local/etc/dhcpd.conf 37 49 # ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates. 38 50 ddns-update-style ad-hoc; … … 50 62 51 63 filename "pxeboot"; 52 option root-path "192.168.4.1:/ data";64 option root-path "192.168.4.1:/usr/data/base"; 53 65 } 54 66 }}} 55 67 56 68 {{{ 57 %grep -v '#' /etc/inetd.conf69 $ grep -v '#' /etc/inetd.conf 58 70 tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot 59 71 }}} 60 72 61 73 {{{ 62 #mkdir /tftpboot63 #cp /boot/pxeboot /tftpboot74 $ mkdir /tftpboot 75 $ cp /boot/pxeboot /tftpboot 64 76 }}} 65 77 66 78 {{{ 67 %grep 'rpcbind :' /etc/hosts.allow79 $ grep 'rpcbind :' /etc/hosts.allow 68 80 #rpcbind : 192.0.2.32/255.255.255.224 : allow 69 81 #rpcbind : 192.0.2.96/255.255.255.224 : allow … … 73 85 74 86 {{{ 75 # mkdir /data 76 # MD=`mdconfig -a -t vnode -f /usr/obj/nanobsd.wleiden/_.disk.image` 77 # mount /dev/${MD}a /data 87 $ mkdir -p /usr/data/{base,nfs,cfg} 78 88 }}} 89 90 == Restart services == 91 '''XXX: Write proper list of services to restart w/o rebooting (take special care of NFS)''' 92 {{{ 93 $ reboot 94 }}} 95 96 = Usage procedure = 97 1. Make sure you [wiki:NanoBSD build yourself an nanobsd image] 98 1. Choose NFS testing variant: 99 a. Start fresh (no old configuration) 100 {{{ 101 $ /root/nanobsd/tools/prepare-nfs.sh 102 }}} 103 b. Use old configuration 104 {{{ 105 $ /root/nanobsd/tools/prepare-nfs.sh -n 106 }}} 107 1. When done, 'unload' image 108 {{{ 109 $ /root/nanobsd/tools/prepare-nfs.sh -u 110 }}} 111 112 = Background = 113 * 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 114 * '/cfg' will be stored on the target machine under `/usr/data/cfg` 115 116 = Hints = 79 117 80 118 {{{