1: # My NetBSD cheat sheet
2:
3: Various tasks I use to do on my NetBSD systems.
4:
5: ## Specify an IP address for your NIC
6:
7: [[!template id=programlisting text="""
8: $ cat /etc/ifconfig.fxp0
9: up
10: inet 192.168.0.1 netmask 0xffffff00
11: """]]
12:
13: ## Add an IP alias on a NIC
14:
15: [[!template id=programlisting text="""
16: $ cat /etc/ifconfig.fxp0
17: up
18: inet 192.168.0.1 netmask 0xffffff00
19: inet 172.16.0.1 netmask 0xffffffff alias
20: """]]
21:
22: ## NIC will retrieve its IP address via DHCP
23:
24: [[!template id=programlisting text="""
25: $ cat /etc/ifconfig.re0
26: !dhcpcd $int
27: """]]
28:
29: ## Add a static route when bringing up NIC
30:
31: [[!template id=programlisting text="""
32: $ cat /etc/ifconfig.re0
33: up
34: !dhcpcd $int
35: !route -n add -net 10.0.0.0/8 192.168.0.254
36: """]]
37:
38: ## Specify a media type for a NIC
39:
40: [[!template id=programlisting text="""
41: $ cat /etc/ifconfig.re0
42: media 100baseTX up
43: !dhcpcd $int
44: """]]
45:
46: ## Add an IPv6 address to a NIC
47:
48: [[!template id=programlisting text="""
49: $ cat /etc/ifconfig.re0
50: media 100baseTX up
51: !dhcpcd $int
52: inet6 2001:dead:beef:1::1 prefixlen 64
53: """]]
54:
55: ## Upgrade the system with binaries
56:
57: [[!template id=programlisting text="""
58: # cp /netbsd /netbsd.old
59: # tar zxvfp kern-MONOLITHIC.tgz -C /
60: # sync; sync
61: # shutdown -r now
62: # for i in base comp games man misc modules tests text xbase xcomp xetc xfont xserver; do tar zxvfp $i.tgz -C /;done
63: # mkdir /tmp/temproot
64: # tar zxvfp etc.tgz -C /tmp/temproot
65: # postinstall -s /tmp/tmproot check
66: # # copy postinstall's requirements
67: # etcupdate -s /tmp/tmproot
68: # shutdown -r now
69: """]]
70:
71: ## Upgrade the system with sources
72:
73: * Build the userland
74:
75: [[!template id=programlisting text="""
76: # cd /usr/src
77: # ./build.sh -O ../obj -T ../tools -j#jobs -U distribution
78: """]]
79:
80: * Build the kernel
81:
82: [[!template id=programlisting text="""
83: # cd /usr/src
84: # ./build.sh -O ../obj -T ../tools -j#jobs kernel=YOUR_KERNEL
85: """]]
86:
87: * Install the new kernel
88:
89: [[!template id=programlisting text="""
90: # cd /usr/src
91: # cp /netbsd /netbsd.old
92: # cp /usr/obj/sys/arch/YOUR_ARCH/compile/YOUR_KERNEL/netbsd /
93: # shutdown -r now
94: # cd /usr/src
95: # ./build.sh -O ../obj -T ../tools -U install=/
96: # /usr/sbin/etcupdate -s /usr/src
97: """]]
98:
99: ## Adobe Flash
100:
101: [[!template id=programlisting text="""
102: # echo "procfs /emul/linux/proc procfs ro,linux" >> /etc/fstab
103: # mount /emul/linux/proc
104: # cd /usr/pkgsrc/www/nspluginwrapper
105: # make install
106: # cd /usr/pkgsrc/multimedia/ns-flash
107: # make install
108: $ nspluginwrapper -i /usr/pkg/lib/netscape/plugins/libflashplayer.so
109: """]]
110:
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb