pigfoot’s weblog

We should forget about small efficiencies — Donald Knuth

Archive for the ‘Linux’ Category

Andrew Morton moves to Google

Andrew Moves To Google, from KernelTrap.

With the release of the 2.6.18-rc3-mm1 kernel, Andrew Morton, a Linux kernel developer to maintain a patchset known as the -mm tree, has taken a position with Google in August of 2006.

Popularity: 19% [?]

  • 0 Comments
  • Filed under: Google, IT, Linux, Unix
  • Sun donates T2000 to Gentoo

    Gentoo Weekly Newsletter: 24 July 2006

    Sun 的 David Killian 向 Gentoo 贊助了 Niagara 工作站一台, 用於 Gentoo Linux 的開發, 移植, 和測試. 根據 bootlog, 這台就是具有 UltraSPARC T1 processor (1.2GHz 8 core, 也就是會看到 32 顆虛擬 CPU) 和 Main Memory 32GB 的 T2000.

    星期天和 Vivia, tjs, Airken, zmx 吃飯時, 聽到巴哈姆特也正在測試 T2000, 號稱一台抵的上 4 台 Pentium4 2.4GHz/1GB記憶體, 甚至還有一半的餘裕, 而且耗電量與機架空間都僅需現有架構的一半.

    雖然說 Sun 可能會放棄 SPARC 市場 (找不到新聞了 @_@), 不過 T2000 還真的希望可以借回來玩啊 :p

    Popularity: 34% [?]

  • 0 Comments
  • Filed under: Gentoo, IT, Linux, Sun, Talk, Unix
  • If you try to re-build kernel in RHEL 4, but encounter this error message:

    [/usr/src/kernels/2.6.9-34.0.2.EL-i686]# make bzImage
    CHK include/linux/version.h
    CHK include/asm-i386/asm_offsets.h
    UPD include/asm-i386/asm_offsets.h
    /bin/sh: arch/i386/kernel/asm-offsets.s: No such file or directory
    mv: cannot stat `include/asm-i386/asm_offsets.h.tmp’: No such file or directory
    make: *** [include/asm-i386/asm_offsets.h] Error 1

    This is because RHEL4 doesn’t install kernel source package by default, but install a package including minimum kernel header and source file (kernel-devel-$(uname -r).i686.rpm).

    This package provides kernel headers and makefiles sufficient to build modules against the kernel package. Hence it cannot be used to build kernel source.

    To re-build kernel, please to see the “kernel” section in the release-notes in RHEL 4.

    In order to eliminate the redundancy inherent in providing a separate package for the kernel source code when that source code already exists in the kernel’s .src.rpm file, Red Hat Enterprise Linux 4 no longer includes the kernel-source package. Users that require access to the kernel sources can find them in the kernel.src.rpm file.

    To create an exploded source tree from this file, perform the following steps:

    1. Obtain the kernel-$(uname -r).src.rpm file from one of the following sources:
      • The SRPMS directory on the appropriate “SRPMS” CD iso image
      • By running the following command:
        up2date –get-source kernel
    2. Install kernel-$(uname -r).src.rpm
      rpm -Uvh /var/spool/up2date/kernel-$(uname -r).src.rpm (if kernel.src.rpm is gained by up2date)
    3. Change directory to /usr/src/redhat/SPECS/
    4. rpmbuild -bp –target=$(uname -m) kernel-2.6.spec
    5. Issue the following command:
      make oldconfig

    You can then proceed as usual.

    Popularity: 36% [?]

  • 1 Comment
  • Filed under: IT, Linux, RedHat, Unix
  • Meld : Diff and merge tool

    在 Windows 上, 就 Diff 和 Merge 的 Tool 來說, Araxis Merge 算是一絕, 那在 Linux 上就沒有這麼好用的 Tool 了. 不過今天才發現在 sourceforce.net 上有個 Meld 的 project, 可能也是 Gnome2 上 diff and merge 的殺手級 tool.

    這個是比對檔案的 screenshot:

    file diff screenshot

    這個是比對目錄的 screenshot:

    directory diff screenshot

    安裝的方法如果是 Fedora, 可以參考我寫的這篇 [RedHat] How to Fetch RPM? #1 - Fetch Manually. 它在 Fedora Extras 裡.

    Popularity: 23% [?]

  • 0 Comments
  • Filed under: Develop, IT, Linux, Unix
  • RedHat 在 RPM 推出之後, 解決了不用重新 configure ; make ; make install 的惡夢 (想想要裝新軟體的時候, 發現系統中竟然沒有 gcc 的窘境), 似乎只要會 rpm -Uvh, 就可以從此過著幸福快樂的生活. 但是事與願違, 另一個地獄卻衍生出來 — 我要去哪找 rpm 來裝?

    我接下來會有這個系列幾篇的文章, 講一下怎樣安裝好 RPM. 我會拿 perl-Text-Iconv 這個還蠻多程式會用到的 perl module 來當例子.

    第一個是手動的方法.

    1. 判斷你要安裝的系統是哪個 linux distribution

    我相信應該自己會知道是 RedHat, Gentoo, Debian, 或是 Ubuntu. 這裡只會講 RedHat Enterprise Linux (RHEL), 以及 RedHat Fedora (FC). 判斷的方法就是

    # cat /etc/redhat-release

    比方說, 結果是 Red Hat Enterprise Linux ES release 4 (Nahant Update 3), 就是 RHEL4 ES Update3; Red Hat Enterprise Linux AS release 3 (Taroon), 就是 RHEL4 AS. Fedora 的例子比方說 Fedora Core release 3 (Heidelberg) 就是 Fedora Core 3. 如果是 Red Hat Enterprise Linux 的話, 因為 RedHat 已經不提供 public binary RPM 的服務, 所以本篇對您可能沒有幫助, 請見本系列的下一篇.

    2. 到 Official site 找 RPM

    根據 Fedora Core Wiki Site, Fedora 的 Official Download Location 如下:

    找到你需要的 RPM 再安裝即可. 就我們 perl-Text-Iconv 這個例子來說, 就是在 Fedora Extras 裡就可以找到 RPM 了.

    3. 到 Un-official site 找 RPM

    如果您要找的 RPM 還找不到, 那一般來說, 大家都會到 rpmfind.net 來找非官方的 RPM. 這也是個信賴度比較高的網站. 比方說, 這個 URL http://rpmfind.net/linux/rpm2html/search.php?system=fedora 就是只 query Fedora 的 RPM.

    如果以上還找不到, 基本上是可以求助 google 大神. 不過這個就要小心那些 RPM 是不是有被放入木馬的可能性了.

    Popularity: 30% [?]

  • 0 Comments
  • Filed under: IT, Linux, RedHat, Unix
  • Linux 2.6 vs. Solaris 10, from OSNews.

    It, however, is very strange that I cannot feel such considerable performance improvement in Solaris 10. My summary is as followings.

    There are several often overlooks positive features of Solaris as an alternative to Linux in lage enterprize environment:

    • Solaris is more stable, especially in network intensive tasks.
    • New T1 CPUs make Solaris on SPARC more attractive and provide a clean migration path from older UltraSparc models that fall behind in price/performance ratio.
    • Due to the architecture of Solaris kernel and I/O subsystem there are several open source applications that can run on Solaris better then on Linux. Among them are all multithreading applications and open source databases. Solaris also significantly improves the security of open source applicators due to built-in protection from stack overflows.
    • The recent test conducted by Sun [MySQL2006] had show that optimized for Solaris MySQL (UFS?) beats MySQL on RED HAT ES 4 (ext3?) by a considerable margin.
    • It is unclear how it goes against ZFS in Solaris. Newer ZFS is still in too early stage for comparisons.
    • For tracking system calls Solaris has an excellent truss utility. For Linux, the strace utility provides a similar but weaker function. For more complex situations Solaris has Dtrace. Currently Linux has no analogs for Dtrace.

    There are also several disadvantages of Solaris:

    • Linux has larger “knowledge space” especially noticeable in the number of published books. While Solaris has much better OS level security, Linux has better “open source knowledge infrastructure” including the information about securing open source applications, especially those implementing key application level TCP/IP protocols (HTTP, DNS, SMTP, ssh, Kerberos, etc)

    Popularity: 20% [?]

  • 0 Comments
  • Filed under: IT, Linux, Sun, Unix
  • Gentoo Linux founder quits Microsoft

    Gentoo Linux founder quits Microsoft (Chinese Version), (February 14, 2006)

    Daniel Robbins 在 06/2005 才到而己, 半年多就走了. 看起來好像待的不是很愉快貌.

    Popularity: 16% [?]

  • 1 Comment
  • Filed under: IT, Linux, Microsoft, Unix