Ubuntu10.04编译安装Linux kernel 3.7.10
2013-02-28 22:51
344 查看
1. Download linux-3.7.10.bz2.
You can download in the following website:http://www.kernel.org/
2. Copy the linux-3.7.10.bz2 to the directory /usr/src. The command is:
3. Umcompress the linux-3.7.10.bz2 the commands is:
4. Install the relative packages, the command is:
$apt-get install build-essential libncurses5-dev libncurses5
5. Enter the directory /usr/src/linux-3.7.10, the command is:
$cd /usr/src/linux-3.7.10
6.Configure
Configure the kernel config file. using the following command:
$make menuconfig
Here, I use the default configuration.
7.Compiling
Now compiling the Linux kernel, Commands as follows:
$sudo make -j4
The -jN denoted that if your computer CPU Core is N/2, here you should use N for parallel compiling. this way could save time.
8.Install
There are two parts to install:
The first part is Linux module, using the command:
$sudo make modules_install
The second part is kernel that is compiled, using the command:
$sudo make install
9.Create initrd.img file
initrd.img 即为初始化的 ramdisk 文件,它是一个镜像文件,将一些最基本的驱动程序和命令工具打包到镜像文件里。该镜像文件的作用是在系统还没有挂载根分区前,系统需要执行一些操作,比如挂载 scsi 驱动,此时将 initrd 文件释放到内存中,作为一个虚拟的根分区,然后执行相关脚本,运行 insmod 命令加载需要的模块。
具体的创建方法如下:
$~/linux-3.0.4$sudo mkinitramfs 3.7.10 -o /boot/initrd.img-3.7.10
10. 更新 grub
最后一步则是更新 grub 启动菜单,使用下面的命令则可以自动更新启动菜单:
$sudo update-grub2
这样会将刚才编译好的内核放在启动菜单的首位,如果需要修改启动菜单中默认系统的启动顺序,则修改/boot/grub/grub.cfg 文件中的 set default=的值即可。
内核编译完毕。
You can download in the following website:http://www.kernel.org/
2. Copy the linux-3.7.10.bz2 to the directory /usr/src. The command is:
$ cp ~/linux-3.7.10.bz2 /usr/src
3. Umcompress the linux-3.7.10.bz2 the commands is:
$bzip2 -d linux-3.7.10.tar.bz2 $tar -xvf linux-3.7.10.tar
4. Install the relative packages, the command is:
$apt-get install build-essential libncurses5-dev libncurses5
5. Enter the directory /usr/src/linux-3.7.10, the command is:
$cd /usr/src/linux-3.7.10
6.Configure
Configure the kernel config file. using the following command:
$make menuconfig
Here, I use the default configuration.
7.Compiling
Now compiling the Linux kernel, Commands as follows:
$sudo make -j4
The -jN denoted that if your computer CPU Core is N/2, here you should use N for parallel compiling. this way could save time.
8.Install
There are two parts to install:
The first part is Linux module, using the command:
$sudo make modules_install
The second part is kernel that is compiled, using the command:
$sudo make install
9.Create initrd.img file
initrd.img 即为初始化的 ramdisk 文件,它是一个镜像文件,将一些最基本的驱动程序和命令工具打包到镜像文件里。该镜像文件的作用是在系统还没有挂载根分区前,系统需要执行一些操作,比如挂载 scsi 驱动,此时将 initrd 文件释放到内存中,作为一个虚拟的根分区,然后执行相关脚本,运行 insmod 命令加载需要的模块。
具体的创建方法如下:
$~/linux-3.0.4$sudo mkinitramfs 3.7.10 -o /boot/initrd.img-3.7.10
10. 更新 grub
最后一步则是更新 grub 启动菜单,使用下面的命令则可以自动更新启动菜单:
$sudo update-grub2
这样会将刚才编译好的内核放在启动菜单的首位,如果需要修改启动菜单中默认系统的启动顺序,则修改/boot/grub/grub.cfg 文件中的 set default=的值即可。
内核编译完毕。
相关文章推荐
- ubuntu 10.04 编译安装网卡 linux kernel source not found 解决办法
- Ubuntu 10.04下安装OpenCV及编译一个简单例程(找不到头文件的问题:error: cv.h: No such file or directory )
- ubuntu 10.04 编译安装飞鸽传输软件
- 在Ubuntu 10.04系统 32位机上安装编译Android2.3源码
- Ubuntu 10.04 源码编译安装bochs 2.4.5
- 在Ubuntu上下载、编译和安装Android 4.2 最新内核源代码(Linux Kernel)
- Ubuntu 10.04下安装OpenCV及编译一个简单例程(找不到头文件的问题:error: cv.h: No such file or directory )
- Ubuntu10.04 64位系统安装LTIB编译工具链
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- ubuntu 10.04 编译安装最新版本linux-2.6.34内核
- Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- 在ubuntu 10.04上编译android 2.2需要安装的相关工具
- ubuntu10.04编译安装LAMP
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- ubuntu 10.04编译安装内核
- 在Ubuntu上下载、编译和安装Android最新内核源代码(Linux Kernel)
- ubuntu 10.04 安装java反编译工具 jd-gui