2008年1月22日 星期二

Windows Startup

Windows Startup Disk includes:
  1. Ntldr
  2. Ntdetect.com
  3. Boot.ini
  4. Ntbootdd.sys


Windows Boot:
  1. After the power-on self test(POST) loads the system BIOS into memory. the BIOS reads the contents of the master boot record(MBR). The MBR takes control, finds the active partition, and loads the boot sector from the active partition.
  2. The boot sector program reads the root directory and loads Windows Loader(NTLDR).
  3. NTLDR loads the basic memory configuration and switches to 32-bit mode(protected mode). NTLDR then places itself into high memory to free as much memory space as possible.
  4. NTLDR reads boot.ini to find the operation system. If boot.ini is not present, NTLDR assumes the Windows OS is in the C:\Windows directory.
  5. NTLDR switches back to 16-bit mode and loads ntdetect.com, which is a 16-bit aplication. NTDETECT determines the computer's physical environment. This determination occurs every time Windows OS starts, so the environment can change for each boot.
  6. NTLDR loads into memory and reads the resource map that NTDETECT builds.
  7. NTLDR switches the system back to protected mode. NTLDR then sets up the ring 0 mode for the kernel and loads the proper kernel(NTOSKRNL) for the computer. NTLDR pulls in the proper Hardware Abstraction Layer(HAL) and all boot drivers. Everything that NTDETECT collects becomes the HKEY_LOCAL_MACHINE/HARDWARE Registry key.
  8. NTLDR starts the run process for NTOSKRNL.

2008年1月17日 星期四

在Windows環境安裝Subversion

最近有感於版本控制的重要性, 也想做些文件管理的工作, 因此安裝了Subversion, Subversion是一套open source的版本控制軟體, 使用client-server架構, 在檔案傳輸方法, 可使用HTTP標準WebDAV或是Subversion提供的Svnserve, 本文以Apache實作...

使用的軟體版本為
- Apache HTTP Server v2.0.54
- Subversion v1.4.6
- TortoiseSVN v1.4.7 Build 11792

相關的文件
- 英文原廠手冊(v1.4.7)
- 繁體中文手冊(v1.4)
- 簡體中文手冊(v1.4.7)

由於所抓的檔案都是binary, 因此都設定的差不多了, 步驟如下
1) 安裝Apache HTTP Server
2) 安裝Subversion, 此一安裝將會在http.conf中新增兩行(若Subversion使用預設安裝)
LoadModule dav_svn_module "C:/Program Files/Subversion/bin/mod_dav_svn.so"
LoadModule authz_svn_module "C:/Program Files/Subversion/bin/mod_authz_svn.so"
3) 設定檔案庫, 修改http.conf(範例)
<Location /svn/myprj>
DAV svn
SVNPath c:/svn/MyProject
</Location>
4) 建立檔案庫
mkdir c:\svn
mkdir c:\svn\MyProject
svnadmin create c:\svn\MyProject
5) 測試
以瀏覽器開啟 http://localhost/svn/myprj, 看是否出現Revision 0:/字樣
6) 安裝TortoiseSVN
  • 若不習慣使用命令列作業, 可安裝GUI介面的用戶端TortoiseSVN, 安裝好後, 習慣使用才是最需要時間的, 一般只要學會checkout/update/add/commit就可以輕輕鬆鬆進行版本管理
7) 使用TortoiseSVN的plugin
  • 若要配合平日的開發作業, 可另外下載Visual Studio的plugin或是Notepad++的plugin, 這些plugin將會整合在軟體中, 可直接進行svn的操作
本次安裝除了參考原廠手冊外, 還有蔡煥麟, 陳小春的經驗分享, 裡面有些問題排除的情境, 寫的很詳細

2008年1月10日 星期四

FreeBSD之使用者帳號建立

從Linux轉換到FreeBSD, 第一步就踢到鐵板 @@"

FreeBSD的使用者帳號建立有兩招,
第一招是使用互動式命令列adduser, 第二招是修改/etc/passwd和/etc/group和建立home目錄後再pwd_mkdb,
pwd_mkdb步驟是根據/etc/passwd所讀入的檔案, 產生帳號資料庫...
似乎比較麻煩, 但事實上系統為了存取效率, 實際上系統並沒有直接使用passwd及master.passwd兩個文字檔, 而是將之轉成database型式的另外兩個檔案pwd_db及spwd_db, 這是由指令pwd_mkdb所產生的(本句轉載自成大turtle)

由以上可知, FreeBSD之帳號資料不真正儲存於/etc/passwd, /etc/group, /etc/master.passwd, 若不進行pwd_mkdb, 一切都是假的...
可由chpass修改帳號資料後出現的錯誤訊息(chpass: entry inconsistent)看出,
而指令id則是讀取pwd_db及spwd_db內真正之帳號資料...

而刪除帳號簡單多了, 只要刪除/etc/passwd, /etc/group使用者資料, 刪除/home, /var/mail目錄即可...

最後順便註記一下, FreeBSD和Linux小地方的差異, 例如
#chown -R USER:USER /tmp/DIR //FreeBSD和Linux都可
#chown USER:USER -R /tmp/DIR //FreeBSD出現錯誤訊息(chown: -R: No such file or directory)

2008年1月1日 星期二

AVI轉WMV工具

這篇是為了Windows Media Service暖身

由於Media Service可接受的格式不多, 因此我要找些轉檔工具方便服務提供...

WinAVI video Converter 8.0
- 軟體下載點
- 參考資訊連結

老調

2007走了, 2008來了, 老調又要重彈了...

今年的最大改變應該是心境的轉變吧,

出國唸書一直是我的夢想, 也一直掛在嘴巴上講,

但是 現在覺得, 如果我真的這麼想唸, 也許五十歲再申請看看吧...

如果我的熱情還沒熄滅的話...

除了這個老調以外, 2008年的展望...

太多了 族繁不及備載,

將會在後面的文章繼續提到,

2007 掰掰

2007年12月27日 星期四

Qualified Google Advertising Professional

今天無意間逛到的, 原來Google也有做外部的認證..

Google認證廣告專家(Qualified Google Advertising Professional),

這是某位專家的Blog,

介紹Google AdWords服務的申請與運作...

2007年12月13日 星期四

Embedded Linux

最近這幾天在上課... Embedded Linux
課程時間短, 因此內容並沒有很深入,
而教學內容不外乎介紹linux programming和如何porting,
還使用了Minidoochun和SkyEye的模擬器,

一般講開發Embedded Linux大概分為...
1. Kernel
2. Root File System
3. Boot Loader
4. Applications

待續...