编译内核提示 mount:could not find filesystem ‘/dev/root’ 的解决方法编译内核提示 mount:could not find filesystem ‘/dev/root’ 的解决方法

环境:一台PC机,安装的是RedHat Entprise Linux5 ,内核版本是:2.6.18-92.el5,GCC是gcc-4.1.2-42.el5,从网上下载了linux-2.6.33.3.tar.bz2,在升级编译完内核,重启后提示如下错误信息:

RedHat nash Version 5.1.19.6 startingrver(2.6.33.3)
mount: could not find filesystem ‘/dev/root’
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic – not syncing: Attempted to kill init!
[Linux-initrd @ 0x1fc37000,0x228585 bytes]

于是在网上找了很多,也尝试了很多加模块、重编译了N次、改fstab等方法,都不行。最后在一个网站上找到解决方法。

方法:编译时修改.config文件中的“CONFIG_SYSFS_DEPRECATED_V2”,默认该选项为not set,被注释掉的,将其改为y。即修改为“CONFIG_SYSFS_DEPRECATED_V2=y”,修改后,再编译,重启即正常了。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值