Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Tuesday, January 12, 2016

I catch some flack sometimes. Mostly when I forget to do what I say I would. Today I'm making good on a 9 month old promise to you, the reader. This is how to have {as much hard drive space as your computer's body has room for} space for RetroPie and the Raspberry Pi for you, the Windows user.
I had my hot wife help me with this one. She knows more about Doze stuff than I do. I've been out of the Windows game at home at at work for years now. Special thanks to her for the screenshots.

Step 1: Create a Directory

Put it on the drive where you will store the juicy payload for the Pi.
For illustration purposes, a Documents folder will do. Probably not for you though


Step 2: Copy roms/BIOS or other folders (RetroPie only)

In your Explorer sidebar, click network and root around a bit until you find your Raspberry Pi. Find the roms and other directories that are shared by the Pi and copy the contents to the directory created in Step 1.
Dem Games
It's important to note that if you want to do this with more than one directory that is already on the Pi, you will have to repeat steps 1 and 2 as many times as you have folders you want to share from your bad ass rig.


Step 3: Delete the contents of the folders on the Pi

This might be painful if you have quite the collection of games and sundries. Relax. You just backed them up in Step 2. Should anything go sideways, you can always restore!

Go back to that network share you copied all the stuff from in Step 2 and delete EVERYTHING. This is important as future steps will not work without the directory being absolutely devoid of anything resembling a file.
Oh Damn! She got Zork!

Step 4: Share your badass file source

Let's take a minute and disclaim that this is what is considered by the paranoid who don't want their links to pornhub or /r/gonewild exposed on the interwebs to be insane or insecure. I beg to differ as far as the paranoia goes in terms of network security. This tutorial is just for a simple share.
Right click the folder you created in Step 1 -> Sharing
For least possible sadness and greatest possible happiness, select the "Everyone" user to share with.
Everyone is getting into my private stash now


It's important to give the "Everyone" user Read/Write access if you want things to be saved like game state, configs, or other important things.

Step 5: Save share and take note of the directory

That greyed-out mess is important
In this example, everything after \\LADY-PC\ is relevant. Be sure to copy it to something or leave the confirmation window open for reference.


Step 6: Acquire Software on the Pi

Uhhhh wait.. who is writing this? The Pi already has everything ready to go for this with Windows. Take a break. Have a beer and a smoke if you're inclined and enjoy what you've accomplished so far.

Step 7: Configure the Pi to map the share

This step is the same as the most previous post with some variation. SSH into the Pi and open /etc/fstab in an editor of your choice (nano, vi, vim, emacs, your choice). Open with sudo for least possible rage.

Add a new line with something like


//HostIPAddress/Path/To/Your/Share /place/to/share/on/pi cifs guest,uid=1000,gid=1000,iocharset=utf8 0 0
Parts in red are pretty much mandatory for this sort of open setup. Parts in black are up to you and what you want to do with it. Replace spaces with \040 since you use Windows and can't help but put spaces in directory paths. This is your punishment.

Save and quit your editor.

Step 8: mount -a

Put "sudo mount -a" in the console and hit enter. If it doesn't bitch at you, congrats, you win. Type in "sudo init 6" for a restart and you should be off to the races!


Sunday, March 22, 2015

The Situation 

 So I recently got my hands on a Raspberry Pi 2 Model B. And like any red-blooded American with a game controller, I felt compelled to install Emulation Station and RetroPie on it for some classic gaming awesomeness.

Since I only had an 8GB microSD card to donate to the effort, I soon ran into issues with space. My wife and I enjoy playing classic PS One games which range in size between 200MB to around 700MB. Multi-disc sets like Final Fantasy quickly make the storage requirements ridiculous.

The Solution 

 The Raspberry Pi is just like any Debain based computer. That being said, NFS will work rather well. I have about 3TB of space to spare, so why not?!

 Step 1: Create Folder on the computer

 Because I'm lazy, I copied the “roms” directory tree to the future home of the roms file server.

 Step 2: Empty the heavy use folders from the Pi


 You can do this through the Samba share or through ssh. Your choice. I'm lazy, so I went the Doze share route.



 Step 3: Acquire software on the computer 

 All I had to install was nfs-kernel-server from the apt repository
  sudo apt-get install nfs-kernel-server

 Step 4: Edit /etc/exports 

 You have to do this as super user. Once again, since I'm lazy and don't want to mess around with vi...
sudo nano /etc/exports

 Your /etc/exports file should look something like this.

 Depending on how you want to do this, you could either have one line going directly to the roms directory or have individual lines to turn individual systems on and off in Emulation Station. I opted for the latter route.

The only line in the above screenshot that I added for example purposes was
/media/justin/Monster_Drive/roms/psx *(rw,sync,no_root_squash,no_subtree_check)

Add more lines changing the directory only as needed. Some might cringe with the rw rights given, but that's necessary for game save data. When you're done, save your /etc/exports file and give the nfs service a restart.
sudo service nfs-kernel-server restart

Step 5: Acquire software on the Raspberry Pi 

Whether you have a keyboard hooked-up or you ssh into it because you can't be bothered to get out of your chair (like my lazy ass), these instructions should work just the same. Everything you will be doing on the Pi side of things will be super user. In order to drop into super user mode...
sudo su

 Celebrate that you are root! Good job!

 Install nfs-common
apt-get install nfs-common

 Edit fstab
nano /etc/fstab

Note: This is why I had the clearing-out of the roms directories early on. If the directories aren't empty, you can't mount a network resource to the folder and this won't work!

Your fstab file should look something like this


The only thing I've added so far for demonstration purposes is the line:
192.168.0.4:/media/justin/Monster_Drive/roms/psx /home/pi/RetroPie/roms/psx nfs auto 0 0

 Substitute the IP address with whatever IP your nfs server is and the directory following the colon to be your roms directory. The second set of directory structures should be the same. The only thing you might need to edit is the “psx” at the end. If you're doing this for Nintendo 64 roms, substitute “n64” in there.

Save your fstab file and restart your Pi.

 Step 6: Test it out 

 VICTORY!

Notes

  • Static IPs are a good idea to avoid having to re-configure the fstab file every time your computer gets a new IP address.
  • Gigabit network is a must. When you're loading large files like this over the network, loading will lag even with the fastest of LANs. Be patient.
  • With the roms located elsewhere, you can potentially run EmulationStation/Retropie with the bare minimum of SD card.
Coming soon: How to do this on Windows.

Subscribe to RSS Feed Follow me on Twitter!