Google
 

音樂分享 - 「君がいるから」by 江口一聲

2007年5月3日 星期四

文風不動

文風ㄨㄣˊ ㄈㄥ ㄅㄨˋ ㄉㄨㄥˋ


解釋

1.
一點也不動。紅樓夢˙第三十六回:寶玉忙至他房內,只見齡官獨自倒在枕上,見他進來,文風

2.
一點也未損壞。程乙本紅樓夢˙第二十九回:偏生那玉堅硬非常,摔了一下,竟文風。寶玉見不破,便回身找東西來砸。

凡事別太快下定論



看起來像是在賣淫… 不過事實是爸爸在給女兒錢
凡事別太快下定論哦… ^^

Linux Kernel panic: VFS 開機失敗

VFS : Cannot open root device "802" or unknown-block(8,2)
Please append a corect "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(8,2)


我在 IBM Netfinity 3500 與 HP DL370 升級 Linux Kernel 都遇過此問題,也一直不解為何會如此,早知道有解就該多找找 Google ... 冏rz

以下是找到的解法...

這一篇是說明問題,問題在於 升級後的 kernel 的 initrd.img 沒有內含 ext3 的 module (ext3.ko) ,所以開機時就無法讀入 ext3 的分割區,開機當然就失敗啦~

Linux Kernel panic VFS Unable to mount root fs and solution | Frequently Asked Questions

Q. I am using Linux on HP server and I am getting error that read root file system , Linux Kernel panic: VFS: Unable to mount root fs on unknown-block(8,2) . How do I solve this problem?

A. Most modern distributions including Debian uses loadable kernel module for ext3 file system. So to read ext3/ext2 file system kernel must load ext3 kernel module (ext3.ko).

This module is included in an initrd image. If an initrd image is missing or that image does not include suitable kernel modules to access the ext3 filesystem on the partition, an error message (Linux Kernel panic: VFS: Unable to mount root fs on unknown-block(8,2) will be displayed to you.

To solve this problem you need to use mkinitrd script that constructs a directory structure that can serve as an initrd root file system.

解決方法就是,自已再做一個 initrd.img 並把 ext3 的 module 包進入,以下是做法:

Source: Rebuild the initial ramdisk image | Frequently Asked Questions

Q: I think I am missing some driver or my initial ramdisk is corrupted for running kernel how do I Rebuild the initial ramdisk image under Linux?

A: You need ramdisk if you have added new hardware devices such as SCSI or FibreChannel controller to your server as the ramdisk contains the necessary modules (i.e. drivers) to initialize hardware driver. If you modified the /etc/modprob.conf (or modules.conf) file then you need to execute special script called mkinitrd.

The mkinitrd script constructs a directory structure that can serve as an initrd root file system. It then generates an image containing that directory structure using mkcramfs, which can be loaded using the initrd mechanism. The kernel modules for the specified kernel version will be placed in the directory structure. If version is omitted(省略), it defaults to the version of the kernel that is currently running.

Find out your kernel version:

# uname -r 先確認 kernel 版本
2.6.15.4

Make backup of existing ram disk: 做個備份
# cp /boot/initrd.$(uname -r).img /root

To create initial ramdisk image type following command as the root user:

# mkinitrd -o /boot/initrd.$(uname -r).img $(uname -r) 製作 initrd.img
# ls -l /boot/initrd.$(uname -r).img

You may need to modify grub.conf to point out to correct ramdisk image, make sure following line existing in grub.conf file:

initrd /boot/initrd.img-2.6.15.4.img 在 grub.conf 裏指定正確的 initrd.img

When the system boots using an initrd image created by mkinitrd command, the
linuxrc will wait for an amount of time which is configured through mkinitrd.conf, during which it may be interrupted by pressing ENTER. After that, the modules specified in will be loaded.

講了很多 initrd.img ,現在來解釋一下 什麼是 initrd... 簡單說就是 Initial Ramdisk 的縮寫,為了解決開機時有關雞生蛋或蛋生雞的問題… 說明:root file system 是 ext3 ,但是 ext3 並未包含在 kernel 裏,而是做成 loadable module ,這樣開機時 kernel 就讀不到 root file system 了… 即使是 kernel 想載入 ext3 module,可是對這 module 在 ext3 的 file system 裏啊~ 哈 真是有趣,果然是雞跟蛋的問題… 這個initrd 會產生一個 image 檔,裏面會有一個 filesystem ,並也建構了 modules 的目錄與放進了 module,這樣 kernel 就能載入這些 module了,然後就能把 root filesystem 掛載起來,繼續完開機的動作。

Source: Digital Hermit - Kernel-Build-HOWTO

Create Initial RAMDisk

If you have built your main boot drivers as modules (e.g., SCSI host adapter, filesystem, RAID drivers) then you will need to create an initial RAMdisk image. The initrd is a way of sidestepping the chicken and egg problem of booting -- drivers are needed to load the root filesystem but the filesystem cannot be loaded because the drivers are on the filesystem. As the manpage for mkinitrd states:

mkinitrd creates filesystem images which are suitable for use as Linux initial
ramdisk(initrd) images. Such images are often used for preloading the
block device modules (such as IDE, SCSI or RAID) which are needed to access the
root filesystem. mkinitrd automatically loads filesystem modules (such as
ext3 and jbd), IDE modules,all scsi_hostadapter entries in /etc/modules.conf,
and raid modules if the systems root partition is on raid, which makes it
simple to build and use kernels using modular device drivers.

--MKINITRD(8)

To create the initrd, do the following:

$ mkinitrd /boot/initrd-2.6.0.img 2.6.0

Some versions of mkinitrd may require other options to specify the location of the new kernel. On SuSe 9.0, for example, the following syntax is required:

$ mkinitrd -k vmlinux-VERSION -i initrd-VERSION

檔案分享 fileWind.com 不限大小,不用註冊,不限下載

Key features of http://www.filewind.com/
Free and no need to register to use. 不用註冊
Easy to use, upload file, receive link, share.
Files up to 500MB can be uploaded, can split files if too large. 超過500MB自動切割
Unlimited storage, upload as many files as you want.不限大小
Unlimited downloads, we will never delete for too many downloads. 不限下載
Fast connection and 24/7 dedicated staff to maintain highest uptime.

2007年5月2日 星期三

PHP5 ... register_globals Off 之前的程式都不能用了

php4.1.2 起,更改 register_globals off (php.ini)

register_globals boolean

Whether or not to register the EGPCS (Environment, GET, POST, Cookie, Server) variables

as global variables.

As of PHP 4.2.0, this directive defaults to off.

Please read the security chapter on Using register_globals for related information.

Please note that register_globals cannot be set at runtime (ini_set()). Although, you

can use .htaccess if your host allows it as described above. An example .htaccess entry:

php_flag register_globals off.

注: register_globals is affected by the variables_order directive.

This directive was removed in PHP 6.0.0.


關於使用 register_globals On 的風險,請參考
PHP: Using Register Globals - Manual
Address : <http://tw.php.net/manual/tw/security.globals.php>




取得變數可改用以下方式宣告。
建議只用 POST ,以免有 sql injecktion 的風險。
while(list($key, $value) = each($_GET))
{
${$key} = $value;
}

while(list($key, $value) = each($_POST))
{
${$key} = $value;
}

2007年5月1日 星期二

[轉貼] Linux, Google, Youtube, SQL, Xoops, Ubuntu, Skype, HEMiDEMi 最正確的唸法

Linux, Google, Youtube, SQL, Xoops, Ubuntu, Skype, HEMiDEMi 最正確的唸法


轉貼自: BillyPan 的部落格 - Linux, Google, Youtube, SQL, Xoops, Ubuntu, Skype, HEMiDEMi 最正確的唸法

老實說,這些新的科技字眼,別說台灣人,外國人也常不知道怎麼唸。

因為是新字,字典上是查不到的。

幹嘛要弄新字呢? 很簡單,這樣在網路世界中才有特異性,搜尋資料時才不會得到一大堆不必要的東西,容易被找到。

大家亂唸一通總不是辦法,可是誰唸的才對呢?

這就必需去問發明這幾個字的人了,字是他們做的,他們唸的一定對。


Linux
Linux的發明人是Linus Torvalds,問他"Linux"怎麼唸,他這麼說:

所以i唸/i/或 /ai/ 都可以,不要再吵了。

Youtube
Youtube呢,唸you-to-bee是不行的,聽聽YouTube網站創辦人賀利 (Chad Hurley)與陳士駿怎麼唸:

所以是 you-tube

Google
google大家都唸對了,不過還是來聽一下創辦人Sergey Brin的發音好了



Skype
在台灣90%都唸錯,這同樣要聽創辦人Niklas Zennstrom怎麼唸才準:


所以是 sky-p ,p發輕音,不要再唸sky-pee了(by 網友tempo)
HEMiDEMi
黑米的創辦人之一陳函葳小姐(另一位是葛力)曾示範過HEMiDEMi的唸法:


HEMiDEMi截取自「hemidemisemiquaver」這個冗長音樂術語,意指64分音符,quaver的詞義是8分音符,而hemi、demi、semi全都是一半的意思。引自http://www.ithome.com.tw/itadm/article.php?c=37410

Ubuntu
這個最難,聽一聽出了一千萬美金Ubuntu大金主傳奇創業家Mark Shuttleworth怎麼唸:


所以是烏-本-圖,會了嗎?

Xoops
這個大家都唸錯,見官網的說明
http://www.xoops.org/modules/wfchannel/
What XOOPS stands for
XOOPS is an acronym of eXtensible Object Oriented Portal System. Though started as a portal system, XOOPS is in fact striving steadily on the track of Content Management System. It can serve as a web framework for use by small, medium and large sites.

Pronunciation guide
The standard pronunciation of XOOPS should follow English rules, and you should pronounce it as [zoo'ps].

所以要唸 /Z/ 的發音,不是 /S/

SQL
很多人唸 S-Q-L,但正確的唸法是sequel,理由如下:

http://www.itworld.com/nl/db_mgr/05142001/
By the end of the System/R project, IBM had implemented a language that supported System/R's multi-table queries and multiple-user access called the Structured English Query Language (SEQUEL). The name later was shortened to Structured Query Language (SQL). Today, we still pronounce the abbreviation as "sequel" because of these early roots.