linux 编译宏 x86,【改错本】虚拟机内x86平台linux内核配置、编译与安装 RHEL5

拷贝到合适目录下

解压

进入内核目录

将虚拟机安装的RHEL5的内核配置文件直接拷贝过来使用

[root@localhost linux-2.6.29]# cp

/boot/config-2.6.18-53.el5 .config

[root@localhost linux-2.6.29]# ls -a .config (显示隐藏文件.config)

.config

[root@localhost

linux-2.6.29]# make menuconfig

HOSTCC scripts/kconfig/conf.o

HOSTCC scripts/kconfig/kxgettext.o

*** Unable to find the ncurses libraries or

the

*** required header files.

*** 'make menuconfig' requires the ncurses

libraries.

***

*** Install ncurses (ncurses-devel) and try

again.

***

make[1]: ***

[scripts/kconfig/dochecklxdialog] Error 1

make: *** [menuconfig]

Error 2

[root@localhost gy]# rpm

-qa | grep ncurses

ncurses-5.5-24.20060715

正如提示所说,缺少了:ncurses-devel包

到安装光盘server文件夹下找到ncurses-devel-5.5-24.20060715.i386.rpm

拷贝到tmp文件夹下

安装

[root@localhost tmp]# rpm -ivh

ncurses-devel-5.5-24.20060715.i386.rpm

warning: ncurses-devel-5.5-24.20060715.i386.rpm:

Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ########################################### [100%]

1:ncurses-devel ########################################### [100%]

重新输入命令

[root@localhost

linux-2.6.29]# make menuconfig

错误提示Your display is too small to run

Menuconfig!终端窗口太小,最大化即可。

配置选项不必修改

直接保存退出

然后编译内核

#make bzImage

这个过程时间比较长

编译完成显示

Kernel: arch/x86/boot/bzImage is ready (#1)

进入arch/x86/boot/查看

[root@localhost boot]# ls bzImage

bzImage

编译内核模块:# make modules

[root@localhost boot]# make modules

make: *** No rule to make target `modules'. Stop.

退出到linux-2.6.29目录下

[root@localhost linux-2.6.29]#

make modules

时间也比较长。

安装内核模块

#make modules_install

制作init

ramdisk

#mkinitrd initrd-2.6.19 2.6.29

安装内核

将内核和init ramdisk拷贝至/boot目录。

修改grub的配置文件

重启虚拟机 按f2进入系统选项

选择自己制作的内核启动即可。

完。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值