NFS boot via TFTP rootfs not mount issue.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

NFS boot via TFTP rootfs not mount issue.

7,977件の閲覧回数
sbmd_1234
Contributor III

Hi NXP Team,

I am trying to boot the board via TFTP using NFS for which I've done setup in my host system also which is as : 

Step-1 : 

sudo apt install nfs-kernel-server

sudo mkdir -p /srv/rootfs

copied the filesystem in /srv/rootfs

sudo nano /etc/exports

/srv/rootfs *(rw,sync,no_root_squash,no_subtree_check)

sudo exportfs -a

sudo systemctl start nfs-kernel-server


Step-2 :  u-boot 

setenv serverip 192.168.1.23

setenv ipaddr 192.168.1.1

tftpboot (kernel image)

tftpboot(dtb file)

setenv bootargs 'console=ttyLP0,115200 root=/dev/nfs nfsroot=192.168.1.23:/srv/rootfs earlycon=pl011,mmio32,0x21c0000 ramdisk_size=0x2000000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 pci=pcie_bus_perf'


booti 0x80400000 - 0x83000000  (booting with kernel and dtb)


Step-3 : 

The kernel is able the boot but at last filesystem mounting issue is coming : 

logs : 

[ 12.169473] platform imx93-lpm: deferred probe pending
[ 62.601173] cfg80211: failed to load regulatory.db
[ 99.465609] VFS: Unable to mount root fs via NFS.
[ 99.470512] devtmpfs: mounted
[ 99.475319] Freeing unused kernel memory: 3968K
[ 99.480152] Run /sbin/init as init process
[ 99.484470] Run /etc/init as init process
[ 99.488603] Run /bin/init as init process
[ 99.492720] Run /bin/sh as init process
[ 99.496679] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.
[ 99.510826] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.23-lts-next-gcf875fe1b7ef #1
[ 99.518726] Hardware name: Evercharge evermesh module (DT)
[ 99.524196] Call trace:
[ 99.526640] dump_backtrace+0x90/0xe8
[ 99.530305] show_stack+0x18/0x24
[ 99.533615] dump_stack_lvl+0x48/0x60
[ 99.537273] dump_stack+0x18/0x24
[ 99.540583] panic+0x31c/0x378
[ 99.543635] kernel_init+0x19c/0x1dc
[ 99.547205] ret_from_fork+0x10/0x20
[ 99.550779] Kernel Offset: disabled
[ 99.554260] CPU features: 0x0,c0000000,40028143,1000721b
[ 99.559563] Memory Limit: none
[ 99.562610] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-g-




can you please guide me on how I can boot the device with NFS mounting and get the prompt?


Thanks. 



0 件の賞賛
返信
9 返答(返信)

7,965件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @sbmd_1234!

 

What board are you using?

 

What BSP Version are you using?

 

I will try to replicate by my side.

 

Best Regards!

Chavira

0 件の賞賛
返信

7,920件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport
 
0 件の賞賛
返信

7,947件の閲覧回数
sbmd_1234
Contributor III

Hi @Chavira,

I am working on i.MX93 EVK board and BSP version is 6.6 from the latest yocto project user guide.


Thanks.

0 件の賞賛
返信

7,934件の閲覧回数
sbmd_1234
Contributor III

Hi @Chavira 

Thanks for your help!

Any update on this?

0 件の賞賛
返信

7,921件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @sbmd_1234!

 

I am able to boot from nfs.

 

The steps that I am following are the next>

 

Step-1 : 

sudo apt install nfs-kernel-server

sudo mkdir -p /srv/rootfs

copied the filesystem in /srv/rootfs

sudo nano /etc/exports

/srv/rootfs  <target ip> *(rw,sync,no_root_squash,no_subtree_check)

sudo exportfs -a

sudo systemctl start nfs-kernel-server

 

Step-2 :  u-boot 

setenv serverip <Host ip>

setenv ipaddr 192.168.1.1

setenv nfsroot  /srv/rootfs/

saveenv

run netboot

 

I attached my u-boot environment

0 件の賞賛
返信

7,893件の閲覧回数
sbmd_1234
Contributor III

Hi @Chavira 


Thanks for your follow-up!

I've followed your steps, step-1 is fine but I am having doubt in step-2 u-boot commands because after "run netboot" device is not booting ? Do we need to assign DHCP Ip?

I want to load the NFS by setting the u-boot's serverip to static IP.

 

logs :

u-boot=> setenv serverip 192.168.1.23
u-boot=> setenv ipaddr 192.168.1.1
u-boot=> setenv nfsroot /srv/rootfs/
u-boot=> save
save saveenv
u-boot=> saveenv
Saving Environment to MMC... Writing to MMC(1)... OK



Please help with this.


Thanks.

タグ(1)
0 件の賞賛
返信

7,871件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

HI @sbmd_1234!

I get the same error like you after stop the nfs-kernel-server service.

Maybe your first configuration is good but your nfs server is not active or not configured  correctly.

 

Best Regards!

Chavira

0 件の賞賛
返信

7,754件の閲覧回数
sbmd_1234
Contributor III

Hi @Chavira,

I am not able to boot via nfs I've tried multiple times but could not resolve the issue.

These are the proper steps I am following please tell me where I am doing wrong configuration : 


sudo apt install nfs-kernel-server

sudo mkdir -p /srv/rootfs

sudo cp -r <filesystem> to /srv/rootfs/

sudo vi /etc/exports

/srv/rootfs 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)

sudo exportfs -a

sudo /etc/init.d/nfs-kernel-server restart

sudo systemctl start nfs-kernel-server

 

status of service : 

sudo systemctl status nfs-kernel-server
* nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/nfs-server.service.d
`-order-with-mounts.conf
Active: active (exited) since Tue 2024-11-05 15:25:31 IST; 19s ago
Main PID: 21305 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 18769)
Memory: 0B
CGroup: /system.slice/nfs-server.service

Nov 05 15:25:30 6499--IOT--MCP7 systemd[1]: Starting NFS server and services...
Nov 05 15:25:31 6499--IOT--MCP7 systemd[1]: Finished NFS server and services.


board side : 

setenv serverip 192.168.1.23
setenv ipaddr 192.168.1.1
run netboot



Please help to resolve this : 





here is my u-boot args : 


0 件の賞賛
返信

7,592件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @sbmd_1234!

The correct steps that I have following are the next:

HOST SIDE:

$ sudo apt install nfs-kernel-server
$ sudo mkdir -p /srv/rootfs
$ cd /srv/rootfs
$ sudo tar --numeric-owner -xvf imx-image-full-imx93evk.tar.zst
$ sudo nano /etc/exports

/srv/rootfs/ *(rw,async,no_root_squash,no_subtree_check)

$ sudo exportfs -a
$ sudo service nfs-kernel-server restart


Board Side:

u-boot -> setenv serverip <HOST IP>
u-boot -> setenv nfsroot /srv/rootfs
u-boot -> saveenv 
u-boot -> run netboot

 

I attached my log file

Best Regards!

Chavira

0 件の賞賛
返信