這邊說的是 FreeBSD 6.x (20060127 之後), 7.x 的用法,之前的可以看in2's Serial Console(他的不太對,最後還要用 bsdlabel(8) update Bootstraps 才對)。如果不是直接裝 20060127 以後的 6.x,請先用 bsdlabel(8) 更新過 Bootstraps 才行,否則認不得 -S 這個(可能要關掉 GEOM 防射腳,才能更新)。
device sio
-Dh -S115200
console="comconsole,vidconsole" comconsole_speed="115200" boot_multicons="YES" boot_serial="YES"
ttyu0 "/usr/libexec/getty std.115200" cons25 on secure
console:dv=/dev/cuad0:br#115200:pa=none:
/usr/bin/env HOME=/root TERM=cons25 LANG=C /usr/local/bin/screen -dm -c /root/screenrc-console defscrollback 20000 vbell off screen -t con /root/tip.sh con #!/bin/sh export HOME=/root export TERM=cons25 while true; do /usr/bin/tip $@ echo "sleep 10 secs" /bin/sleep 10 done
If you see 'panic: journal overflow', tune
kern.geom.journal.force_switch=50 kern.geom.journal.cache.switch=75
to force journal flush more frequently.
If kern.geom.journal.stats.wait_for_copy
is higher, tune
kern.geom.journal.parallel_copies=24 # default 16 kern.geom.journal.parallel_flushes=12 # default 16
to force gjournal copies data faster.
Increase gjournal cache (by increase total kernel memory)
vm.kmem_size_max=419430400
host pxe { hardware ethernet 00:11:22:33:44:55; fixed-address 10.0.0.1; next-server 10.0.0.254; # server ip (nfs, also for tftp server) # server-identifier 10.0.0.254; filename "/boot/pxeboot"; # relative to tftp root option root-path "/pxe/"; # bootonly, absolute path }
/pxe 10.0.0.1
/usr/libexec/tftpd -s /pxe
ipmitool -I open chassis status ipmitool -I open lan set 7 ipaddr 該網卡的IP ipmitool -I open lan set 7 netmask 該網卡的netmask ipmitool -I open lan set 7 defgw ipaddr 該網卡的DefaultGateway # 不見得 ipmitool -I open lan set 7 access on ipmitool -I open lan set 7 password 你的密碼 ipmitool -I open lan set 7 auth CALLBACK MD5 ipmitool -I open lan set 7 auth USER MD5 ipmitool -I open lan set 7 auth OPERATOR MD5 ipmitool -I open lan set 7 auth ADMIN MD5 ipmitool -I open lan set 7 user
ipmitool -A PASSWORD -I lan -H 該機器的ip -P 密碼 chassis status
Reference
fdisk -B -b /boot/boot0 device
F1 DOS F2 FreeBSD F3 Linux F4 ?? F5 Drive 1 Default: F2
bsdlabel -B diskslice
bsdlabel -B diskslice
/boot.config
from slice a
only>> FreeBSD/i386 BOOT Default: 0:ad(0,a)/boot/loader boot:
AFTERINSTALL
AFTERINSTALL = { '*' => proc { |origin| cmd_restart_rc(origin) }, }
daily_status_disks_enable="NO" daily_status_network_enable="NO" daily_status_security_chksetuid_enable="NO" daily_status_security_chkmounts_enable="NO" daily_status_security_ipfwdenied_enable="NO" daily_status_security_ipfdenied_enable="NO" daily_status_security_pfdenied_enable="NO" daily_status_security_ipfwlimit_enable="NO" daily_status_security_ip6fwdenied_enable="NO" daily_status_security_ip6fwlimit_enable="NO" daily_status_security_kernelmsg_enable="NO"
export FORCE_PACKAGE=1 export TRYBROKEN=1
export NOPORTDOCS=1 export NOPORTEXAMPLES=1 export NOPORTDATA=1 # no real benefits... #export NO_INSTALL_MANPAGES=1 export WITHOUT_NLS=1
export PREFIX=/usr/all-ports-go-here export LOCALBASE=${PREFIX} export X11BASE=${PREFIX}
export ARCH=i386 export MACHINE_ARCH=i386
ln -fs /path/to/tinderbox/scripts/contrib/hooks/kse-fix/libmap.conf patches/ cd scripts ./tc updateHookCmd -h prePortBuild -c contrib/hooks/kse-fix/kse-fix.sh
export defaultUpdateHost=freebsd.csie.org export defaultUpdateType=CSUP
DocumentRoot /home/tinderbox/scripts/webui Alias /logs/ "/home/tinderbox/logs/" Alias /packages/ "/home/tinderbox/packages/" Alias /errors/ "/home/tinderbox/errors/" #Alias /tb/ "/home/tinderbox/scripts/webui/" <Directory "/home/tinderbox/"> Order allow,deny Allow from all </Directory> <Directory "/home/tinderbox/packages/"> Order deny,allow Deny from all Allow from localhost </Directory>