Preparing USB Drives for Imaging
Last updated
Last updated
To install an image on a VotingWorks component, i.e., to image a machine, you need two USB drives:
A vx-iso USB drive — is our VotingWorks-specific ISO installer program.
An image USB drive — This is an empty USB drive with two partitions, a "Data" partition that can contain as many VotingWorks images as space allows and a "Keys" partition that can optionally contain the VotingWorks Secure Boot public keys, necessary if a machine hasn't had these keys installed yet.
USB drives used as vx-iso drives must be zeroed out before first use. This step will also ensure the USB drive is empty and no longer contains any previous data prior to use as installation media. You can zero out a drive with the following command, substituting /dev/sdX
with the appropriate path to the USB you are using, e.g. /dev/sda
Drives provided by VotingWorks are also initialized with this process. If you have existing drives that were zeroed out and are properly partitioned, you can skip these steps and simply copy a VotingWorks image file directly to the USB. Those instructions can be found at the bottom of this page in the Copying an image file to a previously configured USB drive section.
Clone the vx-iso repo for the tooling necessary to prepare the above:
to create a vx-iso and/or image USB drive.
You'll need access to the relevant images and optionally the VotingWorks Secure Boot public keys. Both of these are stored on a private S3 bucket, though they're not sensitive, and VotingWorks can prepare temporary links to grant access to them.
For this example, we will assume that you have a signed vxadmin image on the build machine. It will be located in the root user's home directory and be named vxadmin-signed.img.lz4
We will also assume the USB drive is automatically mounted by the vx user, with the Data partition located at:
As the vx user, first verify the USB is mounted at the path above. An easy way to test is with the following command:
That command should return without an error. It may list one or more images if they were already on the USB drive. That's ok. (You can delete any existing images from the USB drive if you like, but it is not necessary.)
Since the signed image file is located in the root user's home directory by default, we'll use that path. As mentioned earlier, we will use a vxadmin image for this example. That path would be:
To copy the image to the USB drive, run the following command as the vx user:
Once the copy and sync completes, you can eject the USB drive and remove it. It is now ready to image a machine. Repeat this process with any other USB drives and VotingWorks image files as required.