[求助] 关于2.6内核挂载ramdisk时的问题

发布于 2022-07-21 20:34:29 字数 837 浏览 15 评论 9

我的2.6内核跑起来后加载RAMDISK可是总是不 能通过,期间我也遇到并解决了很多问题,可是这次兄弟真实没办法了.
       这是我的串口最后的打印信息:
[21474576.920000] VFS: Mounted root (ext2 filesystem) readonly.

[21474576.935000] Mounted devfs on /dev

[21474576.940000] Freeing init memory: 92K

[21474576.960000] EXT2-fs error (device ram0): ext2_check_page: bad entry in directory #246: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0

[21474576.980000] Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

       哪位仁兄能指点小弟一把,说说着个问题是怎么一回事啊,给点思路哦
      
       小弟谢了

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

茶色山野 2022-07-25 04:59:04

据说是glibc的问题,glibc的库会检查/proc,但是/proc的那个时候还没能被挂载,如果用uclibc好像就可以了

独闯女儿国 2022-07-25 04:59:02

大哥还有个问题
为什么我加载解压后的ramdisk串口会有以下显示:

[21474550.175000] VFS: Mounted root (ext2 filesystem) readonly.

[21474550.195000] Mounted devfs on /dev

[21474550.200000] Freeing init memory: 92K

[21474550.210000] EXT2-fs error (device ram0): ext2_check_page: bad entry in directory #144: inode out of bounds - offset=0, inode=655378, rec_len=872, name_len=0
到这里不动了

而我下载ramdisk.gz 的时候却是到:
[21474697.690000] VFS: Mounted root (ext2 filesystem) readonly.

[21474697.710000] Mounted devfs on /dev

[21474697.715000] Freeing init memory: 92K

Initializing random number generator... done.
这又是怎么会事呢

红ご颜醉 2022-07-25 04:59:01

楼上大哥
我技术比较粗糙,我们都没怎么用过rethat,我经常是在cygwin模拟的linux环境下做开发的
我现在的ramdisk以及里面的busybox是我们以前编译好的.而且我用2.4的内核加载过是没有问题的
我实在不是很懂命令行中  init=/linuxrc  是什么含义您能详细说明一下吗???

·深蓝 2022-07-25 04:58:46

linuxrc 是自己的还是busybox里的
inittab贴出来看看

原帖由 jojolin 于 2006-7-17 12:31 发表
上面那个问题可能是我解压ramdisk的时候有了问题吧
我 现在tftp压缩格式的ramdisk.gz
运行结果为:
Starting kernel ...

Uncompressing Linux.......................................................... ...

梦幻的味道 2022-07-25 04:57:24

上面那个问题可能是我解压ramdisk的时候有了问题吧
我 现在tftp压缩格式的ramdisk.gz
运行结果为:
Starting kernel ...

Uncompressing Linux...................................................................... done, booting the kernel.
[21474536.480000] ************test**************

[21474536.480000] Linux version 2.6.13 (Admin@WinXP-SP2) (gcc version 2.95.4 20010319 (prerelease)) #164 Mon Jul 17 11:13:35 2006

[21474536.480000] CPU: ARM920T [41129200] revision 0 (ARMv4T)

[21474536.480000] Machine: SMDK2410

[21474536.480000] Warning: bad configuration page, trying to continue

[21474536.480000] Memory policy: ECC disabled, Data cache buffered

[21474536.480000] CPU S3C2410A (id 0x32410002)

[21474536.480000] S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz

[21474536.480000] S3C2410 Clocks, (c) 2004 Simtec Electronics

[21474536.480000] CPU0: D VIVT write-back cache

[21474536.480000] CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets

[21474536.480000] CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets

[21474536.480000] Built 1 zonelists

[21474536.480000] Kernel command line: initrd=0x30800000,0x440000 mem=64M root=/dev/ram init=/linuxrc console=ttySAC0,115200

[21474536.480000] irq: clearing pending ext status 00000200

[21474536.480000] irq: clearing subpending status 00000002

[21474536.480000] PID hash table entries: 512 (order: 9, 8192 bytes)

[21474536.480000] timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8

[21474536.480000] Console: colour dummy device 80x30

[21474536.490000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

[21474536.525000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

[21474536.665000] Memory: 64MB = 64MB total

[21474536.670000] Memory: 58240KB available (1640K code, 498K data, 92K init)

[21474536.780000] Mount-cache hash table entries: 512

[21474536.800000] CPU: Testing write buffer coherency: ok

[21474536.830000] checking if image is initramfs...

[21474615.635000]

[21474615.635000] **populate_rootfs has been called**

[21474615.635000]

[21474615.645000] it isn't (no cpio magic); looks like an initrd

[21474615.650000]

[21474615.650000]

[21474615.650000]

[21474615.650000] *******0*******

[21474615.650000]

[21474615.650000]

[21474615.660000]

[21474615.660000]

[21474615.660000] ******is image-initrd******

[21474615.660000]

[21474616.290000] Freeing initrd memory: 4352K

[21474616.315000] Linux NoNET1.0 for Linux 2.6

[21474616.320000] S3C2410: Initialising architecture

[21474616.415000] SCSI subsystem initialized

[21474616.425000] usbcore: registered new driver usbfs

[21474616.430000] usbcore: registered new driver hub

[21474616.485000] NetWinder Floating Point Emulator V0.97 (double precision)

[21474616.570000] devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

[21474616.580000] devfs: boot_options: 0x1

[21474616.585000] JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.

[21474619.585000] s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410

[21474619.595000] s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410

[21474619.610000] s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410

[21474619.625000] io scheduler noop registered

[21474619.630000] io scheduler anticipatory registered

[21474619.695000] RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize

[21474619.730000] loop: loaded (max 8 devices)

[21474619.735000] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

[21474619.745000] ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx

[21474619.795000] Probing YL-9200 Application Flash at physical address 0x10000000 (16-bit buswidth)

[21474619.825000] S3C24XX NAND Driver, (c) 2004 Simtec Electronics

[21474619.840000] s3c2410-nand: mapped registers at c4880000

[21474619.850000] s3c2410-nand: timing: Tacls 40ns, Twrph0 80ns, Twrph1 80ns

[21474619.855000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)

[21474619.865000] Scanning device for bad blocks

[21474621.145000] usbmon: debugfs is not available

[21474621.155000] s3c2410-ohci s3c2410-ohci: S3C24XX OHCI

[21474621.170000] s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1

[21474621.180000] s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000

[21474621.255000] hub 1-0:1.0: USB hub found

[21474621.255000] hub 1-0:1.0: 2 ports detected

[21474621.270000] Initializing USB Mass Storage driver...

[21474621.280000] usbcore: registered new driver usb-storage

[21474621.285000] USB Mass Storage support registered.

[21474621.290000] usbcore: registered new driver usbhid

[21474621.300000] drivers/usb/input/hid-core.c: v2.01:USB HID core driver

[21474621.315000] dummy_hcd dummy_hcd: USB Host+Gadget Emulator, driver 02 May 2005

[21474621.320000] dummy_hcd dummy_hcd: Dummy host controller

[21474621.330000] dummy_hcd dummy_hcd: new USB bus registered, assigned bus number 2

[21474621.345000] hub 2-0:1.0: USB hub found

[21474621.350000] hub 2-0:1.0: 1 port detected

[21474621.370000] mice: PS/2 mouse device common for all mice

[21474621.375000] i2c /dev entries driver

[21474621.395000]

[21474621.395000]

[21474621.395000] ***********prepare_namespace has been called***************

[21474621.395000]

[21474621.440000]

[21474621.440000]

[21474621.440000] *******initrd_load has been called********

[21474621.440000]

[21474621.515000]

[21474621.515000]

[21474621.515000] *****rd_load_image has been called******

[21474621.515000]

[21474621.525000]

[21474621.525000]

[21474621.525000] ^^^^^<1> nblocks = -1071526248^^^^^

[21474621.525000]

[21474621.535000]

[21474621.535000]

[21474621.535000] ****rd_image_start = 0*****

[21474621.535000]

[21474621.540000] RAMDISK: Compressed image found at block 0

[21474621.545000]

[21474621.545000]

[21474621.545000] ^^^^^<2> nblocks = 0^^^^^

[21474621.545000]

[21474697.690000] VFS: Mounted root (ext2 filesystem) readonly.

[21474697.710000] Mounted devfs on /dev

[21474697.715000] Freeing init memory: 92K

Initializing random number generator... done.

我原来加过2.4的到这里就会进入控制台,可是现在2.6的为什么卡到这里不动了呢
哪位大哥出来给看看啊

斑竹有什么思路吗??
经理已经下了最后通牒了...

椒妓 2022-07-25 01:37:16

多谢您的关心,这是我的串口输出信息:
Uncompressing Linux...................................................................... done, booting the kernel.

[21474536.480000] Linux version 2.6.13 (Admin@WinXP-SP2) (gcc version 2.95.4 20010319 (prerelease)) #160 Fri Jul 14 17:26:11 2006

[21474536.480000] CPU: ARM920T [41129200] revision 0 (ARMv4T)

[21474536.480000] Machine: SMDK2410

[21474536.480000] Warning: bad configuration page, trying to continue

[21474536.480000] Memory policy: ECC disabled, Data cache buffered

[21474536.480000] CPU S3C2410A (id 0x32410002)

[21474536.480000] S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz

[21474536.480000] S3C2410 Clocks, (c) 2004 Simtec Electronics

[21474536.480000] CPU0: D VIVT write-back cache

[21474536.480000] CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets

[21474536.480000] CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets

[21474536.480000] Built 1 zonelists

[21474536.480000] Kernel command line: initrd=0x30800000,0x300000 root=/dev/ram init=/linuxrc console=ttySAC0,115200

[21474536.480000] irq: clearing pending ext status 00000200

[21474536.480000] irq: clearing subpending status 00000002

[21474536.480000] PID hash table entries: 128 (order: 7, 2048 bytes)

[21474536.480000] timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8

[21474536.480000] Console: colour dummy device 80x30

[21474536.485000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

[21474536.500000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

[21474536.535000] Memory: 16MB = 16MB total

[21474536.540000] Memory: 10860KB available (1640K code, 498K data, 92K init)

[21474536.645000] Mount-cache hash table entries: 512

[21474536.665000] CPU: Testing write buffer coherency: ok

[21474536.695000] checking if image is initramfs...

[21474536.710000]

[21474536.710000] **populate_rootfs has been called**

[21474536.710000]

[21474536.715000] it isn't (bad gzip magic numbers); looks like an initrd

[21474536.720000]

[21474536.720000]

[21474536.720000]

[21474536.720000] *******0*******

[21474536.720000]

[21474536.720000]

[21474536.730000]

[21474536.730000]

[21474536.730000] ******is image-initrd******

[21474536.730000]

[21474537.185000] Freeing initrd memory: 3072K

[21474537.210000] Linux NoNET1.0 for Linux 2.6

[21474537.215000] S3C2410: Initialising architecture

[21474537.305000] SCSI subsystem initialized

[21474537.315000] usbcore: registered new driver usbfs

[21474537.325000] usbcore: registered new driver hub

[21474537.375000] NetWinder Floating Point Emulator V0.97 (double precision)

[21474537.465000] devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

[21474537.475000] devfs: boot_options: 0x1

[21474537.475000] JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.

[21474540.480000] s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410

[21474540.490000] s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410

[21474540.505000] s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410

[21474540.515000] io scheduler noop registered

[21474540.520000] io scheduler anticipatory registered

[21474540.590000] RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize

[21474540.630000] loop: loaded (max 8 devices)

[21474540.635000] Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

[21474540.640000] ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx

[21474540.690000] Probing YL-9200 Application Flash at physical address 0x10000000 (16-bit buswidth)

[21474540.730000] S3C24XX NAND Driver, (c) 2004 Simtec Electronics

[21474540.745000] s3c2410-nand: mapped registers at c1880000

[21474540.750000] s3c2410-nand: timing: Tacls 40ns, Twrph0 80ns, Twrph1 80ns

[21474540.760000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)

[21474540.765000] Scanning device for bad blocks

[21474542.045000] usbmon: debugfs is not available

[21474542.055000] s3c2410-ohci s3c2410-ohci: S3C24XX OHCI

[21474542.065000] s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1

[21474542.075000] s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000

[21474542.150000] hub 1-0:1.0: USB hub found

[21474542.155000] hub 1-0:1.0: 2 ports detected

[21474542.170000] Initializing USB Mass Storage driver...

[21474542.180000] usbcore: registered new driver usb-storage

[21474542.185000] USB Mass Storage support registered.

[21474542.190000] usbcore: registered new driver usbhid

[21474542.200000] drivers/usb/input/hid-core.c: v2.01:USB HID core driver

[21474542.215000] dummy_hcd dummy_hcd: USB Host+Gadget Emulator, driver 02 May 2005

[21474542.220000] dummy_hcd dummy_hcd: Dummy host controller

[21474542.230000] dummy_hcd dummy_hcd: new USB bus registered, assigned bus number 2

[21474542.245000] hub 2-0:1.0: USB hub found

[21474542.250000] hub 2-0:1.0: 1 port detected

[21474542.270000] mice: PS/2 mouse device common for all mice

[21474542.275000] i2c /dev entries driver

[21474542.295000]

[21474542.295000]

[21474542.295000] ***********prepare_namespace has been called***************

[21474542.295000]

[21474542.340000]

[21474542.340000]

[21474542.340000] *******initrd_load has been called********

[21474542.340000]

[21474542.415000]

[21474542.415000]

[21474542.415000] *****rd_load_image has been called******

[21474542.415000]

[21474542.425000]

[21474542.425000]

[21474542.425000] ^^^^^<1> nblocks = -1071526248^^^^^

[21474542.425000]

[21474542.435000]

[21474542.435000]

[21474542.435000] ****rd_image_start = 0*****

[21474542.435000]

[21474542.440000] RAMDISK: ext2 filesystem found at block 0

[21474542.445000]

[21474542.445000]

[21474542.445000] ^^^^^<2> nblocks = 8192^^^^^

[21474542.445000]

[21474542.455000]   RAMDISK: Loading 8192KiB [1 disk] into ram disk...

[21474542.460000]

[21474542.460000] **nblocks = 8192**

[21474542.460000]

[21474542.465000]

[21474542.465000]

[21474542.465000] **devblocks = 8192**

[21474542.465000]

[21474542.470000] done.

[21474546.865000] VFS: Mounted root (ext2 filesystem) readonly.

[21474546.885000] EXT2-fs error (device ram0): ext2_check_page: bad entry in directory #2: unaligned directory entry - offset=0, inode=2, rec_len=10, name_len=1

[21474546.895000] mount_devfs_fs(): unable to mount devfs, err: -2

[21474546.905000] Freeing init memory: 92K

[21474546.905000] Warning: unable to open an initial console.

[21474546.915000] Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

[21474546.920000]  

您看看啊,帮帮忙小弟很苦脑D

顾冷 2022-07-24 23:27:34

用个好点的terminal,多抓些消息出来看看。还有,initrd放在什么设备上?

甚是思念 2022-07-22 05:03:16

楼上的大侠还在吗??
     先谢谢您了
    按照你给我出的办法,我现在的串口有了新的变化,现在输出:

   [21474546.905000] EXT2-fs error (device ram0): ext2_check_page: bad entry in directory #246: unaligned directory entry - offset=0, inode=3766694019, rec_len=49155, name_len=132

[21474546.930000] Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

这又是什么原因呢??
对了一些相关的启动信息如下:

Kernel command line: initrd=0x30800000,0x300000 root=/dev/ram init=/linuxrc console=ttySAC0,115200

[21474540.590000] RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize

您费心再帮我看看啊

猥琐帝 2022-07-21 22:28:15

原帖由 jojolin 于 2006-7-14 14:31 发表
我的2.6内核跑起来后加载RAMDISK可是总是不 能通过,期间我也遇到并解决了很多问题,可是这次兄弟真实没办法了.
       这是我的串口最后的打印信息:
[21474576.920000] VFS: Mounted root (ext2 filesystem) rea ...

将内核中ramdisk的空间调大一点试试

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文