LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1079|回复: 16

怪了,启动报错找不到/bin/mknod

[复制链接]
发表于 2008-10-16 18:00:36 | 显示全部楼层 |阅读模式
今天内核更新到2.6.27.启动时需要创建块设备/dev/sda9来挂载根文件系统。但是却找不到/bin/mknod.

2.6.26和2.6.27创建内核映像时mkinitcpio.conf的内容都是一样,2.6.26时一切正常.


我的mkinitcpio.conf如下:
#     MODULES="piix ide_disk reiserfs"
MODULES="ata_piix sd_mod xfs reiserfs"

# BINARIES
BINARIES=""

# FILES
FILES=""

# HOOKS
HOOKS="base"
发表于 2008-10-16 18:50:11 | 显示全部楼层
够简单的了.
我给你看看我的.不过还是要改不少地方才能够运行.
麻烦-_-!
不建议升级,等稳定.
---

  1. # vim:set ft=sh
  2. # MODULES
  3. # The following modules are loaded before any boot hooks are
  4. # run.  Advanced users may wish to specify all system modules
  5. # in this array.  For instance:
  6. #     MODULES="piix ide_disk reiserfs"
  7. MODULES="pata_acpi pata_sis ata_generic scsi_mod sata_sis"

  8. # BINARIES
  9. # This setting includes, into the CPIO image, and additional
  10. # binaries a given user may wish.  This is run first, so may
  11. # be used to override the actual binaries used in a given hook.
  12. # (Existing files are NOT overwritten is already added)
  13. # BINARIES are dependancy parsed, so you may safely ignore libraries
  14. BINARIES=""

  15. # FILES
  16. # This setting is similar to BINARIES above, however, files are added
  17. # as-is and are not parsed in anyway.  This is useful for config files.
  18. # Some users may wish to include modprobe.conf for custom module options,
  19. # like so:
  20. #    FILES="/etc/modprobe.conf"
  21. FILES=""

  22. # HOOKS
  23. # This is the most important setting in this file.  The HOOKS control the
  24. # modules and scripts added to the image, and what happens at boot time.
  25. # Order is important, and it is recommended that you do not change the
  26. # order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
  27. # help on a given hook.
  28. # 'base' is _required_ unless you know precisely what you are doing.
  29. # 'udev' is _required_ in order to automatically load modules
  30. # 'modload' may be used in place of 'udev', but is not recommended
  31. # 'filesystems' is _required_ unless you specify your fs modules in MODULES
  32. # Examples:
  33. #    This setup specifies all modules in the MODULES setting above.
  34. #    No raid, lvm2, or encrypted root is needed.
  35. #    HOOKS="base"
  36. #
  37. #    This setup will autodetect all modules for your system and should
  38. #    work as a sane default
  39. #    HOOKS="base udev autodetect pata scsi sata filesystems"
  40. #
  41. #    This is identical to the above, except the old ide subsystem is
  42. #    used for IDE devices instead of the new pata subsystem.
  43. #    HOOKS="base udev autodetect ide scsi sata filesystems"
  44. #
  45. #    This setup will generate a 'full' image which supports most systems.
  46. #    No autodetection is done.
  47. #    HOOKS="base udev pata scsi sata usb filesystems"
  48. #
  49. #    This setup assembles an pata raid array with an encrypted root FS.
  50. #    Note: See 'mkinitcpio -H raid' for more information on raid devices.
  51. #    HOOKS="base udev pata raid encrypt filesystems"
  52. #
  53. #    This setup loads an lvm2 volume group on a usb device.
  54. #    HOOKS="base udev usb lvm2 filesystems"
  55. HOOKS="base udev autodetect pata scsi sata keymap filesystems"
复制代码
回复 支持 反对

使用道具 举报

发表于 2008-10-16 19:12:35 | 显示全部楼层
瓦,我和lz的这个文件很像,也是只有base的hook。每次启动提示创建什么sda5之类的,不过速度很快。应该需要这个什么mknod。幸好我没有升级。
回复 支持 反对

使用道具 举报

发表于 2008-10-16 19:15:07 | 显示全部楼层
mknod是系统最核心的工具之一,
几乎每个发行版本都有.这次的打包太过仓促了?
问题应该在于无法加载根分区.
回复 支持 反对

使用道具 举报

发表于 2008-10-16 19:28:56 | 显示全部楼层
mknod 属於 coreutils 这个包,不可能没有的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-16 20:11:01 | 显示全部楼层
楼上诸位,不是系统中没有mknod,而是由mkinitcpio生成的内核映像(kernel26.img)中没有mknod.
我的/etc/mkinitcpio.conf一直都没有变化,从2.6.25升级为2.6.26时生成kernel26.img能正常启动,但是这次升级到2.6.27时就不行了。
使用fallback都不行
回复 支持 反对

使用道具 举报

发表于 2008-10-16 20:18:01 | 显示全部楼层
应该是没找到根分区,看下grub的配置文件。
回复 支持 反对

使用道具 举报

发表于 2008-10-16 20:35:26 | 显示全部楼层
这个新内核的问题可不是一般的多啊,在testing里面的时候怎么没人提出来呢?现在进入core了。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-16 20:46:18 | 显示全部楼层
问题已经解决。幸亏我装了三个linux发行版(gentoo,arch,opensuse)

先进gentoo,再chroot进archlinux,修改/etc/mkinitcpio.conf,只加了四个字母:
HOOKS="base"改为HOOKS="base udev"
然后
mkinitcpio -k 2.6.27-ARCH -g /boot/kernel26.img
重新启动,ok!

但是不明白,同样的配置文件,2.6.25和2.6.26生成的kernel26.img没有问题,2.6.27就不行了。
回复 支持 反对

使用道具 举报

发表于 2008-10-16 21:07:35 | 显示全部楼层
也许是klibc变动的关系
回复 支持 反对

使用道具 举报

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

本版积分规则

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