Using a Linux Host to Create a Bootable Device

These steps outline the process for creating a bootable device on a Linux* based workstation. Where the .wic image is supplied in a compressed format, it should be expanded (uncompressed) prior to this process. For example, a .xz format file can be expanded (uncompressed) using the xz-utils unxz application.

  1. Connect your USB flash drive or microSD card to your host computer.
  2. Open a Terminal window.
  3. If you are not sure about the media device name of your drive, enter the command:

lsblk

to show the block-level devices; a USB drive usually shows up as /sdb or /sdc (almost never as /sda), and an SD card would usually show up as /dev/mmcblk0.

In the steps below, you should specify the whole device you’re writing to (for example, /dev/sdb or /dev/mmcblk0) and not just a partition on that device (e.g., /dev/sdb1 or /dev/mmcblk0p1).



As an alternative to lsblk, you can use the dmesg command to view the system log and see to which device the USB drive or microSD card was assigned.

  1. After verifying your removable media device name, you’ll need to unmount the device before writing to it. Enter the following command, where sdX is the name of your USB drive (for example, sudo umount /dev/sdb*):

sudo umount /dev/sdX*

  1. In a Terminal window on your host, run the following command.

    Be sure to replace os-image with the location of your extracted Ref-OS-IoT image and sdX with the name of your boot device (for example, /dev/sdb). The command will overwrite all content on the device, so be careful to specify the correct media device.

sudo dd bs=4M if=os-image of=/dev/sdX status=progress && sync

In the example command below, /dev/sdb is the destination USB device on the host machine:

sudo dd bs=4M if=/path/to/full-image-intel-5xx-64-6.wic of=/dev/sdb status=progress && sync

Troubleshooting

If your version of dd doesn't support the status=progress option, which displays progress information on the copying process, you may see an error message about status=progress. You can simply remove this option from the command to copy the image without showing progress information. For example:

sudo dd bs=4M if=/path/to/full-image-intel-5xx-64-6.wic of=/dev/sdb && sync

If you see a message complaining about a numeric value, your computer may be balking at the inclusion of the block size argument, bs=4M. You can move this option to the end of the command or leave it out entirely; the write process may be slower if you do the latter. For example:

sudo dd if=/path/to/full-image-intel-5xx-64-6.wic of=/dev/sdb status=progress && sync

If you continue to have issues with the write command, remove all extra options from the command and try again. For example:

sudo dd if=/path/to/full-image-intel-5xx-64-6.wic of=/dev/sdb && sync

  1. Wait for your host to finish copying the Ref-OS-IoT image to the boot device. This process may take up to 20 minutes for a USB 2.0 drive. When finished, disconnect the device from your computer.

Alternate method: Use bmaptool

If you're having issues with dd, you can try using bmaptool to write to your boot device. Follow the same steps to connect your USB drive or microSD card to your host and unmount your device. Instead of using the dd command, do the following:

After verifying your removable media device name, enter the following command, where os-image is the location of your extracted Ref-OS-IoT image and sdX is the name of your boot device:

sudo -E bmaptool copy --nobmap os-image /dev/sdX

In the example commands below, /dev/sdb is the destination USB device on the host machine:

sudo -E bmaptool copy --nobmap /path/to/full-image-intel-5xx-64-6.wic /dev/sdb

The command will overwrite all content on the device, so be careful to specify the correct media device. This opens the removable media exclusively and helps prevent writing on an unintended device.

Disconnect your device from the workstation.

Loading an OS image, or an Installer Package, on the Bootable Device

Install the target Live-OS image, or copy the installer package, onto the storage device and configure the targeted files to run at boot. See Acquire Target OS File to Install for instructions.

Connect the bootable device to the platform and configure it as the target boot device, reboot and run or install the operating system from the bootable device.

 

For more complete information about compiler optimizations, see our Optimization Notice.