發表文章

目前顯示的是 5月, 2009的文章

HOWTO: Install Moblin 2.0 into Virtualbox

From blog entries on Engadget , I heard Moblin 2.0 was released. Yes, I definitely want to give it a try and see how it works. However I do not want to mess up my computer, dual boot looks silly on my X200 because I have lots of memory and P8600 CPU. I do believe run it in VirtualBox is most decent way to do so. So, this is how I do it: 1. Download Moblin 2.0 image from here . 2. Get yourself an usb key, yes, I know maybe I can hack the image to be mounted with a floppy image but sorry my VirtualBox can't do it because it's on Ubuntu 9.04 Jaunty Jackalope 3. Write the image into a usb key, remember to umount it before do write: $ sudo umount /dev/sdb $ sudo dd if=moblin-netbook-ux-beta-20090518-004.img of=/dev/sdb 4. Create a virtual disk image which redirect the usb key to itself: $ sudo VBoxManage internalcommands createrawvmdk -filename ~/VirtualBox/HardDisks/moblin2_usb.vmdk -rawdisk /dev/sdb 5. run virtualbox with root permission for now, we can access the installed disk i

tp-smapi: 保護X200的電池

上週跟老友 Rex 碰面,聊到了共同的工作機台X200,我被問倒了。 Rex: 你有沒有 enable smapi 啊? 我: 甚麼甚麼? Rex: 就是可以透過控制電池充電的機制來保護電池啊。 我: 喔,不知道那是甚麼鬼。 當然,最後結果當然是把這個功能開起來啦。剛剛我也上ThinkWiki把我的發現更新上去, 英文版全文在 這裡 ,為了各位的幸福,翻譯成中文: $ sudo aptitude install tp-smapi-source (選擇性操作) $ sudo module-assistant get tp-smapi-source 目前Ubuntu 9.04的Driver太舊,你需要稍微更新: /usr/src/modules/tp-smapi/hdaps.c 搜尋 "X61" 並且在 " HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X61", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X)," 和 "};" 中間加上以下這行: HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad X200", HDAPS_ORIENT_SWAP | HDAPS_ORIENT_INVERT_X | HDAPS_ORIENT_INVERT_Y), { .ident = NULL } 然後請執行: $ sudo module-assistant build tp-smapi-source $ sudo module-assistant install tp-smapi-source 接下來你需要讓這些driver可以在開機的時候載入,請修改以下檔案: /etc/modules 並且在檔案末端加入以下幾行: thinkpad_ec tp_smapi hdaps 要測試HDAPS搖桿的話: $ sudo modprobe thinkpad_ec tp_smapi hdaps $ sudo aptitude install hdaps-utils $ hdaps-gl 接下來我們可以透過指定開