Template:SDCardImage

From Phidgets Support

If you would like to reflash your micro SD card, your first step will be to download the SBC4 SD Card Image. The next step will differ based on your operating system. If you are going to be using a Windows machine, keep reading, otherwise, you can jump ahead here:

Windows

You should have already completed the first step, which is downloading the SD card image:


Next, you will need to download some software in order to write the image file to the SD card. We recommend using Win32 Disk Imager.


After downloading and running Win32 Disk Imager, make sure your SD card is plugged in. Select it on the right hand side under device :


Next, browse for the image file you previously downloaded and select it:


Finally, press the Write button:


After writing, you are almost done. The next step is to plug the SD card back into the SBC and expand the file system. Jump ahead to expanding your file system.

macOS

You should have already completed the first step, which is downloading the SD card image:


Next, make sure your SD card is plugged in, and enter the following into your terminal:

  • diskutil list

This will list all of the devices currently mounted on your system:


After verifying which device is your SD card, unmount it using the following command:

  • diskutil unmountDisk /dev/diskX

Warning: Ensure you are writing to the correct disk


Next, we can write the image file to the SD card:

  • if= path to your image file
  • of = where to write output (note using rdisk instead of disk will result in faster write times)


After writing, you are almost done. The next step is to plug the SD card back into the SBC and expand the file system. Jump ahead to expanding your file system.

Linux

You should have already completed the first step, which is downloading the SD card image:

Next, make sure your SD card is plugged in, and enter the following into your terminal:

  • dh -f

This will list all of the devices currently mounted on your system:


After verifying which device is your SD card, unmount it using the following command:

  • umount /dev/sdXX


Next, we can write the image file to the SD card:

  • if= path to your image file
  • of = where to write output (note: do not include partition number)

Warning: Ensure you are writing to the correct disk


After writing, you are almost done. The next step is to plug the SD card back into the SBC and expand the file system.

Expanding your File System

After writing the image file to your SD card, you will need to expand the file system size in order to take advantage of the full capacity of your card. In order to do this, you must run the expandfs.sh script which can be accessed at the / directory as shown here:


Note: if you plan on using SSH in order to run this script, you will need to enable SSH first (as it is turned off by default). Enabling SSH was covered above in the SSH section.


Next, simply run the script:


The SBC will automatically reboot, and your file system will be expanded. You can confirm that it has expanded by checking the file system size report.