EBC Exercise 08 Mounting a USB drive
Embedded Linux Class by Mark A. Yoder
Sometime it might be nice to pull some files off a USB drive and on to the Bone. Or to plug a SD card reader into the USB port so you can read files from it.
Shown here is how to read from a ext4 formatted device.
Finding
Before plugging in your drive into the USB port run:
bone$ fdisk -k Disk /dev/mmcblk0: 59 GiB, 63367544832 bytes, 123764736 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: dos Disk identifier: 0xdcc0d66a Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 * 8192 123764735 123756544 59G 83 Linux Disk /dev/mmcblk1: 1.8 GiB, 1920991232 bytes, 3751936 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: dos Disk identifier: 0x10867701 Device Boot Start End Sectors Size Id Type /dev/mmcblk1p1 * 8192 3751935 3743744 1.8G 83 Linux
Mounting
Then make a directory where you want them to appear.
host$ mkdir bone.files
The mount them. The 192.168.7.2 is the address of the bone. debian is the login name and the :. says to use debians home directory. (If you've set up the shortcuts you could just use ssh bone:. bone.files.)
host$ sshfs debian@192.168.7.2:. bone.files host$ ls bone.files
You should see the files in debian's home directory on the bone.
Unmounting
When you are done run:
host$ sudo umount bone.files
Embedded Linux Class by Mark A. Yoder