- 论坛徽章:
- 0
|
制作ramdisk遇到的问题,恳请高手指教
我重新编译了内核,解决了ramdisk提示Compress ran out of range的错误 make menuconfig 的时候在general 选项里的倒数第二个选项中应该把默认的内核命令字符串设为:console=ttys0,115200 initrd=0x21000000(注:这个指明了文件系统的起始位
置),5346423(注:这个值指定文件系统的大小) root=/dev/ram rw,然后将ramdisk中的lib 换为所需的libc-2.2.3.so及它的符号连接,下到板子上运行出现如下的错误,
请问dd命令中的bs设置大小有什么要求吗?有技巧吗?
把命令写到下面,请提醒谢谢!
1. Uncompress ramdisk image
#gunzip -v ramdisk.gz
2.Mount ramdisk images
#mkdir -p /mnt/tmp
#mount -o loop ramdisk /mnt/tmp -t ext2
3.Create new ramdisk image
#dd if=/dev/zero of=new_ramdisk bs=4096 count=4096
#mke2fs -F -m0 -v new_ramdisk
#tune2fs -c 0 new_ramdisk
#mkdir -p /mnt/new
#mount -o loop new_ramdisk /mnt/new -t ext2
4.Copy files from old ramdisk to new ramdisk
#cd /mnt/tmp
#find . -depth -print|cpio -VBpdum /mnt/new
5.modify new ramdisk lib
6.Unmount ramdisk image:
#umount /mnt/tmp
#umount /mnt/new
7.Compress new ramdisk images
#gzip -v9 -c new_ramdisk>;ramdisk.gz
这是我综合网上和书上的命令,制作ramdisk images的过程
错误如下:
RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (-28 != 3276 , only wrote 8388608//猜测是bs大小的问题
Freeing initrd memory: 5221K
VFS: Mounted root (ext2 filesystem).
attempt to access beyond end of device
01:00: rw=0, want=8227, limit=8192
EXT2-fs error (device ramdisk(1,0)): ext2_read_inode: unable to read inode block
- inode=2288, block=8226
mount_devfs_fs(): unable to mount devfs, err: -5
Freeing init memory: 52K
Warning: unable to open an initial console.
attempt to access beyond end of device
01:00: rw=0, want=8205, limit=8192
EXT2-fs error (device ramdisk(1,0)): ext2_read_inode: unable to read inode block
- inode=2109, block=8204
attempt to access beyond end of device
01:00: rw=0, want=8211, limit=8192
EXT2-fs error (device ramdisk(1,0)): ext2_read_inode: unable to read inode block
- inode=2158, block=8210
Kernel panic: No init found. Try passing init= option to kernel
RAMDISK: incomplete write (-28 != 3276 , only wrote 8388608//猜测是bs大小的问题
ext2_read_inode: unable to read inode block 我猜测是无法读取的问题,请问有什么好的解决方法吗?再次表示感谢! |
|