Linux 的 hostid 的算法是用 $HOSTNAME 反查, 得到 IP, IP 四個數字轉 Hex, 再做 2143 順位的轉換
例如: IP 是 192.168.0.1
轉 Hex 是 c0a80001, 再做 2143 順位轉換得 a8c00100
下面這段 script 相當於取 hostid
IP=`gethostip $HOSTNAME | awk '{print $NF}'`
echo ${IP:2:2}${IP:0:2}${IP:6:2}${IP:4:2}
Linux: October 2005 Archives
Serial Console 在沒有 VGA 的環境下很好用
FreeBSD 的 Serial Console 設定
在 /boot/loader.conf 加上 'console="comconsole"
編輯 /etc/ttys 的 ttyd0 那行
ttyd0 "/usr/libexec/getty std.9600" vt100 on secure
很簡單吧, Kernel 不要忘記加上 COM Port 的支援 (device sio0)
ref. FreeBSD Handbook: 21.6 Setting Up the Serial Console
Linux 的 Serial Console 設定
有 Boot Loader, Kernel 參數, inittab 三個地方要設
以 GRUB 為例, 在 menu.lst 前加入
serial --unit=0 --speed=9600
terminal serial
在 kernel 那一行的最後加上 console=tty0 console=ttyS0,9600
在 /etc/inittab 最後加上 s0:2345:respawn:/sbin/agetty ttyS0 115200 linux
ref. Using GRUB via a serial line, Linux Serial Console
支援 Serial 的 Terminal 軟體, X 下有不少, for Windows 最基本的就是 Windows 附的超級終端機,
商業軟體 SecureCRT, PowerTerm 都不錯,
也是有 Open Source 如 RealTerm, 但功能較差.
October 2009: Monthly Archives
- October 2009 (1)
- September 2009 (3)
- August 2009 (1)
- July 2009 (1)
- June 2009 (1)
- April 2009 (3)
- March 2009 (1)
- December 2008 (2)
- October 2008 (2)
- September 2008 (2)
- July 2008 (5)
- June 2008 (2)
- April 2008 (3)
- March 2008 (2)
- February 2008 (1)
- January 2008 (2)
- October 2007 (6)
- September 2007 (1)
- August 2007 (1)
- May 2007 (1)
- October 2006 (1)
- August 2006 (2)
- May 2006 (1)
- March 2006 (1)
- January 2006 (1)
- November 2005 (1)
- October 2005 (2)
- May 2005 (3)
- February 2005 (2)
- January 2005 (5)
- December 2004 (1)
- November 2004 (2)
- October 2004 (1)
- September 2004 (1)
- August 2004 (3)
- July 2004 (3)
- June 2004 (4)
- April 2004 (4)
- March 2004 (1)
- February 2004 (1)
- January 2004 (1)
- December 2003 (2)
- November 2003 (3)
- October 2003 (2)
- August 2003 (2)
- July 2003 (1)
Categories
Monthly Archives
- October 2009 (10)
- September 2009 (14)
- August 2009 (10)
- July 2009 (6)
- June 2009 (5)
- May 2009 (3)
- April 2009 (12)
- March 2009 (18)
- February 2009 (7)
- January 2009 (14)
- December 2008 (15)
- November 2008 (12)
- October 2008 (9)
- September 2008 (10)
- August 2008 (13)
- July 2008 (28)
- June 2008 (17)
- May 2008 (13)
- April 2008 (15)
- March 2008 (7)
- February 2008 (5)
- January 2008 (2)
- November 2007 (4)
- October 2007 (8)
- September 2007 (7)
- August 2007 (3)
- July 2007 (10)
- June 2007 (4)
- May 2007 (5)
- April 2007 (9)
- March 2007 (11)
- February 2007 (7)
- January 2007 (4)
- December 2006 (9)
- November 2006 (14)
- October 2006 (10)
- September 2006 (9)
- August 2006 (6)
- July 2006 (15)
- June 2006 (22)
- May 2006 (17)
- April 2006 (13)
- March 2006 (18)
- February 2006 (10)
- January 2006 (28)
- December 2005 (17)
- November 2005 (15)
- October 2005 (18)
- September 2005 (24)
- August 2005 (39)
- July 2005 (14)
- June 2005 (22)
- May 2005 (32)
- April 2005 (27)
- March 2005 (32)
- February 2005 (20)
- January 2005 (38)
- December 2004 (49)
- November 2004 (38)
- October 2004 (24)
- September 2004 (23)
- August 2004 (38)
- July 2004 (39)
- June 2004 (38)
- May 2004 (17)
- April 2004 (32)
- March 2004 (15)
- February 2004 (6)
- January 2004 (19)
- December 2003 (19)
- November 2003 (15)
- October 2003 (15)
- September 2003 (12)
- August 2003 (20)
- July 2003 (26)
Search
凱莉手工坊
October 2009
About this Archive
This page is a archive of entries in the Linux category from October 2005.
Linux: May 2005 is the previous archive.
Linux: November 2005 is the next archive.
Find recent content on the main index or look in the archives to find all content.