Here are a few brief experiences of setting up my Raspberry Pi 2b and 2TB hard drive as a media centre. It might be of use to someone else. These notes assume you have some experience of managing a Linux system.
8GB micro SD root drive
2TB WD media drive via USB
An old, very old, USB wifi adapter. It works but is slow. I only use it to update my media and connect via SSH so it’s not an issue for now.
An OSMC remote control (I now realise that my Samsung One remote also does the job!)
OSMC build: 15/8/2023 (yes, I’m in the UK)
The OSMC install is very easy, but somewhat frustratingly the external USB drive is not automatically mounted. So, get my media drive (/dev/sda5 in this case) to mount at boot. First, identify it.
You need to ssh into the system.
/dev/sda5: LABEL=“Home” BLOCK_SIZE=“512” UUID=“3AF4A693F4A650C5” TYPE=“ntfs” PARTUUID=“61e3b368-05”
/dev/mmcblk0p1: LABEL_FATBOOT=“OSMCInstall” LABEL=“OSMCInstall” UUID=“01AB-C526” BLOCK_SIZE=“512” TYPE=“vfat” PARTUUID=“d2bd89ab-01”
/dev/mmcblk0p2: UUID=“256ce1f6-cb2c-457f-83cf-da682a38a452” BLOCK_SIZE=“4096” TYPE=“ext4” PARTUUID=“d2bd89ab-02”
This gives the UUID of my media drive “Home”.
Mount USB media drive on boot:
Add to /etc/fstab (fields are tab separated. That is important!)
UUID=“3AF4A693F4A650C5” /mnt/media ntfs defaults,relatime 0 0
Note the fstype from blkid.
Configure Samba (I forget if I had to install it or just configure). If it needs installing just do so via the app store.
Edit /etc/samba/smb-shares.conf and add something like:
browsable = yes
read only = no
valid users = osmc
path = /mnt/media
comment = Films and TV
That is pretty much it. I am having a minor problem in that my hard drive seems to sleep after a while. Keep it awake so the media is always available. I don’t yet know why this is happening so I have created a simple cron script to run every 20 minutes to check the media drive is still mounted. I will investigate the cause of the drive sleeping in due course - if I can be bothered. It might be a thermal issue, I suppose, but I suspect it is just sleeping and needs to be woken up.
20 * * * * /home/osmc/bin/keepmounted.sh
The crontab script checks if my drive is mounted and then runs mount -a. I might adjust the timing.
/bin/mount | /bin/grep sda5 > /dev/null
if [ $? != 0 ]; then
/bin/mount -a > /dev/null
/bin/echo $? > /home/osmc/keepmounted.status
All in all, this is a very, very good system. I’m going to run with this for a while as I had a Pi lying around doing nothing and have lots of films to watch via a now integrated system.
My next step will be an upgrade to a Vero V with SSD media storage when my budget allows.
One last thing. I need to backup my precious films elsewhere. I’m looing at Backblaze B2 Cloud storage ($6USD per TB per month) and perhaps Duplicity to manage it for me. Early stages; I’m not in a rush.
Thank you Sam and team for a great product!