USB Shared Files instead of SD card Shared files?

Posted by josephchrzempiec 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
USB Shared Files instead of SD card Shared files?
February 24, 2016 02:49AM
Hello I been looking around the forum pages to use a USB flash drive instead of the Micro SD card for the Shared files.
So i looked and found a few But this one caught my eye i thought might work Other Post. But I'm a little confused on how to do something like this sense I'm still a little new to Linux on how i have to i guess mount the flash drive also how to point the Piratebox shared file area to the new drive?

Well my first confusion is how can i mount the drive so it can be automatically there on startup of my Pi? the Other question is how can i Move the Shared file location to the new drive and what folders do i need for the new Flash drive?

The last thing is even if i can get this all to work would it stay like that on the next bootup?
Re: USB Shared Files instead of SD card Shared files?
February 24, 2016 03:32AM
[piratebox.cc]
This should help. If not, let us know where you get stuck.

Note to, developers: I noticed this is fat32 formatted. Is this for "ease-of-use" in multiple OSs? Why not format it to something a little more native like ext4? Since fat32 is also limited to 4Gb/file, ext4 seems like a more viable solution. As I just discovered this now, I have been setting up my USB drive shares as ext4 and sym-linking with no problems.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: USB Shared Files instead of SD card Shared files?
February 24, 2016 03:42AM
Hello TheExpertNoob thank you for this. I did not see this. Sense I'm not much of a linux person can i ask you would this work say on a 64gb Flash drive or higher?
Re: USB Shared Files instead of SD card Shared files?
February 24, 2016 03:50AM
When I'm doing the commands i got to sudo mount /mnt/usbdrive i got a error on it.
mount: special device /dev/sda1 does not exist?
also when i get to sudo mv /opt/piratebox/share/Shared /mnt/usbdrive i get this message
mv: ‘/opt/piratebox/share/Shared’ and ‘/mnt/usbdrive/Shared’ are the same file. Not sure what to do?



Edited 1 time(s). Last edit at 02/24/2016 03:51AM by josephchrzempiec.
Re: USB Shared Files instead of SD card Shared files?
February 24, 2016 03:51PM
As far as " /dev/sda1 does not exist"
Type: fdisk -l
To see if your USB drive is listed as sda(1)
It may be something different as sda2 or sdb1.

As for the second issue, I'll look into it unless someone answers before I get back.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: USB Shared Files instead of SD card Shared files?
February 24, 2016 04:00PM
Regarding the second issue, it sounds like you may have successfully created the symlink and pointed it to /mnt/usbdrive/Shared (the ln command) either before or after succesfully moving files. That would give the error that those are the same file.

Was the thumb drive previously formatted to fat32 with no other partitions before inserting it into the raspberry pi? This could also lead to the "device not being found"

The 64gb drive should work.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: USB Shared Files instead of SD card Shared files?
February 24, 2016 09:02PM
Hello TheExpertNoob thank you for the message back. The 64gb was partition for exFAT i didn't do it for that is how it came from staples store new.


Okay so Can you help me out and tell me what Steps do i need to take to setup the flash drive what partition i need to do and how i can set it up i think i might be going it wrong. So i can move the shared files over to the Sd card?



Edited 1 time(s). Last edit at 02/24/2016 09:06PM by josephchrzempiec.
Re: USB Shared Files instead of SD card Shared files?
February 27, 2016 01:23AM
Did you try the way mentioned in the MOTD text when you log in to your Pi via SSH? There is a helper script that should do all the work for you, you only need to have a FAT32 formatted USB stick attached, then run:
sudo /opt/piratebox/rpi/bin/usb_share.sh