Linux 2.6.3x核心源碼編譯和安裝

來源:互聯網
上載者:User
文章目錄
  •  
 

[日期:2011-02-25]
來源:Linux社區  作者:wdwbw

新版本Linux核心的編譯特別簡單
下載核心並解壓後,先進行配置
make menuconfig
注意要選擇General Setup-> enable deprecated sysfs features to support old...(即CONFIG_SYSFS_DEPRECATED_V2),否則會報錯“mount:could not find filesystem ‘/dev/root’”

然後
make

再後(如果原有版本與此相同,先備份/lib/modules下該版本)
make modules_install

最後,備份/boot下現有內容,再執行
make install

有些機器啟動會報重複插入dm-region-hash.ko模組
解決方案如下

解壓修改核心:
    cd /tmp/
    mkdir newinitrd
    cd newinitrd/
    zcat /boot/initrd-2.6.35.1.img |cpio -i

    vim init
找到這2段一樣的,去掉其中1段重複的:

    echo “Loading dm-region-hash.ko module”
    insmod /lib/dm-region-hash.ko
    echo “Loading dm-region-hash.ko module”
    insmod /lib/dm-region-hash.ko

從新打包新核心:

    find .|cpio -c -o > ../initrd
    cd ../
    gzip -9 < initrd > initrd-2.6.35.1.img
    rm -fr /boot/initrd-2.6.35.1.img
    cp initrd-2.6.35.1.img /boot

重啟驗證

 

本文來自:http://www.linuxidc.com/Linux/2011-02/32672.htm

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.