免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2479 | 回复: 3
打印 上一主题 下一主题

挂载根文件系统出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-09-04 10:16 |只看该作者 |倒序浏览
我的2410开发板使用的内核是2.4的,原来的vivi分区和bon分区如下:
mtd_partition_t default_mtd_partitions[] = {
  { name: "vivi",         offset: 0,                 size: 0x00020000,        flag: 0 },
  { name: "param",         offset: 0x00020000,         size: 0x00010000,        flag: 0 },
  { name: "kernel",          offset: 0x00030000,         size: 0x000d0000,        flag: 0 },
  { name: "root",         offset: 0x00100000,         size: 0x00300000,        flag: MF_BONFS },
  { name: "usr",         offset: 0x00400000,         size: 0x03cfc000,        flag: MF_YAFFS } };
bon part info:
0: 0x00000000  0x00030000      00000000    0  
1: 0x00030000  0x000d0000      00000000    0  
2: 0x00140000  0x00300000      00000000    0  
3: 0x00400000  0x03bf8000      00000000    1  
linux内核中的mtd分区为:
static struct mtd_partition def_partition_info[] = {
  { name: "bon",     offset: 0,                 size:   0x04000000},
  { name: "mtd",     offset: 0x00400000,             size:   0x03af8000}, };
此时系统正常。

由于我加了开机画面,内核编译后超出了原来的大小,所以我更改了kernel分区的大小,新的分区信息如下:
mtd_partition_t default_mtd_partitions[] = {
  { name: "vivi",         offset: 0,                 size: 0x00020000,        flag: 0 },
  { name: "param",         offset: 0x00020000,         size: 0x00010000,        flag: 0 },
  { name: "kernel",          offset: 0x00030000,         size: 0x00110000,        flag: 0 },
  { name: "root",         offset: 0x00140000,         size: 0x00300000,        flag: MF_BONFS },
  { name: "usr",         offset: 0x00440000,         size: 0x03cbc000,        flag: MF_YAFFS } };
bon part info:
0: 0x00000000  0x00030000      00000000    0  
1: 0x00030000  0x00110000      00000000    0  
2: 0x00140000  0x00300000      00000000    0   
3: 0x00440000  0x03bb8000      00000000    1   
linux内核中的mtd分区为:
static struct mtd_partition def_partition_info[] = {
  { name: "bon",     offset: 0,                 size:   0x04000000},
  { name: "mtd",     offset: 0x00440000,             size:   0x03ab8000}, };

但此时挂载文件系统时就老出错(根文件系统跟原来的相同),提示如下:
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V)
Creating 2 MTD partitions on "NAND 64MiB 3,3V":
0x00000000-0x04000000 : "bon"
0x00440000-0x03ef8000 : "mtd"
bon0: 00000000-00030000 (00030000) 00000000
bon1: 00030000-00140000 (00110000) 00000000
bon2: 00100000-00400000 (00300000) 00000000
bon3: 00440000-03ff8000 (03bb8000) 00000000
MMC/SD Slot initialized
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
cramfs: wrong magic
FAT: bogus logical sector size 36665
yaffs: dev is 24834 name is "61:02"
Kernel panic: VFS: Unable to mount root fs on 61:02

内核启动参数为:"noinitrd root=/dev/bon/2"
到底是哪里出问题了,请高人指点, 谢谢了!!!

论坛徽章:
0
2 [报告]
发表于 2007-09-04 14:40 |只看该作者
MTD的第0和1个分区大小应等于bon 的第一个分区大小
MTD的第三个分区等于bon的第二个分区,且起始地址相同
后面的类似
也就是bon的2/3/4对就MTD的kernel/root/usr

不知道对你有没有帮助,呵呵

论坛徽章:
0
3 [报告]
发表于 2007-09-04 18:56 |只看该作者
一样了也不行呀

论坛徽章:
0
4 [报告]
发表于 2007-09-04 19:53 |只看该作者
不会的吧,你part show 和bon part show 一下看看。
我原来和你一样的问题就是这么解决的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP