Install Fuchsia on a NUC

This guide provides instructions on how to install Fuchsia on an Intel NUC (Next Unit of Computing) device.

The steps are:

  1. Prerequisites.
  2. Build Fuchsia.
  3. Prepare a USB drive.
  4. Enable EFI booting on the NUC.
  5. Install Fuchsia on the NUC.
  6. (Optional) Upload Fuchsia SSH keys to the NUC.

Prerequisites

Before you start installing Fuchsia on a NUC device, make sure that you've completed the following tasks:

Set up the Fuchsia development environment

To set up the Fuchsia development environment on your workstation, complete the Get started with Fuchsia guide.

Get parts

The following parts are required for this guide:

  • A NUC device (see example models)
  • A USB 3.0 flash drive
  • A keyboard
  • A mouse (Optional)
  • A monitor with an HDMI port
  • An HDMI cable
  • An Ethernet cable
  • A Phillips-head screwdriver (with a magnetic tip)

Build Fuchsia

Installing Fuchsia on a NUC device requires that you build an x64 image and generate build artifacts (which include the Fuchsia installer) on your workstation.

To build Fuchsia for NUC installation, do the following:

  1. Set your build configuration to an x64 target and include the recovery-installer package.

    fx set core.x64 --with //build/images/recovery:recovery-installer
    
  2. Build Fuchsia:

    fx build
    

    Building Fuchsia can take up to 90 minutes.

Prepare a USB drive

You need to prepare a bootable USB drive that runs the Fuchsia installer. Later in the Install Fuchsia on the NUC section, you will use this USB drive to boot your NUC into the Fuchsia installer.

To prepare a bootable USB drive, do the following:

  1. Plug the USB drive into your workstation.

  2. Identify the path to the USB drive:

    fx list-usb-disks
    

    This command prints output similar to the following:

    $ fx list-usb-disks
    /dev/sda - My Example USB Disk
    
  3. Create a bootable USB drive:

    fx mkinstaller -v PATH_TO_USB_DRIVE
    

    Replace PATH_TO_USB_DRIVE with the path to the USB drive from the step above.

    The example command below selects the /dev/sda path:

    $ fx mkinstaller -v /dev/sda
    

    When finished, the command prints output similar to the following in the end:

    $ fx mkinstaller -v /dev/sda
    mkinstaller: WARNING: Changing ownership of /dev/sda to alice
    [sudo] password for alice:
    ...
    mkinstaller: INFO:    Writing image fvm.sparse.blk to partition storage-sparse...
    mkinstaller: INFO:      Wrote 835.6M in 35.55s, 23.5M/s
    mkinstaller: INFO: Done.
    mkinstaller: INFO: Ejected USB disk
    
  4. Unplug the USB drive from the workstation.

Enable EFI booting on the NUC

Update your NUC's BIOS setup so that it can boot from a USB drive.

Two versions of BIOS are available on NUC devices: Visual BIOS (for instance, NUC7) and Aptio V BIOS (for instance, NUC11). The steps are slightly different depending on which BIOS is included in your system.

Visual BIOS

Visual BIOS

Figure 1. A screenshot of Visual BIOS

To enable EFI (Extensible Firmware Interface) booting on your NUC, do the following:

  1. Reboot your NUC.
  2. To enter the BIOS setup, press F2 while booting.
  3. Click the Advanced button at the top.
  4. Click the Boot tab.
  5. Click the Boot Priority tab and confirm the following settings:

    • UEFI Boot is checked.
    • Legacy Boot is unchecked.

    Visual BIOS Boot Priority tab

  6. Click the Boot Configuration tab and confirm the following settings:

    • In the UEFI Boot window:

      • Boot USB Devices First is checked.
      • Boot Network Devices Last is checked.
      • Unlimited Network Boot Attempts is checked.
    • In the Boot Devices window:

      • USB is checked.
      • Network Boot is set to UEFI PXE & iSCSI.

    Visual BIOS Boot Configuration

  7. Click the Secure Boot tab and confirm the following settings:

    • Secure Boot is unchecked.

    Visual BIOS Secure Boot

  8. To save and exit BIOS, press F10 and click Yes.

Aptio V BIOS

Aptio V BIOS

Figure 2. A screenshot of Aptio V BIOS

To enable EFI (Extensible Firmware Interface) booting on your NUC, do the following:

  1. Reboot your NUC.
  2. To enter the BIOS setup, press F2 while booting.
  3. Click the Boot tab.
  4. Click Secure Boot and confirm the following settings:

    • Secure Boot is set to Disabled.

    Aptio V BIOS Secure Boot

  5. To return, click the < button on the left.

  6. Click Boot Priority and confirm the following settings:

    • UEFI Boot is checked.
    • Legacy Boot is unchecked.

    • Boot USB Devices First is checked.

    • Boot Network Devices Last is checked.

    • Unlimited Boot to Network Attempts is checked.

    • USB is checked.

    • Network Boot is set to UEFI PXE & iSCSI.

    Aptio V BIOS Boot Priority

  7. To save and exit BIOS, press F10 and click Ok.

Install Fuchsia on the NUC

Use the bootable USB drive to boot your NUC into the Fuchsia installer. It then installs the x64 image (which was built in the Build Fuchsia section) to the NUC.

