• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 183,  comments - 10,  trackbacks - 0

            Linux 內(nèi)核編譯升級記錄

            先是裝了個 VMware
            然后再里面裝了個 CentOS

            之后就是漫長的內(nèi)核編譯升級

            上周周四、周五兩天都在忙這個,但是最終沒有成功
            內(nèi)核編譯一次需要花費一個小時,在虛擬機(jī)里面

            一開始編譯的時候,出現(xiàn)錯誤。
            主要存在兩個錯誤,剛開始不知道為什么,也沒有對出現(xiàn)的問題進(jìn)行解決,只是重新編譯,結(jié)果當(dāng)然失敗

            第一個運行錯誤是
            “insmod: error inserting ‘/lib/dm-region-hash.ko”
            Google 了一下,是因為 init 里存在重復(fù)行,vi 編輯刪除之

            第二個錯誤是:
            “Volume group "VolGroup00" not found”
            Google 了一下,是因為 .config 文件的配置問題
            需要將
            General setup --->
            enable deprecated sysfs features
            勾選了

            這兩個問題解決后,Linux 內(nèi)核升級即可完成。
            下面說一下具體的步驟:

            1.
            下載最新版本的 Linux 內(nèi)核
            http://www.kernel.org/
            這里是 linux-2.6.37.6.tar.bz2
            拷到 /usr/src

            2.
            加壓 *.tar.bz2
            root# tar -jvxf linux-2.6.37.6.tar.bz2

            3.
            進(jìn)入 linux-2.6.37.6 文件夾
            # cd linux-2.6.37.6

            # make clean
            # make mvproper

            4.
            配置
            make menuconfig
            注意,就是這里要勾選
            General setup --->
            enable deprecated sysfs features
            否則會造成
            “Volume group "VolGroup00" not found”
            錯誤

            5.
            編譯
            # make all

            6.
            安裝
            # make modules_install
            # make install

            7.
            設(shè)置
            # mkinitrd /boot/initrd-2.6.37.6.img 2.6.37.6
            # cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.37.6
            # cp /usr/src/linux-2.6.37.6/System.map /boot/System.map-2.6.37.6

            8. 修改默認(rèn)啟動內(nèi)核
            # cat /etc/grub.conf
            # vi /etc/grub.conf
            將 default=1 修改為
            default=0

            9.
            刪除多余行,這是編譯的一個小 bug ,造成出現(xiàn)重復(fù)行
            會造成
            “insmod: error inserting ‘/lib/dm-region-hash.ko”
            的錯誤

            # cp /boot/initrd-2.6.37.6.img /tmp/
            # cd /tmp/
            # mkdir newinitrd
            # cd newinitrd
            # zcat ../initrd-2.6.37.6.img | cpio -i
            # ls
            # vi init
            刪除 init 中存在的重復(fù)
            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.37.6.img
            # ls
            # mv /boot/initrd-2.6.37.6.img /home/
            # cp initrd-2.6.37.6.img /boot/
            # reboot

            進(jìn)入新內(nèi)核后,查看新內(nèi)核的版本
            # uname -a
            # uname -r

            ===================================================
            下面是我在升級過程中的命令記錄 history
              543  tar -jvxf linux-2.6.37.6.tar.bz2
              544  clear
              545  cd linux-2.6.37.6
              546  ls
              547  make clean
              548  make mvproper
              549  clear
              550  make all
              551  make clean
              552  make mrporper
              553  make menuconfig
              554  make menuconfig
              555  \
              556  \
              557  cd /usr/src/linux-2.6.37.6
              558  ls
              559  ls -a
              560  make all
              561  clear
              562  make modules_install
              563  make install
              564  mkinitrd /boot/initrd-2.6.37.6.img 2.6.37.6
              565  rm /boot/initrd-2.6.37.6.img
              566  ls
              567  ls /boot/
              568  mkinitrd /boot/initrd-2.6.37.6.img 2.6.37.6
              569  cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.37.6
              570  cp /usr/src/linux-2.6.37.6/System.map /boot/System.map-2.6.37.6
              571  cat /etc/grub.conf
              572  cp /boot/initrd-2.6.37.6.img /tmp/
              573  cd /tmp/
              574  rm -rf newinitrd/
              575  mkdir newinitrd
              576  cd newinitrd/
              577  zcat ../initrd-2.6.37.6.img | cpio -i
              578  ls
              579  vi init
              580  find . | cpio -c -o > ../initrd
              581  cd ..
              582  gzip -9 < initrd > initrd-2.6.37.6.img
              583  ls
              584  mv /boot/initrd-2.6.37.6.img /home/
              585  cp initrd-2.6.37.6.img /boot/
              586  reboot
              587  uname -r
              588  uname -a
              589  uname -r
              590  history


            ======================================================

            網(wǎng)上查的資料,主要是第一個和第二個
            http://www.linuxidc.com/Linux/2010-09/28735.htm
            http://blog.csdn.net/douzi24/article/details/5781148
            http://hi.baidu.com/mhlovejn/blog/item/7a4a55fe65de7488b801a020.html/
            http://blog.csdn.net/cdsnmdl/article/details/3922513
            http://www.cublog.cn/u/9483/showart_2524232.html
            http://blog.csdn.net/do2jiang/article/details/4965967
            http://my.chinaunix.net/space.php?uid=113544&do=blog&id=85646
            http://www.shnenglu.com/momoxiao/archive/2010/06/26/118758.html

            posted on 2011-07-11 11:22 unixfy 閱讀(446) 評論(1)  編輯 收藏 引用

            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            亚洲精品美女久久777777| 国产香蕉97碰碰久久人人| 久久婷婷五月综合色奶水99啪| 日本精品一区二区久久久| 少妇熟女久久综合网色欲| 久久香蕉国产线看观看精品yw| 2022年国产精品久久久久 | 91久久精品国产91性色也| 久久婷婷五月综合97色| 久久99精品国产麻豆宅宅| 欧美性大战久久久久久| 一本一本久久aa综合精品| 亚洲狠狠久久综合一区77777| 亚洲色欲久久久久综合网| 99国产精品久久久久久久成人热| 久久精品国产72国产精福利| 久久棈精品久久久久久噜噜| 久久精品夜色噜噜亚洲A∨| 久久天堂AV综合合色蜜桃网| 久久婷婷色综合一区二区| 久久99精品久久久久婷婷| 一日本道伊人久久综合影| 久久久久国色AV免费观看| 国内精品久久久人妻中文字幕| 欧美午夜A∨大片久久| 2020最新久久久视精品爱| 久久精品国产99久久久| 综合久久给合久久狠狠狠97色| 国产精品九九久久免费视频 | 亚洲精品无码久久久久久| 久久精品无码一区二区日韩AV| 久久久精品人妻一区二区三区蜜桃| 欧美久久一区二区三区| 天天爽天天爽天天片a久久网| 久久棈精品久久久久久噜噜| 久久亚洲AV无码精品色午夜| 亚洲欧美一级久久精品| 久久亚洲精品无码播放| 久久强奷乱码老熟女网站| 久久精品成人影院| 久久影视国产亚洲|