Welcome 微信登录

首页 / 操作系统 / Linux / Ubuntu内核的重新编译安装

由于最近在搭建abiCloud云计算环境,所以在node端要安装vbox (当然可以采用vmware等)。由于vbox要编译进内核,所以重新把Ubuntu的内核重新编译了一下。下面是编译的整个过程:首先,确认一下内核版本,使用如下命令:( 我node端采用的是Ubuntu 9.10桌面版)root@hker-laptop:/# # uname -a
返回信息:
Linux hker-laptop 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux
然后从内核网站:http://www.kernel.org/下载你需要的版本。在这里我阴差阳错的下载了2.6.31-8的版本,呵呵比我自带的版本还低,不过没有关系啦,完成任务要紧阿。就以这个版本来安装吧!
首先解压linux-2.6.31.8.tar.gz到/usr/src/目录
root@hker-laptop:/usr/src/#cd /usr/src/
root@hker-laptop:/usr/src/linux/#tar zxvf linux-2.6.31.8.tar.gz
root@hker-laptop:/usr/src/linux/#mv linux-2.6.31.8 linux          (新建linux目录,和通过硬连接的方式建立这个目录,貌似没有差别:))root@hker-laptop:/usr/src/linux/#make oldconfig
root@hker-laptop:/usr/src/linux/#make prepare
root@hker-laptop:/usr/src/linux/#make modules_prepare
root@hker-laptop:/usr/src/linux/#cd ..
root@hker-laptop:/usr/src/#make -C linux  M=/usr/src/linux/net/mac80211/ modules
root@hker-laptop:/usr/src# cp linux/net/mac80211/modules.order linux/
root@hker-laptop:/usr/src# cd linux
root@hker-laptop:/usr/src/linux# make modules_install
root@hker-laptop:/usr/src# cd linux
root@hker-laptop:/usr/src/linux# make all                       (漫长的时间等待,我的编译了大概2个小时吧 :( )
OK终于编译完了!
root@hker-laptop:/usr/src/linux#make install
通过这一步,将会把编译好的 vmlinux-2.6.31.8拷贝到 /boot目录下,并建立System.map-2.6.31.8映射。但是这里少了个initrd.img-2.6.31.8 !这个要自己设定!
生成initrd.img-2.6.31.8文件可以使用mkinitramfs命令。
root@hker-laptop:/usr/src/linux/#cd /lib/modules
root@hker-laptop:/lib/modules/#mkinitramfs -o /boot/initrd.img-2.6.31.8
OK,生成成功!
  • 1
  • 2
  • 下一页
Ubuntu遭遇突然掉电的处理办法如何定制Ubuntu LIVE CD相关资讯      Ubuntu知识 
  • Ubuntu 有这功能吗?-回答4个新用  (10/14/2014 16:54:49)
  • Ubuntu小知识总结  (07/08/2013 17:02:10)
  • 万圣节Halloween与Ubuntu  (10/31/2012 07:59:01)
  • Ubuntu系统诞生10周年:让Linux更  (10/14/2014 16:53:00)
  • Ubuntu 官方发布 Ubuntu 应用程序  (02/15/2013 21:49:58)
  • Ubuntu内置捐款选项:为掌握用户需  (10/11/2012 13:57:23)
本文评论 查看全部评论 (0)
表情: 姓名: 字数