Bootable USB

Overview

dd is a command line utility for FreeBSD that allows the rXg to write to a USB drive. This capability is beneficial if you have out-of-band access to a rXg such as IPMI or iDRAC and wish to reinstall the OS remotely.

As with any remote operation, things can go wrong, so only perform these steps if you are willing to accept the risk. Make sure to have a backup plan, such as deploying somebody to the site if this process fails.

Once this process is complete, make sure that you either remove the USB drive or change the boot order of the system to avoid booting to the USB during a power cycle.

Process

  1. SSH to the rXg and ensure you are root.

  2. Check if the USB is plugged in by typing geom disk list. You can also get the drive name here for later in the process. In the image below, you can see a SanDisk Ultra USB is plugged in with a name of 'da0'.

  1. The next step is to get the source .img file on the rXg. There are many methods that can be used to accomplish this. In this example, the image file will be directly downloaded from the RG Nets build server. Now the rXg will fetch the image using wget.

cd /tmp

wget --user your_user_name --ask-password https://build.rgnets.com/build/official/iso/13.1-RELEASE-amd64-rxg-14.065.img

After submitting the above command, you should see the progress of the file download.

  1. Unmount the media

umount -f /media/

  1. Finally, use dd to write the file to the USB. Note the drive name 'da0' may be different in your environment. You can use geom disk list to check.

dd if=/tmp/13.1-RELEASE-amd64-rxg-14.065.img of=/dev/da0 bs=1m conv=noerror,sync

Once you have issued the dd command, you will have to wait for some time. The amount of time will vary based on the type of USB drive being used. It could be anywhere from 10 minutes to multiple hours. You can open a separate session and type gstat -p to see if the USB drive is busy.

When the CLI returns, the USB is ready to be used.

Once the installation is complete, make sure that you either remove the USB drive or change the boot order of the system to avoid booting to the USB during a power cycle.


Cookies help us deliver our services. By using our services, you agree to our use of cookies.