Annotation of wikisrc/users/imil/cheatsheet.mdwn, revision 1.6
1.6 ! imil 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: """]]
1.1 imil 54:
55: ## Upgrade the system with binaries
56:
1.3 imil 57: [[!template id=programlisting text="""
1.6 ! imil 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
1.3 imil 69: """]]
1.1 imil 70:
71: ## Upgrade the system with sources
72:
73: * Build the userland
74:
1.3 imil 75: [[!template id=programlisting text="""
1.6 ! imil 76: # cd /usr/src
! 77: # ./build.sh -O ../obj -T ../tools -j#jobs -U distribution
1.4 imil 78: """]]
1.1 imil 79:
80: * Build the kernel
81:
1.3 imil 82: [[!template id=programlisting text="""
1.6 ! imil 83: # cd /usr/src
! 84: # ./build.sh -O ../obj -T ../tools -j#jobs kernel=YOUR_KERNEL
1.4 imil 85: """]]
1.1 imil 86:
87: * Install the new kernel
88:
1.3 imil 89: [[!template id=programlisting text="""
1.6 ! imil 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
1.4 imil 97: """]]
1.1 imil 98:
99: ## Adobe Flash
100:
1.3 imil 101: [[!template id=programlisting text="""
1.6 ! imil 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
1.4 imil 109: """]]
1.3 imil 110:
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb