RAMDISK: incomplete write-解決辦法

</pre>boot過程中系統hang住了。<pre name="code" class="objc">RAMDISK: incomplete write (15544 != 32768)
write error
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 356K (c000000000ab1000 - c000000000b0a000)
attempt to access beyond end of device
ram0: rw=0, want=2057816, limit=2000000
attempt to access beyond end of device
ram0: rw=0, want=2057816, limit=2000000
attempt to access beyond end of device
ram0: rw=0, want=2124656, limit=2000000
attempt to access beyond end of device
ram0: rw=0, want=2124656, limit=2000000
attempt to access beyond end of device
ram0: rw=0, want=2124656, limit=2000000
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.12.19-rt30-00587-geed19d7 #12
Call Trace:
[c0000000f90bfbc0] [c0000000000074ec] .show_stack+0x7c/0x1cc (unreliable)
[c0000000f90bfc90] [c0000000007d5664] .dump_stack+0x84/0xb0
[c0000000f90bfd10] [c0000000007d2968] .panic+0xec/0x25c
[c0000000f90bfda0] [c000000000001a10] .kernel_init+0x1b8/0x7a8
[c0000000f90bfe30] [c000000000000888] .ret_from_kernel_thread+0x5c/0xd4
Rebooting in 180 seconds..


仔細查找原因,原來是因爲我的bootargs啓動參數,ramdisk大小設置成1M了。。。

setenv othbootargs      ramdisk_size=1000000 log_buf_len=128K no_console_suspend


但是我的文件系統大小爲360M

[zhangzy@titan ~]$ ls -hal /tftpboot/b46552/t1040rdb/pm/fsl-image-full-t1040rdb-64b.ext2.gz.u-boot
-rw-r--r-- 1 zhangzy klocwork 360M Dec  3 15:19 /tftpboot/b46552/t1040rdb/pm/fsl-image-full-t1040rdb-64b.ext2.gz.u-boot


所以需要調整bootargs啓動參數ramdisk_size大小才行,我決定它擴容爲400M

setenv othbootargs      ramdisk_size=400000000 log_buf_len=128K no_console_suspend


再試一次,系統果然boot起來了。


不過,有同事說,這麼大的文件系統不適合用ramdisk的方式啓動,應該用nfsroot方式。這個議題留待下回分解。


發佈了24 篇原創文章 · 獲贊 15 · 訪問量 16萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章