Automatically Mounting an External USB Hard Disk on the Raspberry Pi

How-to Guide: Automatically Mount an External USB Storage Device at Boot Time, and Within Emulation Station

Raspbian Logo
External Hard Disk - Image: Clipshrine.com
USB Symbol - Image: Clipshrine.com

This how-to guide shows a method to automatically mount an external USB drive on the Raspberry Pi. The general technique which I have adopted and is common, and whilst there are similar guides available, I have adapted the approach specifically for use on a Pi running Raspbian Lxde Desktop, Kodi Media Center, and Emulation Station with RetroPie.

In this article I aim both to demonstrate and expand upon the steps involved, whilst highlighting some issues which I have encountered when using this approach, and providing their resolutions.

Topics

A Little Background Information

My Raspberry Pi 3 is setup to serve triple duty as a lightweight PC replacement, running the Raspbian desktop, as a media center using Kodi, and as a retro video game emulator suite, via RetroPie. I have my machine set to boot to a custom menu at the command prompt, rather than directly to the desktop, to facilitate easy switching between these options. Please see the Related Posts section for setup guides detailing how this was achieved.

The Raspbian kernel does not automatically mount external USB drives by default; this isn’t an issue when launching the Kodi media center, or the desktop, as both have the capability to detect and mount a USB hard disk or flash storage device once it is connected.

Continue reading

Advertisements

Compiling Software from Source Code on the Raspberry Pi: The FFmpeg Suite

How-to Guide: Compiling and Installing the FFmpeg Suite and Audio Video Codecs from Source on the Raspberry Pi
 

Raspbian Logo
Bash Shell Command Prompt
FFmpeg Project Logo - Image: Wikicommons

The goals of the following guide are two-fold: Firstly, to install a software package called FFmpeg, which contains numerous tools to facilitate the recording and manipulation of audio-video materials, along with several optional packages known as codecs.

Secondly, I aim not only to present a series of steps and commands, but also to provide a little illumination into the process, providing an overview of some of the key tools and concepts behind obtaining, building, and installing software on a Linux platform.

For those eager to get up and running as quickly as possible, please see the related page: Compiling FFmpeg and Codecs from Source Code: All-in-One Script

Topics Covered
A Little Background Information
What is RetroArch?

Please see the my earlier post: What is RetroPie? for a little background on both RetroPie and RetroArch.

My primary motivation for installing FFmpeg was to be able to capture real-time footage of gameplay from various console systems available in the RetroPie emulator suite, a number of which utilise the RetroArch framework that provides a facility to make live audio-video recordings.

Continue reading

Power Without the Price: Atari ST and STe Computing on the Raspberry Pi with RetroPie’s Hatari Emulator

The extremely inexpensive Raspberry Pi allows faithful emulation of Atari ST and STe machines, splendidly affirming Atari’s mid-1980’s slogan Power Without the Price; in this guide I cover the configuration and utilisation of RetroPie‘s Hatari emulator.

Atari Logo - Atari ST Text - Machine

I have a great fondness for Atari‘s computers, having owned a 130XE before moving on to the 16-bit ST range; it was many years later that I discovered that the latter machines were largely the product of Commodore engineers, the true technological successor to the Atari 8-bit range being, through quirks of business and fate, the Amiga.

My stalwart 520STfm machine dutifully provided years of service in a broad array of roles, including: code development, primarily using Action! and GFA Basic; word-processing in 1st Word Plus; running inspiring demoscene productions; driving MIDI keyboards; and of course the inevitable core function as a gaming platform.

This guide has been written primarily for the Raspberry Pi implementation of Hatari, which for RetroPie 3.6 is the latest version, 1.9.0, released in September 2015. As the emulator has been compiled from the original source code virtually all of the following information will be equally applicable to the Windows, OSX, and other Linux platforms besides Raspbian.

Topics Covered

Atari ST with Monitor
Atari ST with Monitor – Modified from Original Image: Wikipeida

Emulation Without a Safety Net

RetroPie‘s emulators for classic computer systems do not implement the common functionality found in the RetroArch Core systems. For further details, please see the What is RetroArch? section in the post RetroPie system overview – software and hardware components, and the related article: RetroPie Emulation: RetroArch, Libretro, and the Power of the Options Menu

Hatari implements a native options menu which is accessed via a preset function key, F12, and navigated only via mouse (thus requiring both a USB or Bluetooth keyboard, and a mouse).

Continue reading

Multipurpose Raspberry Pi: Installing a Media, Gaming, PC Replacement

Have Your Pi and Eat It!
 

Raspbian Logo
Kodi Media Center Logo
retropie_logo_300x300

In this post I’ll be documenting how I set up a Raspberry Pi 3 (you can also use a Pi 2) as a lightweight PC replacement, combining a fully-fledged desktop GUI (Raspbian), Media Center (Kodi), and video games console and computer emulation suite (RetroPie).

The Pi 3 actually makes for a very capable PC replacement; this, and recent, posts, including graphics work, have been undertaken solely on the machine.

Topics Covered in this Post

A Little Background

I have a couple of older Raspberry Pi machines, each of which is limited to a single task. The Model 1 Pi has been doing duty for a couple of years as a media center, and is dedicated to running XBMC (named for XBox Media Center, showing the roots of the project which is now known as Kodi).

The Pi 2 is currently used for retro video gaming, running an installation of RetroPie 2; I ill-advisedly used the retropie_setup.sh script option to delete Raspbian files that were not directly needed by RetroPie, thereby removing the option of using the machine as a desktop replacement.

Having taken delivery of a shiny new Raspberry Pi 3 I was keen to take advantage of the increased power of the machine, along with a sizable 64GB SD Card, using it to perform multiple duties: a media center, a retro-gaming system, and PC workstation. I also wanted to avoid the need for swapping SD Cards, which is both a hassle and introduces needless wear and tear on the card port.

Raspberry Pi 3 within Camac Case, with PiHut Heatsink
Raspberry Pi 3 within Camac Case, with PiHut Heatsink

Continue reading

Overclocking and Stability Testing the Raspberry Pi 2 – Part 1: Overclocking in Depth

More speed for free?

Silhouette Clockwork - Image Original: andreakihlstedt.com
Silhouette Clockwork – Original Image: andreakihlstedt.com

Overclocking and Stability Testing – Part 1

When using the Raspberry Pi 2 to run any sort of intensive software, which certainly includes emulating classic video games systems using RetroPie, you really need all the processing and graphical horsepower you can get. Luckily there’s more available under the bonnet of the Pi with a little tweaking.

Note: For additional considerations when overclocking the Raspberry Pi 3, please see Overclocking the Raspberry Pi 3: Thermal Limits and Optimising for Single vs Multicore Performance, in addition to the current post.

Topics Covered In Part 1

Topics Covered In Parts 2, 3, and 4

Disclaimer

Overclocking the Pi is supported by tools provided with standard operating system distributions, such as Raspbian, and sanctioned by the manufacturer (with some caveats, as discusssed below). That said, the following details only my own research and experiences with a single Raspberry Pi 2 device; as always, your mileage may vary.

Assistance for those new to Linux

Making changes to the Overclock settings on the Pi, and testing the changes for stability, requires a little knowledge of the Linux command shell.

Please see my related posts for a basic guide which should help those new to Linux and/or Raspbian get started:

Overclocking and Power – Use a Quality PSU

When overclocking it is worth ensuring that your Pi is serviced by a good quality Power Supply Unit (PSU), as this is often a point of failure. Not all micro usb supplies, or cables, are up to the task.

Please see my earlier post covering this topic here.

Why Overclock?

The Raspberry Pi 2, as with the predecessor Pi, can be setup to run faster than the default system, effectively giving extra processing and graphical capabilities for free. For retro gaming this can be critical, and is especially true of the N64 emulators, as well as when running more demanding PlayStation releases such as Gran Turismo 2.

Raspberry Pi System Architecture

The Raspberry Pi 2 contains a System on a Chip (SoC), which integrates a quad-core ARM CPU and a Broadcom VideoCore IV Graphics processing unit (GPU), alongside 1GB of SDRAM memory.

Raspberry Pi 2 Model 2
Raspberry Pi 2

Continue reading

What is RetroPie? System overview, software and hardware

image
image
image

When I began to assemble my Raspberry Pi-based emulator setup, one of the core issues was simply understanding the elements which comprise the system, namely the hardware and numerous software components which RetroPie relies upon, and which in turn rely upon RetroPie.

Understanding this stack became more crucial once the initial installation was complete, and I subsequently began to explore and customise the system (including setting individual emulator video resolution, display filtering and analog effects, and controller / joypad support).

Firstly, what is RetroPie?

According to petrockblock.com, the home of RetroPie:

“The RetroPie Project is a collection of works that all have the overall goal to turn the Raspberry Pi into a dedicated retro-gaming console.”

RetroPie can be thought of as a framework which wraps and extends other software components, ultimately handling the loading of a selected game image into the relevant video game emulator.

The system also provisions management and configuration of numerous elements, including:

  • Loading button and axis (analog) control maps, matching upon detected Usb controller(s)
  • Setting video resolution
  • Applying filtering and video overlay effects
  • Providing state management (providing loading and saving of in-progress games)

Continue reading

Looking after your Pi – Part 2 – General Handling

Following on from the previous post, which covers the importance of using a quality power supply with the Raspberry Pi, this post will cover:

  • General handling of the Pi, electrostatic discharge, and using an enclosure
  • Best practices for connection and disconnection of peripherals
  • Pi shutdown and SD card handling

General Handling

