Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Banana Pi Cookbook

You're reading from  Banana Pi Cookbook

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781783552443
Pages 200 pages
Edition 1st Edition
Languages
Author (1):
Ryad El-Dajani Ryad El-Dajani
Profile icon Ryad El-Dajani

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):

  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 $15.99/month. Cancel anytime}