This is not a normal RetroPie setup
And what do I mean by that?
Well
There's a hard drive
There's a Raspberry Pi
But the only difference is: There's no SD Card
Stick around to see how you can do it too
You know what time it is
Okay so this project here is osmething I've been working on for a while and
From I can see it hasn't actually been done before
with RetroPie, so
this is the first
What I wanted to do was to create a system that would boot of a Hard Drive
Without the need for a SD Card
but I thought well RetroPie is a great contender for that because
ROMs are so big and so forth and making the room on the Hard Drive itself
Would reduce the risk of losing your SD Card because of all the writes that it's making
So what I'll do now is I'll go through and I'll show you how to actually set this up so you can do it too
So let's pop over to the Raspberry Pi and let's check this out
So now when I run the Pie an important thing to realize is that
this will not work with all USB Devices, I tried it on several Hard Drives and several USB Sticks and some of them just dind't worked
So it did take a little bit of trrial and error to find one that did work, so
you'll need to be patient with that
This also only works with the Raspberry Pi 3
and you're using an USB 2 1/2 inch or Portable Hard Drives
You will need another power source for it
Because the Raspberry Pi 3 isn't poweful enough to power
the USB Hard Drives
What you'll need is called a wire cable and you can get those on Ebay or Amazon. I'vve got some links down on the description below
So the first thing you're gonna wanna do is get into the "Command Line" and to do that on RetroPie you just nit to hit "F4" on the keyboard
Now I will leave the command lines down in the description below
but what you'll need to type in is: "sudo api-get update && sudo apt-get install rpi-update"
Press "Enter" and be prepared to wait for a while so speed this up that way you have to sit around and watch it
but got make a coffee and come back to it soon
Actual item took about a minute so what you need to type in now is "sudo BRANCH=next" and then "rpi-update"
What this command will do it will download the latest boot files that will allow you to boot your Raspberry Pi from a USB Device
without the need for a MicroSD Card
this will only take about two minutes to finish so once that's done you'll be back to the command line again
So the next thing that we have to do is we need to put some information into the boot config file
so to do that we'll type in "echo program_usb_boot_mode=1"
Then we'll use the line ("|") which is above the enter key
and then "sudo tee -a /boot/config.txt"
Now all we need to do is type in "sudo reboot"
and we'll reboot the Raspberry Pi and we'll be back in a second
Once that's finished rebooting we'll need to go back into the command line so press "F4" on the keyboard
And the first command that we'll need to type in is to figure out whether or not what we've done has worked
So we need to type in "vcgencmd otp_dump"
Then the line above "Enter" key ("|")
And then "grep 17:"
Press "Enter" and when it comes back, it should come back if it works correctly
with "17:3020000a"
If it did then the next thing what we need to do is go into the config file so to do that
we type in "sudo nano /boot/config.txt"
Not this will upen up the editor so we've just jut got to go right down to the very bottom with the arrow keys and then we're just gonna remove that program USB Command Line
After we're done press "Ctrl X" "Y" and then "Enter"
and that will save the file
So now, with the Hard Drive plugged in what we'll do is we will start setting up the partitions
so to do that we'll type in "sudo parted /dev/sda"
And the command that we'll type in now is "mktable msdos"
We just need to say "Yes" here to distroying the disk label, that's already on "sda"
So the next thing that we're going to do is create the "Fat32" partition for this Hard Drive
So to do that we type in "mkpart primary fat32 0% 100M" and press "Enter"
And the next step is to create the Linux Partition, so to do that we type in "mkpart primary ext4 100M 100%" and press "Enter"
So what that's done now is it created a 100 Megabyte partition for "fat32" which is the boot partition
And then it's created the rest of the space as a Linux partition
and by typing in "print" you can see the partitions and what sizes they are
So once you're done with that all you need to type in is "quit" to exit the partition tool
Ok so the next step is we're going to type in "sudo mkfs.vfat -n BOOT -F 32 /dev/sda1"
Once that's finished we'll do the same for the Linux partition except a little bit different, we'll just type in "sudo mkfs.ext4 /dev/sda2"
This will take a little while but once it's finished we'll be back to the Command Line again
So now that we've set up the two partitions what we'll do now is we'll start setting up copying accross all the files from every required installation
So the first thing we'll need to do is type in "sudo mkdir /mnt/target"
Press "Enter"
And the next thing is to type in "sudo mount /dev/sda2 /mnt/target"
So what that's doing is creating a mount point for the Linux partition
So the next thing we need to type in is "sudo mkdir /mnt/target/boot" and press "Enter"
And then we'll type in "sudo mount /dev/sda1 /mnt/target/boot"
And what that will do is it will mount the foot partition of the Hard Drive to that folder
Now the next step is to just do a quick update and make sure we've got "rsync" installed
so to do that we'll type in "sudo apt-get update && sudo apt-get install rsync"
And press "Enter"
And with any luck this should only take about a minute
so once that's done
we'll type in "sudo rsync -ax --progress / /boot /mnt/target"
And press "Enter"
And be prepared to wait a long time for this one to finish because basically is copying every single file form your RetroPie installation SD Card
and putting it onto you Hard Drive
And depending on how many ROMs, how many files, etcetera you've got on there
is going to depend on how long it takes, it could be 10 minutes, it could be an hour, it could be two hours, so
definitely, go and relax and then come back and check on it every now and then
Ok so now that we're back what we'll do is we'll go into one of the map directory, so to do that we'll type in "cd /mnt/target"
And what we're gonna do here is we're gonna find some system directore, so, we'll do "sudo mount --bind /dev dev"
Hit "Enter"
Ok, we'll do the same again, "sudo mount --bind /sys sys"
And hit "Enter"
And then again "sudo mount --bind /proc proc"
And press "Enter"
So now what we're going to do is we're going to remove the "SSH Key" so that way it's a little bit more secure so to do that we type in "sudo chroot /mnt/target"
Now once we've got root access what we'll do is we'll type in "rm /etc/ssh/ssh_host*"
Press "Enter"
And now we'll hit in the reconfigure options so to do that we'll type in "dpkg-reconfigure openssh-server"
This might take moment and that will reset the "SSH Keys"
Once that is done all we need to do is type in "exit" and we will out of root access
And now we just need to unmount the bondings that we just did so we'll type in "sudo unmount dev"
"Enter"
And then we'll type in "sudo unmount sys"
And "Enter"
And then lastly "sudo unmount proc"
And "Enter"
Now the next commands I'm even going to attempt to say because they're very long, so what I'll do is I'll put it on the screen now for you just so you can copy it down, again, these will be in the description below
but what is basically doing is adding some information to the command line portion of the boot file and also the "fstab"
so, once you put these in you'll need to press "cd", the "~" key, which is above the "Tab" on US keyboards
And once that's done you need to type in "sudo unmount /mnt/target/boot"
"Enter"
This will log me out of the boot partition, and then the next step is "sudo unmount /mnt/target"
And finally, what we'll do is we'll power this off so we can out the SD Card
and to do that we'll just type in "sudo poweroff" and press "Enter"
So, what you need to do now is you need to remove the SD Card from your Raspberry Pi
after it's powered off
And just leave the USB Stick or Hard Drive connected
Then we will start it out
And with any luck
And I do mean luck
It will start up like this right now
Now with my particular configuration it does seem takes a lot longer to boot from the Hard Drive, but again it could be just how I set it up
and the Hard Drive that I'm using, so
After a lot of trial and error I finally got my RetroPie installation on my Raspberry Pi 3 to boot directly form my USB Hard Drive
Awesome
Ok so as you can see that's all set up, it's all running and it's all working, however
there are a few things that you need to know, one of them is that you need a special USB Cable
And you can see from what I'm showing you now is that it's a wire cable so it actually transmits data as well as power thru the one cable
normally, but this one being a Y cable
Sends the data down one end
And then the power at the other end
Now the reason why this is needed especially for Portable Hard Drives is because the power requirements of the Portable Hard Drive to boot
Connected to a Raspberry Pi 3 it just won't work
So the link for this cable is down in the description below
Now one of the other things with the cable and powering it is that you do need a power suply with a lot of power
Now, I actually fooled around with this for quite some time and it took just Five Dollars just for this video to get it to work properly, so
It is something that you're going to have to play around with and it doesn't works with all Hard Drives like I mentioned
Well, that's it for another video, I really hope you liked it
If you're not a subscriber already then make sure you do, and if you are, make sure you hit the bell icon so you get notified of my new videos
Share this video with a friend if you think they'll like it and make sure you like and comment on this video too
And as always, Imagine, Learn, Create