An earlier version of the aforementioned Raspberry Pi Regulatory Compliance and Safety Information (specific to Model A and B variants of Pi) offers some general handling advice, which applies equally to all electronics:

“Take care whilst handling to avoid mechanical or electrical damage to the printed circuit board and connectors.”

“Avoid handling the Raspberry Pi while it is powered. Only handle by the edges to minimize the risk of electrostatic discharge damage.”

Further useful general handling tips can be found in the article Working safely with your Pi, which includes the following advice:

“…in general, turn it off before changing what it’s connected to

The exceptions to this are the USB and Ethernet ports, which are designed to be pluggable. The non-exception to this is the HDMI port which, unlike for every other console or computer you’ve owned recently, you should only connect or disconnect with the power off.

The silent killer for components is static electricity
get into the habit of grounding yourself, by touching something large and metal, before touching the components”

It goes without saying that enclosing the Raspberry Pi in a suitable case can only help increase the robustness and lifespan of the device, aiding in protection against accidental knocks and reducing electrostatic discharge risks.

As noted in the System Overview post on this blog, my Pi is encased in a Carmac enclosure which provides a balance of protection and passive cooling

image

SD Card handling

A helpful guide covering best pratices for shutting down the Pi correctly to avoid SD card corruption is the article 3 reasons why your Raspberry Pi doesn’t work properly from MakeUseOf.com; this also contains further recommendations to use a quality Psu with quality cabling.

If the Pi doesn’t do anything when powered on, one thing to check is the SD card, as noted in in the aforementioned Raspberry Pi User Guide 2nd edition:

“If your Pi’s power light glows when you connect the micro-USB power supply, but nothing else happens and the OK light remains dark, you have an SD card problem”

(chapter 4, troubleshooting)

Related Posts
Links: Raspberry Pi and Gaming Emulation via RetroPie

About
Disclaimers
Privacy Policy
Terms and Conditions
© Retro Resolution

Looking after your Pi – Part 1 – The Importance of a Quality Power Supply (PSU)

When I took delivery of my original Raspberry Pi (Model B) the board arrived packed in a sturdy plastic case, not unlike an audio or DAT cassette box (a reference which instantly shows my age…)

In contrast, the Pi 2 arrived in a flimsy cardboard box, with absolutely no crumple protection.

image

My first Pi 2 actually had to be returned as there was damage to the relatively fragile board. This raised questions in my mind regarding the robustness of the unit, and best practices for general usage and handling.

Some of the topics I’ll be covering in this and the next post are:

  • Hardware damage vs ‘soft’ damage (configuration errors and data corruption)
  • Power supply and usb cable quality
  • Power supply voltage, amperage, and order of connection to the Pi
  • The importance of a 2amp Psu when attaching peripherals via Usb
  • Usb cable quality technicalities: 2828 AWG vs 2824 AWG grades
  • General handling of the Pi, electrostatic discharge, and using an enclosure
  • Best pratices for connection and disconnection of peripherals
  • Pi shutdown and SD card handling

It is important to note that the Raspberry Pi was designed from the outset to be a system for learning about all aspects of computing; as such it doesn’t come housed in a bullet-proof case, it doesn’t come with a power supply that is guaranteed to work, nor does it come with a compatible SD card (which acts as the system’s hard disk, or more accurately, like a contemporary desktop or laptop’s SSD).

Like all consumer grade electronics, it is possible to physically break the Raspberry Pi, and to do so in a manner in which the damage is impossible to discern (such as by electrostatic discharge).

It is much more likely, however, that any damage the Pi suffers is in the form of corrupted configuration or data files (which can be resolved by restoring from a backup – not a problem as everybody takes regular backups of their system… don’t they?). I’ll be covering problems caused by configuration errors and data corruption in a later post

Continue reading

Overview of Raspberry Pi and retro-gaming system hardware

The Raspberry Pi installation to which all of the current blog posts (at time of writing) relate is as follows:

image

Core System Components

Raspberry Pi 3 Model B
Raspberry Pi 3 Model B (RS Components)

Raspberry Pi 3 Model B - Image: RS Components
Raspberry Pi 3 Model B – Image: RS Components

Raspberry Pi 2 Model B
Raspberry Pi 2 Model B (RS Components)

image
Raspberry Pi 2 Model 2

The Pi 2 has been overclocked to extract the maximum performance possible, as many video game system emulators push the hardware to the limits. Please see the series of posts on overclocking and stability testing, beginning with part one, for further details.

Power supply: 5 volt, 2 amp micro usb
Official Raspberry Pi Power Unit (RS Components)

Micro SD memory card
SanDisk SDSDQUN-032G-FFP-A Ultra microSDHC UHS-I Class 10 Memory Card
SanDisk 32GB micro SD (Amazon)
I’ve had mixed success with compatibility of cards in the Pi 2 – most have worked; one 16Gb card was unstable under Noobs and Raspbian, but fine with the RetroPie image

Continue reading