Automatic Raspberry-pi based secure hard drive eraser. This will erase any block device plugged into the USB bus using the shred command. It will then create a partition table and a single FAT32 partition to make the drive immediately usable. This is somewhat similar to creating that runs DBaN with the /autonuke option enabled. By just doing Points 2.2 and 2.3 you will not loose any data stored or customization on your USB Device. You can replace the USB device with a HDD for more storage. 4 Setting the time correctly: Raspberry PI.
- Install Kodi Raspberry Pi
- Kodi Raspberry Pi Usb Drive
- Update Kodi Raspberry Pi
- Running Kodi On Raspberry Pi
- Raspberry Pi Kodi Download
- I connect a usb drive to my raspberry pi and i want to add it to my libary but it doensnt show the usb drive. Kodi is a free and open source media player.
- You can connect your external hard disk, SSD, or USB stick to any of the USB ports on the Raspberry Pi, and mount the file system to access the data stored on it. By default, your Raspberry Pi automatically mounts some of the popular file systems such as FAT, NTFS, and HFS+ at the /media/pi/HARD-DRIVE-LABEL location.
Build your own Raspberry Pi Media Centre with hard drive storage.
BUILD TIME: 30 MINUTES
DIFFICULTY RATING: Intermediate
With streaming services increasing in popularity, the humble media centre has arguably become less useful. However, this project gives you apps, as well as hard drive storage capacity for your own content too!
THE BROAD OVERVIEW
This project uses the popular Raspberry Pi 3+ with the free and open source Kodi media player application to create a home theatre in your home (or bedroom).
We show you how to install the Kodi media player onto your RPi so you can play videos, music, podcasts and other media files from an SD card or hard drive onto a TV or monitor.
To get started, all that's required is a Raspberry Pi 3+ and an SD Card. Next month, we will explore the option of adding an external HDD or two by building a powered USB Hub!
If you want to run more than a single USB Hard Drive from a Raspberry Pi, you'll rapidly end up running into a power problem. Your Pi will struggle to keep the power going to a few drives. The build in next month's issue solves this by creating a USB power injection circuit to provide plenty of 5V power. This is then used to power the USB drives, and also the Raspberry Pi itself.
In next month's article, we will also finish the build and provide a home theatre inspired 3D printed case with different hard drive configurations.
HOW IT WORKS
For this project, we have decided to use KODI (formerly XBMC) and the easiest way to get Kodi up and running on your Raspberry Pi is to use the Linux distribution called LibreELEC 'Just enough OS for Kodi'. This frees up resources and ensures the system isn't full of bloated code that may perform functions you'd never use in a media centre.
Out of the many OS variations available for Raspberry Pi, LibreELEC is one of the simplest to roll out. But we'll still detail the steps.
It's worth pointing out that Kodi should only be used for content to which you have the legal right to access. Some countries allow you to make a digital backup of your DVD's but unfortunately here in Australia, it's illegal to do so. Please check your country's copyright laws and make smart decisions.
SOFTWARE INSTALLATION
LibreELEC makes it REALLY easy to get going with KODI, by providing a bunch of pre-packaged options for the OS you're using.
First, head over to https://libreelec.tv and navigate to downloads then download the creator for your OS.
Once downloaded, open the LibreELEC SD Creator and select your Pi version then click Download. Once the download is complete, you can then select your SD Card and Write.
Alternatively, if you have trouble with the SD Creator, as we did using OSX (it kept crashing). On the downloads page, scroll down to the direct downloads section and select your Raspberry Pi version and download the correct image.
Flash the image onto your SD card using your preferred application. We recommend Etcher: https://www.balena.io/etcher/
START YOUR RASPBERRY PI
Insert the newly formatted SD card, attach a keyboard and/or mouse and power on your Raspberry Pi. Once it boots up, you should be presented with a setup wizard. Complete the setup process with your preferred options. If changing the hostname, it cannot contain spaces.
Once complete you should be presented with the Kodi dashboard.
CONTROLLING YOUR MEDIA CENTRE
Chances are you will not want to control your media centre with a wired keyboard and mouse. Some good options are:
Install Kodi Raspberry Pi
- Wireless USB keyboard with trackpad
- Setup IR on your Pi and use a remote (beyond the scope of this project)
- Download the app
The app is a great way to control your media centre.
IOS
Official Kodi Remote: https://apps.apple.com/app/official-kodi-remote/id520480364
Android
Kore, Official Remote for Kodi: https://play.google.com/store/apps/details?id=org.xbmc.kore
INSTALLING KODI ADD-ONS
Now we have our media centre but nothing to watch! A great feature of Kodi is it's very easy to install add-ons. There are loads of free add-ons to explore but we will get you started with a must have YouTube.
From the main menu, navigate to Add-ons > Install from repository.
Select Kodi Add-on repository, then choose Video add-ons.
Scroll down and select YouTube. Select Install and choose OK if it asks to install software dependencies. Lastly, select Yes to Execute setup-wizard.
After the app has installed, go back to the Add-ons view and open YouTube
Now you can watch all your favourite DIYODE videos from the comfort of your lounge, huzzah!
FINISHING TOUCHES
To load your own media, copy your media to the SD card or an external USB HDD under the relevant directories.
From Kodi, navigate to either Pictures or Videos, depending on what you have copied. Select Files and browse to their location.
SAVE YOUR SCREEN!
Click the settings cog, then select Interface.
Select screensaver > Screensaver mode, then select Get more. From here, you can download the screensaver of your choice.
Kodi Raspberry Pi Usb Drive
Click preview to try it out! Now if you happen to leave your TV on, you won't be at risk of LCD burn in!
Next month, we're going to solve the issue of powering a Raspberry Pi with a few extra drives, and open up network sharing to load media in from your favourite computer. We'll also build our media centre into a really neat 3D printed case! In the meantime you can enjoy the system in its raw form!
Updated on September 03, 2019
Update #1:
This guide has been updated. Tested on Raspbian Buster on a Raspberry Pi 4
Over this past weekend, I finally setup a network share via Samba on my Raspberry Pi with an old external USB hard drive I had laying around. My RetroPie installation already serves up a Samba share - so my goal was to throw an additional folder in there that mounts to an external drive. After a bit of trial and error, here's how I pulled it off.
Step one was to format my drive to the ext4 filesystem. I read varying opinions on which filesystem is recommended for this procedure, and ext4 seemed to be a good choice in the end. While there are ways to format your drive directly via the CLI - I decided to use a trial of ExtFS for Mac and it was very easy.
Next, I plugged my external drive into the RPi and connected over SSH. Once you're connected, run the following command:
Now, look towards the bottom and assuming this is the only additional drive you have plugged in, you should see something like this:
/dev/sda1 is the name of the partition on our external drive.
Next we're going to create a directory within our /media/
folder to mount our drive into, and also a sub-directory within it. The reason for the sub-directory is that I want to avoid seeing the lost+found folder on the ext4 partition we created.
After that, we want to ensure that we have the full access to the directory.
Next, we want to mount our external drive into that new directory.
Now we'll need to update our Samba config. If you're already running RetroPie, you've already got Samba installed. If not, you may need to run the following command.
Before you edit your Samba config, make a quick backup copy of the current file.
Update Kodi Raspberry Pi
Now, jump into the config file.
We're going to want to jump straight to the bottom of this file - so if you're on a Mac just hit fn and the downarrow a few times.
Build your own Raspberry Pi Media Centre with hard drive storage.
BUILD TIME: 30 MINUTES
DIFFICULTY RATING: Intermediate
With streaming services increasing in popularity, the humble media centre has arguably become less useful. However, this project gives you apps, as well as hard drive storage capacity for your own content too!
THE BROAD OVERVIEW
This project uses the popular Raspberry Pi 3+ with the free and open source Kodi media player application to create a home theatre in your home (or bedroom).
We show you how to install the Kodi media player onto your RPi so you can play videos, music, podcasts and other media files from an SD card or hard drive onto a TV or monitor.
To get started, all that's required is a Raspberry Pi 3+ and an SD Card. Next month, we will explore the option of adding an external HDD or two by building a powered USB Hub!
If you want to run more than a single USB Hard Drive from a Raspberry Pi, you'll rapidly end up running into a power problem. Your Pi will struggle to keep the power going to a few drives. The build in next month's issue solves this by creating a USB power injection circuit to provide plenty of 5V power. This is then used to power the USB drives, and also the Raspberry Pi itself.
In next month's article, we will also finish the build and provide a home theatre inspired 3D printed case with different hard drive configurations.
HOW IT WORKS
For this project, we have decided to use KODI (formerly XBMC) and the easiest way to get Kodi up and running on your Raspberry Pi is to use the Linux distribution called LibreELEC 'Just enough OS for Kodi'. This frees up resources and ensures the system isn't full of bloated code that may perform functions you'd never use in a media centre.
Out of the many OS variations available for Raspberry Pi, LibreELEC is one of the simplest to roll out. But we'll still detail the steps.
It's worth pointing out that Kodi should only be used for content to which you have the legal right to access. Some countries allow you to make a digital backup of your DVD's but unfortunately here in Australia, it's illegal to do so. Please check your country's copyright laws and make smart decisions.
SOFTWARE INSTALLATION
LibreELEC makes it REALLY easy to get going with KODI, by providing a bunch of pre-packaged options for the OS you're using.
First, head over to https://libreelec.tv and navigate to downloads then download the creator for your OS.
Once downloaded, open the LibreELEC SD Creator and select your Pi version then click Download. Once the download is complete, you can then select your SD Card and Write.
Alternatively, if you have trouble with the SD Creator, as we did using OSX (it kept crashing). On the downloads page, scroll down to the direct downloads section and select your Raspberry Pi version and download the correct image.
Flash the image onto your SD card using your preferred application. We recommend Etcher: https://www.balena.io/etcher/
START YOUR RASPBERRY PI
Insert the newly formatted SD card, attach a keyboard and/or mouse and power on your Raspberry Pi. Once it boots up, you should be presented with a setup wizard. Complete the setup process with your preferred options. If changing the hostname, it cannot contain spaces.
Once complete you should be presented with the Kodi dashboard.
CONTROLLING YOUR MEDIA CENTRE
Chances are you will not want to control your media centre with a wired keyboard and mouse. Some good options are:
Install Kodi Raspberry Pi
- Wireless USB keyboard with trackpad
- Setup IR on your Pi and use a remote (beyond the scope of this project)
- Download the app
The app is a great way to control your media centre.
IOS
Official Kodi Remote: https://apps.apple.com/app/official-kodi-remote/id520480364
Android
Kore, Official Remote for Kodi: https://play.google.com/store/apps/details?id=org.xbmc.kore
INSTALLING KODI ADD-ONS
Now we have our media centre but nothing to watch! A great feature of Kodi is it's very easy to install add-ons. There are loads of free add-ons to explore but we will get you started with a must have YouTube.
From the main menu, navigate to Add-ons > Install from repository.
Select Kodi Add-on repository, then choose Video add-ons.
Scroll down and select YouTube. Select Install and choose OK if it asks to install software dependencies. Lastly, select Yes to Execute setup-wizard.
After the app has installed, go back to the Add-ons view and open YouTube
Now you can watch all your favourite DIYODE videos from the comfort of your lounge, huzzah!
FINISHING TOUCHES
To load your own media, copy your media to the SD card or an external USB HDD under the relevant directories.
From Kodi, navigate to either Pictures or Videos, depending on what you have copied. Select Files and browse to their location.
SAVE YOUR SCREEN!
Click the settings cog, then select Interface.
Select screensaver > Screensaver mode, then select Get more. From here, you can download the screensaver of your choice.
Kodi Raspberry Pi Usb Drive
Click preview to try it out! Now if you happen to leave your TV on, you won't be at risk of LCD burn in!
Next month, we're going to solve the issue of powering a Raspberry Pi with a few extra drives, and open up network sharing to load media in from your favourite computer. We'll also build our media centre into a really neat 3D printed case! In the meantime you can enjoy the system in its raw form!
Updated on September 03, 2019
Update #1:
This guide has been updated. Tested on Raspbian Buster on a Raspberry Pi 4
Over this past weekend, I finally setup a network share via Samba on my Raspberry Pi with an old external USB hard drive I had laying around. My RetroPie installation already serves up a Samba share - so my goal was to throw an additional folder in there that mounts to an external drive. After a bit of trial and error, here's how I pulled it off.
Step one was to format my drive to the ext4 filesystem. I read varying opinions on which filesystem is recommended for this procedure, and ext4 seemed to be a good choice in the end. While there are ways to format your drive directly via the CLI - I decided to use a trial of ExtFS for Mac and it was very easy.
Next, I plugged my external drive into the RPi and connected over SSH. Once you're connected, run the following command:
Now, look towards the bottom and assuming this is the only additional drive you have plugged in, you should see something like this:
/dev/sda1 is the name of the partition on our external drive.
Next we're going to create a directory within our /media/
folder to mount our drive into, and also a sub-directory within it. The reason for the sub-directory is that I want to avoid seeing the lost+found folder on the ext4 partition we created.
After that, we want to ensure that we have the full access to the directory.
Next, we want to mount our external drive into that new directory.
Now we'll need to update our Samba config. If you're already running RetroPie, you've already got Samba installed. If not, you may need to run the following command.
Before you edit your Samba config, make a quick backup copy of the current file.
Update Kodi Raspberry Pi
Now, jump into the config file.
We're going to want to jump straight to the bottom of this file - so if you're on a Mac just hit fn and the downarrow a few times.
Running Kodi On Raspberry Pi
Once you get to the bottom, you should see a list of familiar folders that RetroPie already shares (roms, bios, configs, and splashscreens). Create another sections just below the last that looks like this:
The name and the comment can be customized, but definitely make sure your path matches the one you created earlier.
And finally, you'll want to restart your Samba daemons.
Raspberry Pi Kodi Download
At this point you should be able to read and write to your Samba share via Finder by clicking on retropie under the Shared heading and then accessing your new folder called share.
The final step we'll want to do is edit our fstab configuration so that our drive will properly mount whenever our Raspberry Pi reboots.
Add the following line to the bottom of the config file (making sure to match the values you've used previously)./dev/sda1 /media/USBHDD auto noatime 0 0
And now we're done. Enjoy your new network share drive. Personally I've hooked mine into every device on my network that can run Kodi for a personal media library accessible throughout the home.