• <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)核編譯一次需要花費(fèi)一個小時,在虛擬機(jī)里面

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

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

            第二個錯誤是:
            “Volume group "VolGroup00" not found”
            Google 了一下,是因?yàn)?.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 閱讀(447) 評論(1)  編輯 收藏 引用

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


            久久国产一区二区| 久久人人爽人人爽人人片AV高清| 国内高清久久久久久| 国产69精品久久久久APP下载| 一本一本久久a久久综合精品蜜桃| 久久夜色精品国产噜噜亚洲AV| 精品无码久久久久国产| 国产日韩久久久精品影院首页| 亚洲第一永久AV网站久久精品男人的天堂AV | 热re99久久精品国产99热| 久久精品无码一区二区三区免费 | 国产成人久久777777| 久久综合鬼色88久久精品综合自在自线噜噜| 合区精品久久久中文字幕一区 | 久久精品一区二区三区中文字幕| 国产成人综合久久精品红| 久久国产一区二区| 久久久久se色偷偷亚洲精品av | 亚洲欧美精品伊人久久| 久久亚洲国产精品成人AV秋霞 | 伊人久久综合无码成人网| 久久人人超碰精品CAOPOREN| 久久99中文字幕久久| 2019久久久高清456| 久久亚洲视频| 精品久久久久久无码中文野结衣 | 国产成人久久久精品二区三区| 久久国产色AV免费看| 精品无码久久久久国产动漫3d| 久久久WWW成人免费毛片| 国产福利电影一区二区三区久久久久成人精品综合 | 久久天天躁夜夜躁狠狠| 久久久国产亚洲精品| 亚洲欧洲久久久精品| 日韩一区二区三区视频久久| 91精品婷婷国产综合久久| 天天爽天天爽天天片a久久网| 久久这里只精品国产99热| 久久中文字幕一区二区| 狠狠久久亚洲欧美专区| 亚洲国产精品久久久久婷婷软件|