2009年1月31日

Initrd

現在的Fedora都有用到initrd來開機, 如果想研究看看裡面的機制, 可以將之解開來看看.
cpio format
mkdir temp ; cd temp
cp /boot/initrd-2.6.14.2.img initrd-2.6.14.2.img.gz
gunzip initrd-2.6.14.2.img.gz
cpio -i --make-directories < initrd-2.6.14.2.img

non-cpio format
mkdir temp ; cd temp
cp /boot/initrd.img.gz .
gunzip initrd.img.gz
mount -t ext -o loop initrd.img /mnt/initrd
ls -la /mnt/initrd

Tools
mkinitrd; packagename -- mkinitrd
References:


http://www-128.ibm.com/developerworks/linux/library/l-initrd.html


2009年1月30日

Linux 下看硬體規格的工具

lshw is a small tool to extract detailed information on the hardware configuration of the machine.

yum install -y lshw


有GUI版

yum install -y lshw-gui



其它相關工具: lspci, lsusb, and lshal

2009年1月23日

換了新的版面

將blogger的版面配置換成了在 http://bloggertricks.com/下載的佈景主題, 感覺超棒!!

今天發現版面設定中的用來放置圖片的photobucket己經不讓我們存取背景圖了, 所以把它換到我的googlepage去了. 也還好作者有提供原始圖片!!

為了要能夠在blockquote的html 語法顯示出不同的底色, 又去研究了一下css的語法, 發現其實只要在"版面配置"下的"修改Html"中再為blockquote加入css的語法就可以了. 以我的例子來看:

blockquote {
color:#0066FF;
font-size:80%;
border: 1px dashed #666;
background-color:#FFFFCC;
padding:10px;
margin-left:15px;
margin-right:0px;
}

2009年1月22日

andLinux上使用sshfs

在andLinux上裝sshfs package
apt-get install sshfs
andLinux上default並沒有將/dev/fuse這個device node建立起來, 手動建立它
mknod /dev/fuse c 10 229
確認fuse 的module已經load
modprobe fuse

因為在我的windows-host 上有跑CygWin 的sshd, 所以我可以直接將它mount到指定目錄下:
mkdir -p /mnt/sshfs
sshfs jim@windows-host:/cygdrive/d /mnt/sshfs/
umount 的方式
fusermount -u /mnt/sshfs

在andLinux下新增interface alias

修改/etc/network/interfaces

例如: 幫eth1多bind 一個新的ip叫做192.168.0.53

iface eth1:1 inet static

address 192.168.0.53

netmask 255.255.255.0




下次起動時就會有了, 或是直接執行
/etc/init.d/networking restart

andLinux use Windows 網芳

andLinux開機時若沒有幫你把windows網芳的目錄mount起來, 你可以手動用下列指令mount:
smbmount //windows-host/LINUX /mnt/win -o username=jim

或是在/etc/fstab上新增設定即可
mount 起來後可以利用/root/windows 這個link 來存取

andLinux

之前在Windows上裝Cygwin來模擬Linux的環境, 現在又有新的選擇 -- andLinux -- 
andLinux is a complete Ubuntu Linux system running seamlessly in Windows 2000 based systems (2000, XP, 2003, Vista; 32-bit versions only). 

coap-client 4.3.0 Windows build

coap-client  is a  wget -like tool to generate simple requests for retrieval and modification of resources on a remote server.  Got the sour...