编译内核出的一些问题
来自http://forum.ubuntu.org.cn/viewtopic.php?p=2382995看别人好像很简单,自已搞总是会出错。机器不同,别再相信别人,特别那些在虚拟机上编译的更不能相信。make localmodconfig会让你痛苦,我写的这些你也别信,因为错误提示虽然相同但导致出错的原因不一定与我一样。以下是我ubuntu10.04上编译
·
来自http://forum.ubuntu.org.cn/viewtopic.php?p=2382995
看别人好像很简单,自已搞总是会出错。
机器不同,别再相信别人,特别那些在虚拟机上编译的更不能相信。make localmodconfig会让你痛苦,我写的这些你也别信,因为错误提示虽然相同但导致出错的原因不一定与我一样。
以下是我ubuntu10.04上编译2.6.39.1碰到的问题,成功解决了,多在国外网站找到。
有些grub错误不会在11.04出错了,因为他们会在新版本上解决而不会帮你解决旧版本了。
1.
引用:
开机出错
kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
RAM block device support
(打开.config, CONFIG_BLK_DEV_RAM=y)
Initial RAM filesystem and RAMDISK support
(CONFIG_BLK_DEV_INITRD=y)
2.
引用:
新内核开机错误:
init:udev-fallback-graphics main process(514)....
press S to skip mounting or M .....
cannot be mounted RDWR.without CONFIG_LBDAF
init:udev-fallback-graphics main process(514)....
press S to skip mounting or M .....
cannot be mounted RDWR.without CONFIG_LBDAF
把 CONFIG_LBDAF=y再试试看OK
就是选上大硬盘支持:Support for large (2TB+) block devices and files"
3.
引用:
编译为deb包的安装出错
update-initramfs: Generating /boot/initrd.img-......
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for module r8169
update-initramfs: Generating /boot/initrd.img-......
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for module r8169
去下载新版本,
https://launchpad.net/ubuntu/+source/linux-firmware
代码:
wget http://launchpadlibrarian.net/73154051/linux-firmware_1.54_all.deb
sudo dpkg -i linux-firmware_1.54_all.deb
sudo dpkg -i linux-firmware_1.54_all.deb
再确认是否还出错:
代码:
sudo update-initramfs -u
4.
引用:
update-grub出错
/proc/devices: No entry for device-mapper found
/proc/devices: No entry for device-mapper found
/proc/devices: No entry for device-mapper found
/proc/devices: No entry for device-mapper found
done
/proc/devices: No entry for device-mapper found
/proc/devices: No entry for device-mapper found
/proc/devices: No entry for device-mapper found
/proc/devices: No entry for device-mapper found
done
文件编辑器打开.config,找到下面并 改为yes
CONFIG_BLK_DEV_DM=y
就是把RAID and LVM编进去
Device Driver>Multiple Devices driver Support> Device Mapper
不知是否两个硬盘的原因,以前单硬盘没碰到这问题
5.
引用:
开机卡在cannot execute binary file
kernel suport for ELF binaries把它编译进去OK
6.
ubuntu 千年问题,编译为deb包的,安装不能生成initrd.img
(我的intel集显的老机上又可以生成)
代码:
sudo update-initramfs -c -k 2.6.39.1
7.
引用:
Gave up wiating for root device. Common problems:
- Boot args
- Check rootdelay= (did the system wait long enough?)
- Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/15448888-84a0-4ccf-a02a-0feb3f150a84 does not exist. Dropping to a shell!
BusyBox v1.17.1
(initramfs)
- Boot args
- Check rootdelay= (did the system wait long enough?)
- Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/15448888-84a0-4ccf-a02a-0feb3f150a84 does not exist. Dropping to a shell!
BusyBox v1.17.1
(initramfs)
同时加了几项OK了,但不知哪个才是关键了
如果不是自编译的内核也有上面错误,有人说可加启动参数:
1.rootdelay=90
2.root=uuid 改为root=/dev/sdaX
3.apm=off acpi=on clocksource=pit noacpi nolapic
8.
引用:
开机卡在这里:mounted filesystem with ordered data mode. Opts: (null)
昨天碰到的,还不知道,哪里导致的。
更多推荐
已为社区贡献5条内容
所有评论(0)