Skip to content
/ 9pfsPkg Public

Painless Network-Transparent Network Boot with 9P

License

Notifications You must be signed in to change notification settings

yabits/9pfsPkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

9pfsPkg

.github/workflows/config.yml

9pfsPkg is a Plan 9 file system protocol (9P) client for UEFI. In contrast to other network boots, it provides EFI_SIMPLE_FILE_SYSTEM_PROTOCOL interfaces for network-transparent file system operations. Any existing non-network-aware UEFI applications including bootloaders and Linux can use for 9P Boot without any modification.

9P Boot Overview

By coping with other file systems on the 9P server, 9pfsPkg enables Proxy Boot, network boot from another complicated file system like cloud storage.

Proxy Boot Overview

For more details, see the blog post.

Build 9pfsPkg

9pfsPkg requires EDK II.

# Clone EDK II repository.
$ git clone https://github.com/tianocore/edk2.git
$ cd edk2
$ git submodule update --init --recursive

# Clone 9pfsPkg in the EDK II root directory.
$ git clone https://github.com/yabits/9pfsPkg.git


# Build build tools and set environment variables.
$ make -C BaseTools
$ source ./edksetup.sh

# Build 9pfsPkg. Replace the target architecture and toolchain as you like.
$ build -p 9pfsPkg/9pfsPkg.dsc -a X64 -b RELEASE -t GCC5

Usage

To use 9pfs.efi, set the following UEFI variables with GUID g9pfsGuid (10e4a8f-ed0a-4eed-85ee-216a9d3f092e). It is recommended to create a helper application to set them.

  • StationAddr: Client IPv4 address in CHAR16 (e.g. L"10.0.2.2:564")
  • SubnetMask: Client IPv4 subnet mask in CHAR16 (e.g. L"255.255.255.0")
  • RemoteAddr: 9P server IPv4 address in CHAR16 (e.g. L"10.0.2.100:564")
  • UName: Access user name in CHAR8 (e.g. "root")
  • AName: Exported directory path in CHAR8 (e.g. "/tmp/9")
# Load 9pfsPkg UEFI driver.
FS0:\> load 9pfs.efi

# Update map.
FS0:\> map -u

# Move to the volume.
FS0:\> fs1:

Proxy Boot

Proxy Boot is one of the 9pfsPkg applications. It is booting from another file system via the 9P server. As an example of Proxy Boot, we use Google Cloud Storage (GCS) for the network boot using gcsfuse.

# Create a GCS bucket and upload boot images.

# Mount the GCS bucket.
$ sudo -E gcsfuse proxy-boot /mnt/gcs
Using mount point: /mnt/gcs
Opening GCS connection...
Opening bucket...
Mounting file system...
File system has been successfully mounted.

The below example boots BitVisor from the GCS bucket.

Shell> fs0:
FS0:\> load 9pfs.efi
FS0:\> map -u
FS0:\> fs1:
FS1:\> loadvmm.efi
Starting BitVisor...
Copyright (c) 2007, 2008 University of Tsukuba
All rights reserved.

License

9pfsPkg is released under the BSD-2-Clause Plus Patent License.

About

Painless Network-Transparent Network Boot with 9P

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages