{"id":66,"date":"2017-12-14T12:10:35","date_gmt":"2017-12-14T17:10:35","guid":{"rendered":"http:\/\/thinkleet.net\/?p=66"},"modified":"2026-04-13T07:06:20","modified_gmt":"2026-04-13T11:06:20","slug":"full-setup-of-retropie","status":"publish","type":"post","link":"https:\/\/thinkleet.net\/index.php\/2017\/12\/14\/full-setup-of-retropie\/","title":{"rendered":"Full setup of Retropie."},"content":{"rendered":"<p>In this posting, I&#8217;ll be walking you through a setup of Retropie on the Raspberry Pi3.\u00a0 We&#8217;re going to be working exclusively in GNU\/Linux in this tutorial, as all the necessary software is already included in most distros, and most of the file systems we will be working with are ext3\/ext4.\u00a0 If you are unfamiliar with GNU\/Linux, I will post a guide later on creating a live distro environment to use for this task.\u00a0 Another option would be to virtualize a GNU\/Linux system through Virtual Box or similar software and have USB passthrough enabled to access the drives through the virtual machine.\u00a0 This is outside of the scope of this tutorial.<\/p>\n<p>Necessary items for the Setup&#8211;<\/p>\n<p>Raspberry Pi 3 &#8211; either by itself\u00a0or as part of a <a href=\"http:\/\/amzn.to\/2AGHNCW\">kit<\/a> with power supply, case, and HDMI cable.<\/p>\n<p>Controllers- My favorites are <a href=\"http:\/\/amzn.to\/2Cn8ZnI\">iBuffalo SNES<\/a> style and knock off PS3 style<\/p>\n<p>A keyboard for the Pi3 &#8212; any usb keyboard will work.\u00a0 I like this <a href=\"http:\/\/amzn.to\/2AHvczr\">one.<\/a><\/p>\n<p>And if you want to make it look awesome, you could always get <a href=\"http:\/\/amzn.to\/2DuIxIk\">this<\/a> because, nostalgia.<\/p>\n<p>First, download the most recent version of RetroPie for the Raspberry Pi 3.\u00a0 This can be found at <a href=\"https:\/\/retropie.org.uk\/download\/\">https:\/\/retropie.org.uk\/download\/.\u00a0 <\/a>Once this is done, we can extract the contents of the archive.\u00a0 My personal favorite for this is a small program called dtrx .\u00a0 This usually is not included with your distro of choice but can easily be acquired through your package manager.\u00a0 On a Debian based system this would use the command &#8220;sudo apt install dtrx&#8221; in the terminal.\u00a0\u00a0 Then type &#8220;cd Downloads&#8221; since this is where the file should have saved, and then &#8220;dtrx &lt;filename&gt;&#8221;.\u00a0 Tab completion helps here.\u00a0 Simply type the first few letters of the filename,\u00a0 which should be &#8220;retr&#8221; press tab on the keyboard, and bash should fill in the rest.<\/p>\n<p>Next plug in your micro SD card to the computer, not the Pi.\u00a0 Wait for the drive to mount and in your terminal type &#8220;dmesg | tail&#8221;.\u00a0 This gives a readout of the last ten lines of the kernel buffer.\u00a0 This will provide you with the \/dev name of your connected drive.\u00a0 Usually this will be in the format [sdX] with X being a letter that is displayed in the terminal, in this screenshot<\/p>\n<figure id=\"attachment_68\" aria-describedby=\"caption-attachment-68\" style=\"width: 604px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/thinkleet.net\/wp-content\/uploads\/2017\/06\/Screenshot-from-2017-06-07-20-57-09.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-68\" src=\"https:\/\/thinkleet.net\/wp-content\/uploads\/2017\/06\/Screenshot-from-2017-06-07-20-57-09.png\" alt=\"dmesg output\" width=\"604\" height=\"100\" \/><\/a><figcaption id=\"caption-attachment-68\" class=\"wp-caption-text\">Output of dmesg<\/figcaption><\/figure>\n<p>, you can see mine is sdc.\u00a0\u00a0 We can do the same with the &#8220;mount&#8221; command if you know what you are looking for, but for now dmesg is our best option.\u00a0 The disk I am using just happens to be sdc, so all of my commands will use this.\u00a0 Be sure to substitute your own that was found with dmesg | tail for your own use.<\/p>\n<p>Now that we have our image file and our SD card \/dev reference, we can start the process of writing the image to the card.\u00a0 If you have made sure that you have the right \/dev reference this is not a dangerous thing, but be warned, using the wrong \/dev reference will all but guarantee you a bad day.\u00a0 The next command is &#8220;sudo dd if=&lt;imagefilename&gt; of=\/dev\/sdX&#8221;.\u00a0 This will take a few minutes to write depending on the speed of your SD card and other variables.\u00a0 Once it is done, place the SD card into the Raspberry Pi with it connected to a screen, and let it do its magical resizing of the partitions.<\/p>\n<p>Now that the partitions are resized we can start configuring.\u00a0 The Emulation Station frontend will load automatically, and ask you to start configuring your controllers.\u00a0 At this point, we are not going to configure them.\u00a0 I&#8217;m personally more of a fan of installing all my games on a USB drive.\u00a0 This is a personal choice, and if you prefer to keep them on the SD card, you can skip the next part.<\/p>\n<p>Power off the PI properly.\u00a0 This can be done by pressing F4 and the keyboard and typing &#8220;sudo poweroff&#8221; in the terminal that loads.\u00a0 Once the PI safely shuts down, remove the SD card.<\/p>\n<p>We are going to take the SD card, and a USB flash drive (the larger the better) to our GNU\/Linux workstation.\u00a0 Insert the USB drive into the machine.\u00a0 The majority of USB drives sold in stores are by default formated to FAT32.\u00a0 Retropie can read this file system, but I prefer to rewrite them to be ext4 formatted.\u00a0 Again personal preference, lifespan be damned.\u00a0 To do this, I use gparted.\u00a0 With the drive formatted now to ext4, unplug and replug in the drive.\u00a0\u00a0 In a terminal, run &#8220;dmesg | tail&#8221; again to find the \/dev\/sdX designation of the flash drive.\u00a0 This may be the same as it was for the SD card since the SD has been removed, and then run &#8220;sudo blkid&#8221;.\u00a0 We are looking to find the UUID of the disk we just formated and it will be preceded on the screen by the \/dev\/sdX designation.\u00a0 This is a long number made of hexadecimal digits, and we will copy this to the clipboard.\u00a0 The next step is to plug in the SD card we created, and navigate to partition that is not called &#8220;boot&#8221;\u00a0 this should automount under the \/media\/$USER\/ folder.\u00a0\u00a0 You can then copy the contents of the \/home directory on the SD card to the USB drive.\u00a0 This can be accomplished by &#8220;rsync \/media\/$USER\/SDCARDDIRECTORY\/home\/ \/media\/$USER\/USBDIRECTORY\/ -aP&#8221; .\u00a0 Once this completes, use the command &#8220;sync&#8221; to ensure all data is copied.\u00a0 then delete the contents of the \/media\/$USER\/SDCARDDIRECTORY\/home.\u00a0 You can use the rm command for this, like so &#8220;rm \/media\/$USER\/SDCARDDIRECTORY\/home\/* -R&#8221;.\u00a0 Next up, we are going to tell RetroPie that we want to use the home directory we create on the USB drive as the home directory for RetroPie.\u00a0 We will do this by modifying the fstab file in \/media\/$USER\/SDCARDDIRECTORY\/etc\/.\u00a0 To do this type &#8220;sudo nano \/media\/$USER\/SDCARDDIRECTORY\/etc\/fstab&#8221;\u00a0 a simple text editor will appear that doesn&#8217;t require dark magic to navigate, unlike vim.<\/p>\n<p>In nano, you&#8217;ll see something like this.<\/p>\n<figure id=\"attachment_89\" aria-describedby=\"caption-attachment-89\" style=\"width: 472px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/thinkleet.net\/wp-content\/uploads\/2017\/12\/withoutuuid.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-89\" src=\"https:\/\/thinkleet.net\/wp-content\/uploads\/2017\/12\/withoutuuid-300x28.png\" alt=\"\" width=\"472\" height=\"44\" srcset=\"https:\/\/thinkleet.net\/wp-content\/uploads\/2017\/12\/withoutuuid-300x28.png 300w, https:\/\/thinkleet.net\/wp-content\/uploads\/2017\/12\/withoutuuid.png 591w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><\/a><figcaption id=\"caption-attachment-89\" class=\"wp-caption-text\">fstab screenshot<\/figcaption><\/figure>\n<p>What we are going to do is add a new line, telling fstab what the USB drive is and to mount it at boot time into \/home.\u00a0 This looks like this, and all you need to do is change the UUID to the one that was copied earlier from &#8220;sudo blkid&#8221;<\/p>\n<figure id=\"attachment_90\" aria-describedby=\"caption-attachment-90\" style=\"width: 468px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-90\" src=\"https:\/\/thinkleet.net\/wp-content\/uploads\/2017\/12\/withuuid-300x41.png\" alt=\"fstab with uuid\" width=\"468\" height=\"64\" srcset=\"https:\/\/thinkleet.net\/wp-content\/uploads\/2017\/12\/withuuid-300x41.png 300w, https:\/\/thinkleet.net\/wp-content\/uploads\/2017\/12\/withuuid-672x94.png 672w, https:\/\/thinkleet.net\/wp-content\/uploads\/2017\/12\/withuuid.png 687w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><figcaption id=\"caption-attachment-90\" class=\"wp-caption-text\">fstab updated<\/figcaption><\/figure>\n<p>Now that we have that set, we can proceed to copying our game files over.\u00a0\u00a0 Since we still have our USB plugged into the PC, we can do this natively, and RetroPie has laid out the folders in a straightforward manner.\u00a0 All the game files go under RetroPie\/roms with separate subdirectories for each game system.\u00a0 Additional systems can be installed later, and rsync&#8217;d across the network over ssh or via smb shares.\u00a0 The next part of the puzzle, is what kind of controllers do you wish to use.\u00a0 There are many choices out there, and some work better than others.\u00a0 The two of which I am a fan are listed above.<\/p>\n<p>Both of these work well for casual gaming, and I&#8217;ve used both with the only caveat being that the controllers are defined in RetroPie as Shanwan Clones.\u00a0 The default bluetooth stack does not work with these.\u00a0 RetroPie takes care of installing the correct software, but bluetooth keyboards will cease to work when using any type of PS3 compatible controller.\u00a0 For the cost of them though in my opinion, it is worth the trade-off.<\/p>\n<p>Boot up your RetroPie system now, and we can start to configure the controllers and add additional software.\u00a0 Once booted exit out to the command line by pressing F4 on the keyboard.\u00a0 Type &#8220;cd RetroPie-Setup&#8221; and then &#8220;sudo .\/retropie-setup.sh&#8221; .\u00a0 This loads the RetroPie configuration application where we can update, install new software, and configure the PS3 controllers.\u00a0 First select update, and allow the software to do it&#8217;s thing.\u00a0 The next step I usually take is to go to manage packages then manage optional packages and install Kodi.\u00a0 I really like this software, and has been in use in my household since the days of the softmodded original XBox with the &#8220;Duke&#8221; controller.\u00a0 I also am running another Pi3 as a file server on the network that feeds videos and music to everything on the network, so one multipurpose box taking up an HDMI port is always a win.<\/p>\n<p>If using the PS3 controllers your next step is to install the drivers\/this is under Configuration\/Tools then ps3controller.\u00a0 Follow the directions on-screen and you&#8217;ll be able to use the wireless controllers.<\/p>\n<p>Finally, the last step of my install is to get moonlight up and running.\u00a0 Moonlight is cross-platform streaming software that takes advantage of the Nvidia game streaming system that is available on Windows.\u00a0 I have a ridiculous collection of Steam games, a Steam Link, and the Steam Controller, but my TV used to only have one HDMI port, and it got old swapping cables.<\/p>\n<p>To install Moonlight, exit out to the command line again, ensure that you are connected to the network on your RetroPie, confirm you have game streaming enabled on your gaming computer and in the command line on your RetroPie type &#8220;cd&#8221; to return to the home directory.\u00a0 Type &#8220;wget https:\/\/raw.githubusercontent.com\/TechWizTime\/moonlight-retropie\/master\/moonlight.sh &#8211;no-check&#8221; to download the latest version of Tech Wiz Time&#8217;s Moonlight install script.\u00a0 Type &#8220;sudo chmod +x moonlight.sh&#8221; to allow the script run permissions.\u00a0 Type &#8220;sudo .\/moonlight.sh&#8221; and follow the onscreen instructions.<\/p>\n<p>Now that everything is installed, you can reboot the pi with &#8220;sudo reboot&#8221; or simply type &#8220;emulationstation&#8221; in the terminal, configure your controllers,\u00a0 and start your adventure re-playing the classics from your childhood.\u00a0 If you have any questions, please feel free to ask below.\u00a0 Any requests for where to find games will be directed to lmgtfy.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this posting, I&#8217;ll be walking you through a setup of Retropie on the Raspberry Pi3.\u00a0 We&#8217;re going to be working exclusively in GNU\/Linux in this tutorial, as all the necessary software is already included in most distros, and most of the file systems we will be working with are ext3\/ext4.\u00a0 If you are unfamiliar &hellip; <a href=\"https:\/\/thinkleet.net\/index.php\/2017\/12\/14\/full-setup-of-retropie\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Full setup of Retropie.<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,9],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-media-center","category-pi"],"_links":{"self":[{"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":16,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":225,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/posts\/66\/revisions\/225"}],"wp:attachment":[{"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thinkleet.net\/index.php\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}