creatory 发表于 2010-01-26 09:02

register_blkdev:cannot get major 3 for hd

register_blkdev:cannot get major 3 for hd
List of all partitions:
0300 984816 hda driver:ide-gd
0301   29249   hda1
03021            hda2
0305 955473hda5
No filesystem could mount root,tried:
Kernel Panic-not syncing:VFS:unable to mount root fs on unknown-block(3,1)
为什么会注册块设备失败呢,主设备号3不就是为IDE默认分配的吗?
如果我手动将内核中的
<linux/major.h>中的
#define IDE0_MAJOR 3
改成一个比较然而的数,比如说是444
那是不是也要
mknod /dev/hda b 444 0
mknod /dev/hda1 b 444 1
mknod /dev/hda2 b 444 2
....
这样呢,

如果这样改写了,那么还会不会再出现
register_blkdev:cannot get major444 for hd
这样的错误呢?
哪位好心人,帮忙一下啊。
谢谢

creatory 发表于 2010-01-26 09:08

试了一下又出新问题了
ide_generic:enforcing probing of I/O ports upon user request
hda:CF CARD 1GB,ATA DISK drive
.....
....
...
registered taskstats version 1
hd: no drives specified -use hd=cy1,head,sectors,on kernel command line
List of all partitions

bc00   84816 hda driver: ide-gd
bc 01   29248hda1
bc02   1         hda2
bc05955473   hda5
No filesystem could mount root,tried:
Kernel Panic-not syncing:VFS:unable to mount root fs on unknown-block(188,1)

creatory 发表于 2010-01-26 09:24

出现这句
No filesystem could mount root,tried:
但是我看网上的都是这样的
No filesystem could mount root,tried: ext2,ext3,jffs2,iso9660。。
之类的,这是不是说明我的文件系统没有编译进内核里了,
可是我的确是编译进了内核里了啊,
都是打点的,肯定是内核里的,
为什么我的这句跟网上的不一样呢?
No filesystem could mount root,tried:
No filesystem could mount root,tried: ext2,ext3,jffs2,iso9660。。
这两句问题很大啊

socay2 发表于 2012-09-26 13:45

楼主问题解决了吗? 我今天也遇到同样的问题了。
register_blkdev: cannot get major 3 for hd
Freeing unused kernel memory: 448k freed
Write protecting the kernel text: 4548k
Write protecting the kernel read-only data: 1336k
mount (31) used greatest stack depth: 6872 bytes left
Mounting proc filesystem
Mounting sysfs filesystem
Creating /dev
Creating initial device nodes
Init disk
modprobe (83) used greatest stack depth: 6804 bytes left
fdisk: cannot open /dev/sda
页: [1]
查看完整版本: register_blkdev:cannot get major 3 for hd