Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Banana Pi Cookbook

You're reading from   Banana Pi Cookbook Over 25 recipes to build projects and applications for multiple platforms with Banana Pi

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781783552443
Length 200 pages
Edition 1st Edition
Arrow right icon
Authors (2):
Arrow left icon
Ryad El-Dajani Ryad El-Dajani
Author Profile Icon Ryad El-Dajani
Ryad El-Dajani
RYAD E DAJANI RYAD E DAJANI
Author Profile Icon RYAD E DAJANI
RYAD E DAJANI
Arrow right icon
View More author details
Toc

Mounting via fstab

In this recipe, we are going to automount our drives using the fstab (located at /etc/fstab) system file.

Getting ready

The following components are required to mount drives conveniently using the fstab file:

  • A working Linux system on the Banana Pi
  • A USB flash drive and/or a SATA drive
  • In case of a SATA drive, a working connection to your Banana Pi and a suitable power supply
  • Access to the Banana Pi's shell

How to do it…

Perform the following to configure a drive in your fstab:

  1. Connect your devices accordingly.
  2. Power your Banana Pi and initiate the boot sequence.
  3. Open a shell.
  4. Determine the used filesystems by blkid on attached partitions:
    $ sudo blkid
    
  5. You will get information about all the available partitions. In the following screenshot, you see that the drive /dev/sda has three partitions (sda1 using ext4, sda2 using FAT32, and sda3 using NTFS):
    How to do it…
  6. Create the necessary target directories to mount these partitions:
    $ sudo mkdir /mnt/ext4_partition
    $ sudo mkdir /mnt/fat_partition...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image