In this guide, I will be going through how to add USB storage to your Board:
Confirm that the drive is recognized by Linux
Formatting the drive for Linux use
Mounting the Partition/FS
Setting appropriate directory and file permissions.
Prerequisites:
Rock64 running Debian/Ubuntu
Local access or SSH access
USB Drive
I would highly suggest reading through this to understand the basics of using the Linux terminal:
https://www.howtogeek.com/140679/beginne...-terminal/
Confirm that the drive is recognized by Linux
The first step is pretty obvious, plug in the USB drive into your Board:
I know my ethernet cable termination is horrendous, I'm getting it fixed soon.
Hopefully by now you'll have some idea how to SSH into your device. SSH into the device or open up a terminal.
There are two quick ways we can confirm that the USB drive is "recognized" by the system. The first is issuing the command lsblk - List Block devices:
Running it on your board should show something similar to the following:
If you had ran the lsblk command before plugging in the USB device, you'd have only seen entries under "mmcblk1". This shows the boot MicroSD card and its various partitions.
Usually a newly plugged in USB drive shows up as sdX with X being a letter. In this case it's sda but it could also be sdb or sdc depending on your configuration. The numbers after the letters demarcate the various partitions present on the device.
To see more details about the device and partition, invoke the "fdisk -l" command with the block device (sda in this case) as an argument. You will need superuser access for this, simply insert your password to give it access:
This shows that our device (the flashdrive) has a capacity of 14.9 GiB (or 15.99 GB). The sector size is 512 bytes long, and it has one partition, "Microsoft basic data" which is know is a FAT partition.
You dont need to list your block device as an argument, it just makes the output less cluttered. If you simply used "fdisk -l" it would print out information about all recognized devices:
Confirm that the drive is recognized by Linux
Formatting the drive for Linux use
Mounting the Partition/FS
Setting appropriate directory and file permissions.
Prerequisites:
Rock64 running Debian/Ubuntu
Local access or SSH access
USB Drive
I would highly suggest reading through this to understand the basics of using the Linux terminal:
https://www.howtogeek.com/140679/beginne...-terminal/
Confirm that the drive is recognized by Linux
The first step is pretty obvious, plug in the USB drive into your Board:
I know my ethernet cable termination is horrendous, I'm getting it fixed soon.
Hopefully by now you'll have some idea how to SSH into your device. SSH into the device or open up a terminal.
There are two quick ways we can confirm that the USB drive is "recognized" by the system. The first is issuing the command lsblk - List Block devices:
Code:
lsblk
Running it on your board should show something similar to the following:
Code:
rock64@rock64:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 14.9G 0 disk
└─sda1 8:1 1 14.9G 0 part
mmcblk1 179:0 0 29.8G 0 disk
├─mmcblk1p1 179:1 0 3.9M 0 part
├─mmcblk1p2 179:2 0 64K 0 part
├─mmcblk1p3 179:3 0 4M 0 part
├─mmcblk1p4 179:4 0 4M 0 part
├─mmcblk1p5 179:5 0 4M 0 part
├─mmcblk1p6 179:6 0 112M 0 part /boot/efi
└─mmcblk1p7 179:7 0 29.7G 0 part /
If you had ran the lsblk command before plugging in the USB device, you'd have only seen entries under "mmcblk1". This shows the boot MicroSD card and its various partitions.
Usually a newly plugged in USB drive shows up as sdX with X being a letter. In this case it's sda but it could also be sdb or sdc depending on your configuration. The numbers after the letters demarcate the various partitions present on the device.
To see more details about the device and partition, invoke the "fdisk -l" command with the block device (sda in this case) as an argument. You will need superuser access for this, simply insert your password to give it access:
Code:
sudo fdisk -l /dev/sda
Code:
rock64@rock64:~$ sudo fdisk -l /dev/sda
Disk /dev/sda: 14.9 GiB, 16008609792 bytes, 31266816 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 7C4E0E7E-888C-48C6-AC55-A3F6D3F37E2B
Device Start End Sectors Size Type
/dev/sda1 2048 31264767 31262720 14.9G Microsoft basic data
You dont need to list your block device as an argument, it just makes the output less cluttered. If you simply used "fdisk -l" it would print out information about all recognized devices: