Booting from NVMe drive

To make a NVMe bootable, follow these steps:

Format the NVMe drive

Using a suitable file system (such as FAT32 or EXT4) format the NVMe.

  1. Insert the NVMe into your computer. You can use a USB-to-NVMe adapter if required.

  2. Open the File Explorer and right-click on the NVMe drive.

  3. Select Format from the drop-down menu.

  4. Select the desired file system (e.g., FAT32) and click Start.

  5. Click OK to confirm the formatting.

  1. Insert the NVMe into your computer. Use USB-to-NVMe adapter if required. You can use the lsblk command to list the available disks.

  2. Open the Disks application if you are using a GUI.

  3. Select the NVMe from the left panel.

  4. Click on the Additional partition options icon and select Format Partition.

  5. Select the desired file system (e.g., FAT32) and click Next.

  6. Click Format to confirm the formatting.

  1. Insert the NVMe into your computer.

  2. Open the terminal and run the following command to list the available disks:

sudo parted /dev/nvmeXn1

Note

You can use the lsblk command to list the available disks.
In the above command, nvme``**X**``n1 is the name of the NVMe drive.
`X` is the number of the NVMe drive, it starts from 0.
../../../_images/parted-overview.webp

  1. the following command to print the partition table:

(parted) print

../../../_images/parted-partitions-list.webp
  1. Delete the existing partitions using the following command:

(parted) rm 1
(parted) rm 2
...
  1. After deleting all the partitions, the partition table should look like this:

../../../_images/parted-deleted-partitions.webp

  1. Finally, quit the parted tool using the following command:

(parted) quit
  1. Insert the NVMe into your computer.

  2. Open the terminal and run the following command to list the available disks:

sudo fdisk /dev/nvmeXn1

Note

You can use the lsblk command to list the available disks.
In the above command, nvme``**X**``n1 is the name of the NVMe drive.
`X` is the number of the NVMe drive, it starts from 0.
  1. Press d to delete the existing partition. Do this for all the partitions.

  2. After deleting all the partitions, the partition table should be empty.

  3. Finally, press w to write the changes to the disk.

Download the bootable image

Obtain the bootable image or operating system files for your desired platform.

Note

For Vaaman, you can download the bootable image from the Downloads page.
The bootable image is available in the RAW images section.

Write the image to the NVMe

Warning

Make sure you have selected the correct NVMe drive before writing the image.
Writing the image to the wrong NVMe will erase all the data on the NVMe.

You can use any disk imaging tool such as Etcher or Win32 Disk Imager to write the image to the NVMe.

For demonstration purposes, we will use the Balena Etcher tool to write the image to the NVMe.

  1. Open the Balena Etcher tool.

../../../_images/balena-start.webp

  1. Click on Select Image and select the image file.

../../../_images/balena-select-image.webp

  1. Click on Select Target and select the NVMe.

../../../_images/balena-select-storage.webp

  1. Click on Flash to start writing the image to the NVMe.

../../../_images/balena-start-flash.webp

  1. Once the writing process is complete, click on Done.

../../../_images/balena-flash-complete.webp
  1. Open the terminal and run the following command to write the image to the NVMe:

sudo dd if=/path/to/image of=/dev/nvmeX bs=4M status=progress; sync

Note

Replace /path/to/image with the path to the image file.
You can use the lsblk command to list the available disks.
In the above command, nvme``**X**``n1 is the name of the NVMe drive.
`X` is the number of the NVMe drive, it starts from 0.
  1. Wait for the writing process to complete.

  2. Once the writing process is complete, Safely eject the NVMe from your computer.

Boot from the NVMe

After writing the image to the NVMe, follow these steps to boot from the NVMe:

  1. Safely eject the NVMe from your computer.

  2. Insert the NVMe into your Vaaman SBC.

../../../_images/vaaman-nvme-pcie-interface.webp

Place the NVMe board on top of Vaaman and secure it by tightening the nuts.

../../../_images/vaaman-nvme-module.webp

  1. Power-on the device to initiate the boot process from the NVMe.

Connect the PD cable to the Vaaman SBC and the PD adapter to the power socket. Once the power is connected, the board will automatically turn on.

Danger

12V Power Input only! Do not use 5V power input.

../../../_images/Power_option.webp