您尚未登录。

楼主 #1 2018-11-03 13:54:09

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

nfs挂载rootfs文件系统

V3S板子想通过nfs挂载方式启动rootfs文件,修改后发现启动不了kernel
修改u-boot参数后启动信息

U-Boot 2017.01-rc2-00057-g32ab180-dirty (Oct 31 2018 - 22:10:51 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
reading zImage
3931528 bytes read in 207 ms (18.1 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
12105 bytes read in 27 ms (437.5 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dfff48 ... OK

Starting kernel ...

在u-boot命令行主要进行了以下修改参数

setenv bootargs root=/dev/nfs nfsroot=10.23.13.250:/home/nfs/rootfs ip=10.23.13.10010.23.13.250:10.23.13.1:255.255.252.0::ens33:off init=linuxrc console=ttySAC2,115200
setenv ipaddr 10.23.13.100
setenv netmask 255.255.252.0
setenv gatwayip 10.23.13.1
setenv serverip 10.23.13.250
saveenv

用的4.1.3y内核,ubuntu下已经开启nfs服务,其中/home/nfs/rootfs 为nfs服务器目录,会是什么原因导致读取不了kernel呢,原来我是将rootfs解压到tf卡的第二个分区中的

离线

楼主 #2 2018-11-03 14:11:53

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nfs挂载rootfs文件系统

可以启动内核了修改console=ttyS0就可以启动了,但是出现了新的问题

[   13.846063] vcc5v0: disabling
[   13.849045] ALSA device list:
[   13.852010]   #0: V3s Audio Codec

离线

楼主 #3 2018-11-03 14:16:09

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nfs挂载rootfs文件系统

[   13.846063] vcc5v0: disabling
[   13.849045] ALSA device list:
[   13.852010]   #0: V3s Audio Codec
[  109.926754] VFS: Unable to mount root fs via NFS, trying floppy.
[  109.933334] VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
[  109.940659] Please append a correct "root=" boot option; here are the available partitions:
[  109.949032] b300         1932288 mmcblk0 
[  109.949036]  driver: mmcblk
[  109.955831]   b301           20480 mmcblk0p1 adb9da71-01
[  109.955834] 
[  109.962647]   b302         1909760 mmcblk0p2 adb9da71-02
[  109.962650] 
[  109.969455] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[  109.977713] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero+ #6
[  109.985009] Hardware name: Allwinner sun8i Family
[  109.989746] [<c010e4c4>] (unwind_backtrace) from [<c010b218>] (show_stack+0x10/0x14)
[  109.997489] [<c010b218>] (show_stack) from [<c066187c>] (dump_stack+0x84/0x98)
[  110.004712] [<c066187c>] (dump_stack) from [<c011b544>] (panic+0xdc/0x248)
[  110.011592] [<c011b544>] (panic) from [<c09011ec>] (mount_block_root+0x198/0x26c)
[  110.019070] [<c09011ec>] (mount_block_root) from [<c09013e4>] (mount_root+0x124/0x12c)
[  110.026982] [<c09013e4>] (mount_root) from [<c090153c>] (prepare_namespace+0x150/0x198)
[  110.034981] [<c090153c>] (prepare_namespace) from [<c0900e24>] (kernel_init_freeable+0x1bc/0x1cc)
[  110.043845] [<c0900e24>] (kernel_init_freeable) from [<c0674198>] (kernel_init+0x8/0x110)
[  110.052016] [<c0674198>] (kernel_init) from [<c0107578>] (ret_from_fork+0x14/0x3c)
[  110.059589] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
-Boot SPL 2017.01-rc2-00057-g32ab180-dirty (Oct 31 2018 - 22:10:51)
DRAM: 64 MiB
Trying to boot from MMC1

离线

#4 2018-11-03 14:26:45

晕哥
管理员
注册时间: 2017-09-06
已发帖子: 9,342
积分: 9202

Re: nfs挂载rootfs文件系统

参考一下这个帖子: https://whycan.cn/t_1766.html





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn