In this article, you are going to learn how to use an HDD with your Raspberry Pi instead of a SD Card.
If you really enjoy this article, consider checking out my TechWizTime YouTube Channel.
And for an awesome source of Raspberry Pi Accessories, check out my Raspberry Pi Amazon List.
Let’s get started!
Table of Contents
Press “F4” to get into the Command Line.
Type “sudo apt-get update && sudo apt-get install rpi-update” and press “Enter”
Type “sudo BRANCH=next rpi-update” and press “Enter”
Type “echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt” and press “Enter”
Reboot the system by tytping “sudo reboot”
After it reboots properly, press “F4” to return to the Command Line.
Type “echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt” and press “Enter”, if the return is 17:3020000a, you may continue, if not, then your HDD or USB Stick may not be compatible.
Go into the config file by typing “sudo nano /boot/config.txt” and then pressing “Enter”
Scroll to the bottom of the file with your arrow keys.
Delete the line that reads “program_usb_boot_mode=1”
Press “Ctrl” + “X”, then press “Y” and then hit “Enter”, this will save the file and take us back to the Command Line.
After we’re back to the Command Line, type “sudo parted /dev/sda” and press “Enter”
Type “mktable msdos” and press “Enter”
Say “Yes” to destroying the disk label.
Create the “fat32” partition by typing “mkpart primary fat32 0% 100M”
Create the Linux partition by typing “mkpart primary ext4 100M 100%”
Type “quit” to get out of the partition tool
Type “sudo mkfs.vfat -n BOOT -F 32 /dev/sda1” and press “Enter”
Type “sudo mkfs.ext4 /dev/sda2” and then press “Enter”
Type “sudo mkdir /mnt/target” and press “Enter”
Type “sudo mount /dev/sda2 /mnt/target/” and press “Enter”
Type “sudo mkdir /mnt/target/boot” and press “Enter”
Type “sudo mount /dev/sda1 /mnt/target/boot/” and press “Enter”
Be sure that you have “rsync” installed to it’s latest version by typing “sudo apt-get update && sudo apt-get install rsync”
Type in “sudo rsync -ax –progress / /boot /mnt/target” and press “Enter”. Be ready to have a long wait as it’ll start to copy all the files on your SD Card to your Hard Drive.
Type “cd /mnt/target” to access one of the mount directories
Type “sudo mount –bind /dev dev” and press “Enter”
Type “sudo mount –bind /sys sys” and press “Enter”
Type “sudo mount –bind /proc proc” and press “Enter”
To delete your SSH key and make your Drive a bit more secure, type “sudo chroot /mnt/target” and press “Enter” to get root access
Type “rm /etc/ssh/ssh_host*” to delete your SSH key.
Type “dpkg-reconfigure openssh-server” to create a new SSH key.
Type “Exit” once that the new SSH key is generated to get out of root.
Type “sudo umount dev” and press “Enter”
Type “sudo umount sys” and press “Enter”
Type “sudo umount proc” and press “Enter”
Finish adding the needed information to the Command Line of the Boot file by typing “sudo sed -i “s,root=/dev/mmcblk0p2,root=/dev/sda2,” /mnt/target/boot/cmdline.txt” and then press “Enter”
Add “fstab” to the boot file by typing “sudo sed -i “s,/dev/mmcblk0p,/dev/sda,” /mnt/target/etc/fstab” and then pressing “Enter”
Type “cd ~” after entering the last 2 commands and press “Enter”
Log out of the boot partition by typing “sudo umount /mnt/target/boot”
Type “sudo umount /mnt/target” and press “Enter”
Power off your Raspberry Pi by typing “sudo poweroff”, that way you can take out the SD Card.
Congratulations, you’ve just set up your HDD to work with your Raspberry Pi and boot into RetroPie.
Did you manage to set it up by yourself? Did you have any problems during the setup? Have any suggestions? Then leave a comment below.
11 Survival Gadgets 2024 | Every Man Should Have 🔗 LINKS Spika Strike Gaiter -…
Unleash the power of the OneXGPU and take your gaming experience to the next level!…
To play the videos stored on your computer, you’ll need a reliable media player. If…
🔔 SUBSCRIBE for more Tech Tips: https://www.youtube.com/tasiacustode?Sub_Confirmation=1 Support me here: https://ko-fi.com/tasiacustode Become a Patron: https://www.patreon.com/TasiaCustode…
15 New Gadgets 2024 | You Will Want To Buy 🔗 LINKS Artemis - https://artemis.wonderfitter.com/…
Razer just released the new Razer Viper V3 Pro mouse, another addition into their Viper…