QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 962|回复: 5

debian升级内核无法启动??

[复制链接]
发表于 2005-4-18 12:42:27 | 显示全部楼层 |阅读模式
用debian-30r2-i386-binary-1_NONUS.iso安装的基本系统
准备把内核从2.2.20升级成2.6.8
用如下步骤编译
#make menuconfig
选上了ext2和ide的支持
#make clean bzImage
#make module
#make modules_install
然后
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.8

然后修改/boot/grub/menu.lst文件
加入下面两行
title           Debian GNU/Linux, kernel 2.6.8
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.8 root=/dev/hda1 ro
savedefault
boot

title           Debian GNU/Linux, kernel 2.6.8 (recovery mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.8 root=/dev/hda1 ro single
savedefault
boot
原来2.2.20的grub配置如下:
title           Debian GNU/Linux, kernel 2.2.20-idepci
root            (hd0,0)
kernel          /boot/vmlinuz-2.2.20-idepci root=/dev/hda1 ro
savedefault
boot

title           Debian GNU/Linux, kernel 2.2.20-idepci (recovery mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.2.20-idepci root=/dev/hda1 ro single
savedefault
boot

结果用2.6.8核心启动
hda:6142MB,CHS=783/255/63
hda:hda1 hda2 <
然后就停着不动了

虚拟机就一块硬盘hda
里面一个hda1作为linux主分区,hda5作为swap

用2.2.20的核心就能正常启动
这个是什么问题??
发表于 2005-4-19 20:33:32 | 显示全部楼层
#make menuconfig
选上了ext2和ide的支持
#make clean bzImage
#make module
#make modules_install

[code:1]
make mrproper
make bzImage
make modules
make modules_install
[/code:1]
用这个步骤试试。
good luck
回复

使用道具 举报

 楼主| 发表于 2005-4-19 20:58:47 | 显示全部楼层
这么编译完成后,还是按照原来那样copy文件,修改menu.lst文件么?
回复

使用道具 举报

 楼主| 发表于 2005-4-19 23:00:47 | 显示全部楼层
make mrproper后
make bzImage
报错
Makefile:418: .config: No such file or directory
  HOSTCC  scripts/basic/fixdep
scripts/basic/fixdep.c:97:23: sys/types.h: No such file or directory
scripts/basic/fixdep.c:98:22: sys/stat.h: No such file or directory
scripts/basic/fixdep.c:99:22: sys/mman.h: No such file or directory
scripts/basic/fixdep.c:100:20: unistd.h: No such file or directory
.....
一堆错误
回复

使用道具 举报

发表于 2005-4-20 09:55:56 | 显示全部楼层
看看debian的手册
debian有自己编译内核的简单方式,直接做成deb包

#make menuconfig
#make-kpkg clean
#make-kpkg --append_to_version -686 --initrd kernel_image modules_image
#cd ..
#dpkg -i kernel-image-***.deb
回复

使用道具 举报

发表于 2005-4-22 19:25:10 | 显示全部楼层
抱歉抱歉, make mrproper 接着的应该是 make menuconfig(oldconfig)    
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-6 19:27 , Processed in 0.099084 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表