Support Center > Search Results > SecureKnowledge Details
How to mount a USB Drive in Gaia and SecurePlatform Technical Level
Solution

Impact on the Environment and Warnings

When mounting and unmounting devices to the filesystem, make sure not to mount over an existing filesystem (for example: /var ). This could cause problems with system stability and/or data loss.

The USB device must be formatted with FAT, FAT32, EXT2, or EXT3 file system. Gaia 3.10 also supports EXT4 and XFS file systems. NTFS or extFAT file systems are not supported.

Mounting a USB storage drive

To mount a USB drive:

  1. Insert the USB drive into the SecurePlatform or Gaia machine.

  2. Log into the SecurePlatform or Gaia machine in Expert mode.

  3. In Gaia 2.6.18, run: modprobe usb-uhci if inserted after the machine was booted.
    In Gaia 3.10, this is not required.

  4. Run: modprobe usb-storage

  5. Run dmesg
    This will show the device and partition ID that was assigned to the USB device.



    From the output above we can see that it found the device and labeled it as device sdb1. Make note of this name, as it will be needed later.
    Note: name of storage device may vary, it depends on internal library and device type.

  6. Create a directory, for example usb-storage, in the root partition "/".
    Run mkdir /usb-storage

  7. Make sure not overwrite any currently mounted partitions. Run mount /dev/sdb1 /usb-storage

  8. Run cd /usb-storage to go into the newly mounted device.

  9. Run ls to verify the files on the device (if any currently exist on it).



    In the example above, we can see the files that exists on that USB device, such as Check_Point_file.txt, and that the procedure worked correctly. At this point, you can copy files to and from that device.

Unmounting a USB drive

Once you are finished using the USB drive, you can unmount it.
First, close all open files that reside on the /usb-storage directory and make sure your present working directory is not the /usb-storage directory.

To make sure the mounted USB drive is not in use:

  1. Run pwd to verify which directory you are currently in.

  2. Run cd to change to your user's home directory to leave the /usb-storage directory.

  3. Run pwd again to verify you are not in the /usb-storage directory.

  4. Run sync if you copied any files to the drive. This will finish writing any files to avoid data loss. 

Now we can move forward with unmounting the device so it can be safely removed from the machine.

To unmount the USB drive:

  1. Run umount /usb-storage

  2. Run mount to verify that /dev/sdb1 is no longer mounted to the /usb-storage directory.

    Note: If still in doubt, then run the "umount /usb-storage" command again. The output will say that it's not mounted.


Related Documentation

Give us Feedback
Please rate this document
[1=Worst,5=Best]
Comment