To install Fuchsia on your NUC, do the following:

  1. Plug the bootable USB drive into the NUC.

  2. Reboot your NUC.

    The NUC boots into the Fuchsia Installer (with a pink background).

  3. Press Enter to select the Install from USB option.

  4. Press Enter on other prompts to continue.

  5. Once the installation completes, unplug the USB drive from the NUC device.

  6. Reboot the NUC device.

    The NUC is now booted into Fuchsia.

(Optional) Upload Fuchsia SSH keys to the NUC

If you plan on using this NUC device for Fuchsia development, you need to flash a Fuchsia image to the NUC device from your host machine, which in turn uploads the Fuchsia-specific SSH keys to the NUC. Once those Fuchsia-specific SSH keys are uploaded to the NUC, you can perform ffx-based workflows on the NUC from your host machine.

To upload Fuchsia SSH keys to the NUC, do the following:

  1. Complete the steps in the Flash a new Fuchsia image to the NUC section in Appendices.

  2. To verify that you can connect to the NUC from the host machine, run the following command:

    ffx target show
    

    This command prints output similar to the following:

    $ ffx target show
    Target:
        Name: "fuchsia-54b2-0389-644b"
        SSH Address: "fe81::55b1:2ff2:fe34:567b%en10:22"
    Board:
        Name: "default-board"
        Revision: "1"
        Instruction set: "x64"
    ...
    

Appendices

Supported NUC models

For GPU support, get a NUC7 (Kaby Lake) or NUC8 (Coffee Lake), or a higher generation.

The list below shows some example models:

Flash a new Fuchsia image to the NUC

Once a NUC is running Fuchsia, you can use Fuchsia's flashing mechanism to provision a new Fuchsia image to the NUC.

To flash a Fuchsia image to your NUC, do the following:

  1. Connect the NUC directly to the workstation using an Ethernet cable.

    (Or you can also connect the NUC to a router or WiFi modem in the same Local Area Network as the workstation.)

  2. Reboot your NUC.

  3. On Fuchsia's boot screen, press the f key to select the fastboot option.

    Once the NUC is in Fastboot mode, it prints Fastboot TCP is ready on the screen.

  4. On your workstation, discover the NUC in Fastboot mode:

    ffx target list
    

    This command prints output similar to the following:

    $ ffx target list
    NAME                      SERIAL       TYPE       STATE       ADDRS/IP                           RCS
    fuchsia-54b2-0389-644b    <unknown>    Unknown    Fastboot    [fe81::55b1:2ff2:fe34:567b%en10]    N
    

    Verify that the device's state is Fastboot.

  5. Flash a new Fuchsia image to the NUC:

    fx flash
    

    If you have multiple devices connected to the host machine previously, you may need to explicitly specify the name of the NUC device, for example:

    fx flash -s fuchsia-54b2-0389-644b
    

    When finished, the NUC reboots and starts running the new Fuchsia image.

Remote management of NUC devices

To enable remote management, including KVM, you need to configure Intel AMT (Active Management Technology).

First, configure Intel ME on your NUC:

  1. Reboot your NUC.
  2. Enter Intel ME settings by pressing Ctrl+P on the boot screen.
  3. Select MEBx Login
  4. Set up a new password, the default one is admin.

  5. Configure network:

    1. Select Intel(R) AMT Configuration.
    2. Unconfigure existing network settings:

      1. Select Unconfigure Network Access
      2. Select Full Unprovision
      3. Press Y to confirm.
    3. Select Network Setup > TCP/IP Settings > Wired LAN IPV4 Configuration.

    4. Set DHCP Mode to Disabled.

    5. Set IPV4 Address to an address reachable from your host machine via the EdgeRouter.

      On your host machine, run ifconfig and find the entry that corresponds to the EdgeRouter, for example:

      $ ifconfig
      enx00e04c0c13ba: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
              inet 192.168.42.86  netmask 255.255.255.0  broadcast 192.168.42.255
              ...
      

      In this case, you could try using the address 192.168.42.20

    6. Set Subnet Mask Address to the netmask of your host machine to EdgeRouter connection, for example 255.255.255.0.

    7. Press Esc until you return to Intel(R) AMT Configuration.

    8. Select Activate Network Access and press Y to confirm.

    9. Exit Intel ME settings and save your changes.

Now, configure the amtctrl command-line utility on your host machine:

These instructions assume you have set some environment variables:

  • AMT_HOST: The IPv4 address you configured in the Intel ME settings.
  • AMT_PASSWORD: The password you chose for Intel ME.
  • VNC_PASSWORD: A password for accessing the NUC over VNC.
  1. Clone the amtctrl repository:

    git clone https://github.com/sdague/amt
    
  2. Install amtctrl:

    cd amt && sudo ./setup.py install
    
  3. Configure NUC IP address and passwords:

    amtctrl set -V $VNC_PASSWORD nuc $AMT_HOST $AMT_PASSWORD
    
  4. Enable VNC:

    amtctrl nuc vnc
    

Now, you can access the NUC from your host machine using any VNC client by connecting to the IP address set in AMT_HOST. Enter the password set in VNC_PASSWORD when prompted.

You can also turn on, turn off or reboot the NUC with the following terminal commands:

  • To turn on the NUC:

    amtctrl nuc on
    
  • To turn off the NUC:

    amtctrl nuc off
    
  • To reboot the NUC:

    amtctrl nuc reboot