Set external HDD as `/home`

I have tried to set the UUID in /etc/fstab for my external HDD to be the home folder, after copying the contents of the home folder on the SD card where OSMC resides. This created a boot loop with a “square sad face”, obviously not good.

Next I tried to mount the HDD in /home/osmc and replace the media folders (not the hidden system folders) with existing media folders on my external HDD. This time OSMC booted but got caught in a loop trying to create folder links on the main screen.

I have successfully mounted the HDD elsewhere in the /media/ but I wanted to have it consolidated in one place to make things neater. This is especially useful once I set up Nzbget and Deluge.

My question is, is there a way to consolidate the external HDD with the /home folder on the SD card? Should I use symlinks to the external HDD mounted elsewhere or should I just except it the way it is and go back to mounting the HDD elsewhere and inserting filepaths? That just doesn’t seem very neat is all…mild OCD I suppose :slight_smile:

A symlink should be sufficient for the .kodi folder ? (I haven’t tried it though)

Plug your external hard drive in and let it mount to /media. Stop kodi with

sudo systemctl stop mediacenter

Then either delete your .kodi folder (if you’re just starting out) or copy it to the external hard drive. Finally create a symlink from /home/osmc/.kodi pointing to a folder on the hard drive, then start kodi again:

sudo systemctl start mediacenter

As far as I know kodi will happily follow symlinks so this is probably your best bet.

Thanks for this. I have found in the past I have to mount it in fstab in order to prevent multiple entries being mounted and to ensure it is always in the same place each boot. I am a bit wary of deleting the .kodi folder so I’ll try to copy and create a symlink. Will this mean that if I point OSMC to /home on the SD card it will then look in the folder on my external HDD?

the easiest way is to remember to give all your USB key/drives a label name, then it will always mount that drive in the same folder…

I’ve tried that, it sometime appends the name with an underscore on each boot

Shouldn’t happen in OSMC - we explicitly delete any left over mount points during boot.

It happened in Alpha 4, I’m on RC now, has that changed then? The reason I was mounting it in fstab was due to the fact that without doing this I would have /media/externalHD and /media/externalHD_ and OSMC couldn’t find my media files as the appended version with the underscore was incorrect.

Yes the change was made after Alpha 4.

Ok, thanks. Should I bother with symlinks then? If I do, will OSMC see the files in the external HDD? or should I just point OSMC to the External HDD?

When mounting the drive as home did you make sure the ownership and permissions are set right?

yes I did, I still find it’s best to mount in fstab as it still adds appends in /media/externalHD to /media/externalHD_