StevenHickson / RPiVideoLooper

Video Looper for the Raspberry Pi
Other
98 stars 36 forks source link

USB drive isn't mounted automatically #3

Open foocp opened 10 years ago

foocp commented 10 years ago

I think the script needs sudo mkdir /media/USB sudo mount -t vfat -o rw /dev/sda1 /media/USB

plus we need it to automatically add a line to the file system table: sudo nano /etc/fstab

add the line: /dev/sda1 /media/USB vfat uid=pi,gid=pi 0 0

I'd amend the scripts myself, but (sorry) my scripting skills are very limited. I'd love it if your RPiVideoLooper would be widely used instead of expensive and buggy 'media players'.

RichShumaker commented 9 years ago

2nd Note Added I just noticed that fstab on the looper uses USB here is the exact format /dev/sda1 /media/USB ntfs-3g defaults,noatime,nodiratime 0 0

Note Added usb not USB the code calls for lower case usb. I have not completed fixing mine yet but that seems to be an issue

Original Below I ran into the same issue when I built from scratch. You can set the USB=1 BUT you get an error on screen as it is not defined.

So the above code did not work for me and I got this error root@raspberrypi:/home/pi# mkdir /media/USB root@raspberrypi:/home/pi# mount -t vfat -o rw /dev/sda1 /media/USB mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so

When using the image file it worked fine.

I had a similar problem BUT with version 3.0 of the software you can change the looperconfig.txt file with USB=0 to USB=1 and it will use the USB instead of the memory chip. Now you need to make sure you put a folder on the USB called videos and put the videos inside that for it to work.

RichShumaker commented 9 years ago

BOOM goes the dynamite. @foocp I was able to get it to work your fstab line was different then the looper version 3 image file. Using the fstab from the version 3 image file it works /dev/sda1 /media/USB ntfs-3g defaults,noatime,nodiratime 0 0

Now I guess we need to get this line into the install script to add to fstab somehow. Side note make sure you have /media/USB created sudo mkdir /media/USB(listed at the start of this but this will also need to be added to the install script)

RichShumaker commented 9 years ago

This is something I think needs to be put into the installation script is adding sudo mkdir /media/USB and adding this line to fstab /dev/sda1 /media/USB ntfs-3g defaults,noatime,nodiratime 0 0