Skip to content

WIP: mkinitfs: terrible hack to mount rootfs over NFS

postmarketOS Bot requested to merge zhuowei:nfs-root into master

Created by: zhuowei

Very hacky proof of concept for #511: this mounts /boot and / on Nexus 6P (angler) over NFS over USB.

Do not merge this.

Changes:

  • Removed existing root/boot detection code
  • Changed mount commands to mount as NFS
  • Changed DHCP range to only give out one IP address.

I'm serving NFS using my host system (Ubuntu 14.04)'s nfs-kernel-server, and I've rebuilt my device's kernel to add NFS support. The scripts I used on the host system to start NFS is here.

The way it's currently implemented prevents mounting the root FS normally. What would be a good way to integrate this into the normal initfs? Also, can we serve NFS from inside the Alpine chroot or do we need to serve NFS from the host system?

Edited by Martijn Braam

Merge request reports