SATA-Disk do not mount at boot (fstab)

4 7997

I've just installed a new BPI with a connected 1TB-WD-sata-Disk (with the preconfigured cable from the starter-kit). My root is still onto the sd-card, the hdd contains just an ext4-fs to be used as data-drive.

I put these entries into the fstab:
  1. root@bananaNAS / # cat /etc/fstab

  3. # 512 MB swapfile
  4. /swapfile1 swap swap defaults 0 0

  5. # 2,5" HDD 1TB
  6. UUID=04379e11-fc86-45c4-a1ce-7c1c87e77e40               /media/data             ext4    defaults,rw,noauto                      0 1

  7. # NFS-Verbindungen
  8.            /mnt/allgemein2_nas     nfs     rw,_netdev,nolock,bg,auto       0 0
  9.                 /mnt/archiv             nfs     rw,_netdev,nolock,bg,auto       0 0
Copy the Code
The nfs-mounts will work, but the local drive I have to mount manually.

Any ideas how to solve?
Edited by tkaiser at Sun Jan 18, 2015 11:25

Have you double checked the UUID and PARTUUID with blkid? And why not simply use /dev/sda1 instead?

Edited by herrmeier at Nov 25, 2015 12:23

This is how I boot my banana pro from sata:

I've only connected power in, network cable, micro-sdcard and sata (ssd):

Boot with the new bananian 15.01,

connect to banana pi with
  1. ssh -C root@ipaddress
Copy the Code
If you don't know your ip-address, check your router or use the android app fing.

prepare harddrive:
  1. # fdisk /dev/sda
Copy the Code
Delete all partitions on sda (ssd) with "d". Add new partition with "n"
Just use default settings
Save the new partition table with  "w".

format ssd with:
  1. # mkfs.ext4 /dev/sda1
Copy the Code
Copy Root-FS:
  1. # mkdir /tmp/source /tmp/target
  2. # mount /dev/mmcblk0p2 /tmp/source
  3. # mount /dev/sda1 /tmp/target
  4. # (cd /tmp/source; tar --backup -c *) |tar -C /tmp/target -xv
Copy the Code
Change kernel parameters to boot from SSD -see update below for babanian Linux version 3.4.108-bananian with Debian GNU/Linux 8:
# mkdir /tmp/boot
# mount /dev/mmcblk0p1 /tmp/boot
#vim /tmp/boot/uEnv.txt

change from [...]root=/dev/mmcblk0p2[...] to […]root=/dev/sda1[…]”
  1. # sync
Copy the Code
  1. # reboot
Copy the Code
If everything went perfectly, banana pi will boot from ssd/hdd instead of sd-card

You cannot change boot sequence traditionally in bios, therefore you new a sd-card to boot.
  1. # mount
Copy the Code
you can check if you were successful.

I hope this helps. Cheers and have fun with your banana pi / banana pro.

update November 25th 2015:
before we had to edit uEnv.txt.
  1. cat /proc/version
  2. Linux version 3.4.108-bananian (root@bananian-build) (gcc version 4.9.2 (Debian 4.9.2-10) )
  3. <strong></strong>
Copy the Code
we have to edit boot.cmd.
  1. # mount /dev/mmcblk0p1 /mnt
Copy the Code
change into directory /mnt
  1. # cd /mnt
Copy the Code
edit boot.cmd. You can use nano instead, if you don't like to use vi.
  1. # vi boot.cmd
Copy the Code
  1. #--------------------------------------------------------------------------------------------------------------------------------
  2. # Boot loader script to boot with different boot methods for old and new kernel
  3. # Credits: <a href=""></a> - Thank you for this great script!
  4. #--------------------------------------------------------------------------------------------------------------------------------
  5. if load mmc 0:1 0x00000000 uImage-next
  6. then
  7. # mainline kernel >= 4.x
  8. #--------------------------------------------------------------------------------------------------------------------------------
  9. setenv bootargs console=ttyS0,115200 console=tty0 console=tty1 <span style="background-color: #ff0000;">root=/dev/mmcblk0p2</span> rootfstype=ext4 elevator=deadline rootwait
  10. load mmc 0:1 0x49000000 dtb/${fdtfile}
  11. load mmc 0:1 0x46000000 uImage-next
  12. bootm 0x46000000 - 0x49000000
  13. #--------------------------------------------------------------------------------------------------------------------------------
  14. else
  15. # sunxi 3.4.x
  16. #--------------------------------------------------------------------------------------------------------------------------------
  17. setenv bootargs console=ttyS0,115200 console=tty0 console=tty1 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 disp.screen0_output_mode=EDID:1680x1050p60 <span style="background-color: #ff0000;">root=/dev/mmcblk0p2</span> rootfstype=ext4 elevator=deadline rootwait
  18. setenv bootm_boot_mode sec
  19. load mmc 0:1 0x43000000 script.bin
  20. load mmc 0:1 0x48000000 uImage
  21. bootm 0x48000000
  22. #--------------------------------------------------------------------------------------------------------------------------------
  23. fi
Copy the Code
We need to change
  1. root=/dev/mmcblk0p2
Copy the Code
twice into
  1. root=/dev/sda1
Copy the Code
Now we need to install u-boot-tools
  1. # apt-get install u-boot-tools
Copy the Code
Now we have to convert boot.cmd to boot.scr
  1. # mkimage -C none -A arm -T script -d boot.cmd boot.scr
Copy the Code
Output should look like this:
  1. Image Name:   
  2. Created:      Wed Nov 25 18:58:44 2015
  3. Image Type:   ARM Linux Script (uncompressed)
  4. Data Size:    1602 Bytes = 1.56 kB = 0.00 MB
  5. Load Address: 00000000
  6. Entry Point:  00000000
  7. Contents:
  8.    Image 0: 1594 Bytes = 1.56 kB = 0.00 MB
Copy the Code
Then we should be done, reboot now:
  1. # shutdown -r now
Copy the Code
check if sda1 is your root-partition
  1. # mount
Copy the Code
$ mount

  1. /dev/sda1 on / type ext4 (rw,noatime,data=ordered)                                                              
  2. devtmpfs on /dev type devtmpfs (rw,relatime,size=496752k,nr_inodes=124188,mode=755)                                      
  3. sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)                                                               
  4. tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=99376k,mode=755)                                                
  5. tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
  6. proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
  7. configfs on /sys/kernel/config type configfs (rw,relatime)
  8. tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=198740k)
  9. devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
Copy the Code
check your speed
  1. # apt-get install hdparm
Copy the Code
  1. # hdparm -t --direct /dev/sda

  2. /dev/sda:
  3. Timing O_DIRECT disk reads: 440 MB in  3.01 seconds = 146.34 MB/sec
Copy the Code
instead of
  1. # hdparm -t --direct /dev/mmcblk0p2

  2. /dev/mmcblk0p2:
  3. Timing O_DIRECT disk reads:  40 MB in  3.02 seconds =  13.23 MB/sec
Copy the Code

Omit the noauto Option.

Edited by caldir65 at Mon Jan 19, 2015 10:22
Phantasmagorium replied at Sun Jan 18, 2015 16:54
Omit the noauto Option.


argrl - sometimes I wonder how it works with all my mistakes certainly it has to be auto and not noauto!!! I've read the fstab serveral times, but this error I didn't found.

Sometimes its better to look with more than two eyes

Greetz and thx

You have to log in before you can reply Login | Sign Up

Points Rules