Raspberry Pi Desktop Kit
We have been really impressed with the Raspberry Pi Desktop Kit from Element14. As well as looking really cool, it has a number of great features that make it ideal for numerous different applications. We’ve already had one set up as a media server, and they also make great NAS drives. However, we thought that it would also make a terrific little gaming desktop, so we set about creating one using RetroPie.
Setting Up RetroPie
The first step in setting up RetroPie on the Raspberry Pi Desktop is to burn the latest RetroPie image to a micro SD card. To do this, download the RetroPie image from the RetroPie web site, and follow the instructions on the RetroPie installation instructions page. Make sure that you download the correct image, as there are different downloads depending on which model of Raspberry Pi you are using. For our setup, we used the Pi 3.
Once the RetroPie image has been copied to the micro SD card, the card should be inserted into the SD card slot of the Raspberry Pi. At this stage, you will not need any of the Raspberry Pi desktop kit parts; we will set that up later. So, you should just have your Raspberry Pi connected to a monitor, USB keyboard and mouse, and a power supply connected. You will also need your chosen game controller connected to one of the USB ports. When you power up the Pi, RetroPie should boot up. As part of the boot process, you will be prompted to set up your game controller by pressing the appropriate buttons on the controller.
Before going much further, it is worth updating RetroPie in order to ensure that everything is as up to date as possible. To do this, go to the RetroPie configuration page, and select ‘RetroPie Setup’. From this page, select ‘Update all installed packages’, and when prompted to update all the underlying OS packages, select ‘Yes’. Depending on how recent your installed version of RetroPie is, this update process may take some time to complete.
Installing Pixel Desktop
RetroPie is built on top of the Raspbian operating system. However, to keep it as lightweight as possible, it is built on the lite version of Raspbian. As such, it does not include the Pixel desktop.
In order to carry out some of the setup required for the Raspberry Pi Desktop kit, it will be necessary to install the Pixel desktop. To install the Pixel desktop, go to the RetroPie configuration page and again select ‘RetroPie Setup’. This time, however, select ‘Configuration/Tools’ from the setup menu. From the displayed options menu select ‘Raspbian related tools’, then select ‘Install Pixel Desktop environment’. As with updating RetroPie, this process will take some time to complete.
We recommend that once the Pixel desktop installation is complete your Raspberry Pi should be rebooted.
Install Pi Desktop Kit Software
Having installed the Pixel desktop, it is now time to install the software that is required to control the Pi Desktop kit. In order to do this, you will need to run up the Pixel desktop. This is done by selecting ‘Pixel Desktop’ from the RetroPie ‘Ports’ menu.
Once in the Pixel desktop, you will need to open a terminal window, and enter the following commands to upgrade all installed software packages to the latest versions:
sudo apt update sudo apt upgrade
Having done this, use the web browser to open the Element14 Pi Desktop web page, and download the Pi Desktop Debian image file. The downloaded zip file will need to be extracted to a file with the extension .deb (for example, pidesktop-base-1.1.0.deb). Having extracted the file, open a terminal window and change your current working directory (using the cd command) to the folder into which the Debian file has been extracted. The software package can then be installed using the command:
sudo dpkg -i pidesktop-base-1.1.0.deb
Pi Desktop Hardware
Once the Pi Desktop software has been installed, the Pi Desktop kit hardware can be set up as described in the Pi Desktop kit user manual.
One of the great features of the Pi Desktop kit is that you can, if you so desire, add an internal mSATA Solid State Drive (SSD). This will provide you with masses of extra storage space, giving you the option of installing all the games you could possibly wish for. Additionally, the internal SSD can be set up either as a boot device or simply as a storage device. For our build, we made use of a 250GB mSATA SSD.
In order to use the SSD as a boot device, it will be necessary to carry out a one-time programming operation on your Raspberry Pi to enable the boot from USB feature. The process for doing this is described in the Pi Desktop kit user manual. We have also covered this process in one of our previous blog posts. Note that the boot from USB operation is only possible using a Pi 3.
Copying Software to SSD
Once the basics of RetroPie have been set up, and the hardware build is completed, the software installed on the SD card can be copied to the SSD. For our purposes, we are going to have our SSD as a boot device. This means that the SD will be removed from the Raspberry Pi once we have copied the software across to the SSD.
Create Partition Table on SSD
In order to copy the files across from the SD card to the SSD, it is first necessary to create a partition table on the SSD. To do this, you will need to install another software package called gparted. This will need to be done by again running up the Pixel desktop, and executing the following terminal commands:
sudo apt update sudo apt install gparted
Having installed gparted, the following terminal command will run the gparted application to allow the partition table to be created:
The gparted application initially displays the following screen:
From this screen, selecting the SSD device from the dropdown list will display the following screen:
To create the required partition table on the SSD, select ‘Device’, ‘Create Partition Table’. The following screen will be displayed:
From this screen select ‘gpt’ as the required partition table type, and press the ‘Apply’ button to complete the operation.
Copy Data From SD to SSD
The final step in setting up RetroPie on the Raspberry Pi desktop kit is to copy the contents of the SD card to the SSD installed on the expansion board. However, the way that the data is copied over is important, since it is essential to ensure that any references to file volumes are maintained correctly. For example, there will be references in the /boot/cmdline.txt boot file to the UUID (the unique identifier) of the boot partition. For this reason, the SSD must have the same UUID as the SD card in order for the Raspberry Pi to successfully boot from the SSD. The easiest way to effectively clone the contents of the SD card (including the UUID) to the SSD is by means of the dd command. Use the following terminal command to duplicate the contents of the SD card to the SSD:
sudo dd if=/dev/mmcblk0 of=/dev/sda bs=1M
This command will take some time to complete. However, once complete it should be possible to shutdown the Raspberry Pi, remove the SD card and then reboot the Raspberry Pi from the SSD.