Note:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Frankenchroot/Live NFS Frankenchroot"

From Funtoo
Jump to navigation Jump to search
(Created page with "===''Exporting Your Remote Mounts with NFS''=== * On your target system we must setup our directories to be network exported to the host system. {{file|name=/etc/exports|de...")
 
Line 6: Line 6:
{{file|name=/etc/exports|desc=NFS file systems being exported|body=
{{file|name=/etc/exports|desc=NFS file systems being exported|body=
# /etc/exports: NFS file systems being exported.  See exports(5).
# /etc/exports: NFS file systems being exported.  See exports(5).
/  
/     192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check)
192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check)
/boot/ 192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check)
/boot/  
/dev/ 192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check,fsid=77)
192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check)
/dev/  
192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check,fsid=77)
}}
}}


===''Mounting Your NFS Exports Locally and Binding Pseudo Filesystems''===
===''Mounting Your NFS Exports Locally and Binding Pseudo Filesystems''===


* We must then mount our exported directories on our host system and bind mount our psuedo filesystems.
* We must then mount our exported directories on our host system and bind mount our pseudo filesystems.


{{console|body=
{{console|body=

Revision as of 21:49, February 24, 2019

Exporting Your Remote Mounts with NFS

  • On your target system we must setup our directories to be network exported to the host system.
   /etc/exports - NFS file systems being exported
# /etc/exports: NFS file systems being exported.  See exports(5).
/      192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check)
/boot/ 192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check)
/dev/  192.168.0.0/24(insecure,no_root_squash,nohide,rw,sync,no_subtree_check,fsid=77)

Mounting Your NFS Exports Locally and Binding Pseudo Filesystems

  • We must then mount our exported directories on our host system and bind mount our pseudo filesystems.
root # mount foo.local:/ /mnt/piroot
root # mount -t proc /proc /mnt/piroot/proc
root # mount --rbind /sys /mnt/piroot/{sys,dev} 
root # mount --make-rslave /mnt/piroot/{sys,dev} 
root # mount -t devpts none /mnt/piroot/dev/pts
   Note

You can safely ignore setting up NFS exports and mount the target filesystem locally with an sdcard reader if you desire. Mounting over NFS just makes for a more versatile setup without the need to transfer sdcards.

   Tip

(For Better Performance!) mount a tmpfs on top of /mnt/piroot/var/tmp/portage

root # mount -v -t tmpfs -o size=8G,mode=775,uid=portage,gid=portage,nr_inodes=0 tmpfs /mnt/piroot/var/tmp/portage


Local Configuration

Editing make.conf

  • First, add the following to /etc/portage/make.conf on the host system :
   /etc/portage/make.conf - Portage make.conf file
QEMU_USER_TARGETS="aarch64 arm"
FEATURES="-sandbox -ipc-sandbox -usersandbox candy"