aryoseto
Posts: 2
Joined: Sun Jun 28, 2015 8:50 am

WD My Studio Boot Mount Problem

Sun Jun 28, 2015 10:47 am

Hi guys,

I am having a problem in automatically mounting my external hard drive to my raspberry pi. I am sure I have done it properly (well at least the same as the tutorial said).

The problem comes when I tried to mount my drive automatically using /fstab. When during the booting process, it gives me msg that the drive does not exist. But I am able to mount it easily using the terminal with the same name (however I need to use the "sudo su" to mount the drive).

This is my step

1. I connect my WD My Book Studio to my RPi2, the format is hfsplus unjournaled (I disabled this in my mac).
2. As soon as I connect the drive there is a msg telling that the drive can only be mounted by root.
3. This is my drive spec

Code: Select all

pi@raspberrypi ~ $ sudo fdisk -l

Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
4 heads, 16 sectors/track, 242560 cylinders, total 15523840 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
Disk identifier: 0xa6202af7

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880    15523839     7700480   83  Linux

Disk /dev/sda: 2000.4 GB, 2000365289472 bytes
255 heads, 63 sectors/track, 243197 cylinders, total 3906963456 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
Disk identifier: 0x00000000

Disk /dev/sda doesn't contain a valid partition table
It says that it does not have a valid partition table. however when I check with lsblk, it seems it has partitions. (i dont know why)

Code: Select all

pi@raspberrypi ~ $ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0   1.8T  0 disk 
├─sda1        8:1    0  31.5K  0 part 
├─sda2        8:2    0   128M  0 part 
├─sda3        8:3    0   1.8T  0 part 
└─sda4        8:4    0     8K  0 part 
mmcblk0     179:0    0   7.4G  0 disk 
├─mmcblk0p1 179:1    0    56M  0 part /boot
└─mmcblk0p2 179:2    0   7.4G  0 part /
4. Then I mount the drive using this, and it works perfect.! Notice that I need to be in the root to do this. Otherwise it says "only root can do.."

Code: Select all

pi@raspberrypi ~ $ sudo su
root@raspberrypi:/home/pi# mount /dev/sda3 /media/MyBook
6. And then taking the UUID name by using this

Code: Select all

pi@raspberrypi ~ $ sudo blkid
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="boot" UUID="15CD-3B79" TYPE="vfat" 
/dev/mmcblk0p2: UUID="13d368bf-6dbf-4751-8ba1-88bed06bef77" TYPE="ext4" 
/dev/sda3: UUID="2ca31a4c-9b24-3f7d-a7a2-4b168e43fbbe" LABEL="My Book" TYPE="hfsplus" 

7. Then to mount this automatically during boot, I modified my fstab

Code: Select all

proc            /proc           proc     defaults          0       0
/dev/mmcblk0p1  /boot           vfat     defaults          0       2
/dev/mmcblk0p2  /               ext4     defaults,noatime  0       1
UUID=2ca31a4c-9b24-3f7d-a7a2-4b168e43fbbe       /media/MyBook   hfsplus  defaults          0       0

8. Then I reboot my RPi, and still the drive is not mounted. I see msg during boot saying "UUID=xxxxx does not exist". I even tried to put /dev/sda3 instead in the fstab, but I got the same msg. I have the feeling that the hard drive for somehow is not fully "on" during the boot. Because the msg always says "does not exist".


Did I do something wrong in the steps? The problem is it can mount perfectly by calling it /dev/sda3. But does not work at all when I put that in the fstab. Is it because only the root permission? I have no clue.

Could somebody spot the mistake?? Please guru, help me :? :? :? :?

Thanks

rubikwizard
Posts: 95
Joined: Tue Jan 10, 2012 10:37 pm
Location: West Yorkshire
Contact: Website

Re: WD My Studio Boot Mount Problem

Sun Jun 28, 2015 4:22 pm


aryoseto
Posts: 2
Joined: Sun Jun 28, 2015 8:50 am

Re: WD My Studio Boot Mount Problem

Mon Jun 29, 2015 11:53 am

Thanks rubikwizard! I will check that out.

Btw it turns out that even it says "does not exist" during booting, sometimes the drive is mounted properly.

Return to “Troubleshooting”