2 Pi installations and moving one media disk between them

I have tried to search for this but have not come up with any solutions.

I have two houses where I want to install a Pi in each and run osmc.

I want to move an external 4tb WD My Passport Ultra with my media on it back and forth between the two installations as they can not be connected over internet.

I only want to maintain one database for media, watched state etc.

As I see it I have two options:

  1. Partition the 4tb drive with two partions. Install OSMC on one partition and have my media on the other partition. Have the “guisettings.xml” redirected to the internal sd card storage in the Pi to be able to set up overscan, audio output etc individually.

  2. Install OSMC on the internal sd card (as usual) and have the osmc database redirected to the 4tb external drive with the media.

Any input on what would make most sense and how to actually do it would be appreciated!


Well similar solutions but I guess 1st one is more promising. But your issue with that solution is that you would have no way to have the kernel on /boot being updated on both machines. Maybe you should wait for a plain USB boot available in the future (for Pi 3).

If you just keep the database on the disk you also run into problems if you do upgrades on one machine (e.g. to Kodi Krypton) but not the other one.

Generally “linking” is done via ln -s target link_name

1 Like


Thanx for the input

I am not so worried about the upgrades as I will not be updating them once I get it all working.

Any advice on how to do the file redirection on either the database or gui?


As I wrote via ln -s target link_name

Here is a cheatsheet for how to navigate in a Linux shell: Cheatsheets and Tutorials for users new to Linux based operating systems

1 Like

Will anyone be using the other RPi (the one where you are not)?
If not - why not take the SD card with the disk?
Could even take the RPi but I guess that is seen as too fiddly.


I thought that file redirection was done in the advanced settings file, but I’ll have a read in the link


Well I think you are mixing up path substitution http://kodi.wiki/view/Path_substitution and file redirection on the OS level.

As I have no understanding of linux I was not aware of the other option…

But wouldn’t the path substitution work? I have dabbled with this and understand it to some extent.

Have been reading up on the ln command, and it is fairly difficult to understand (for a novice)

Not that I am aware off

Well to be honest you should understand what you do if you want to do something as complicated as you have in mind, but belows commands should do what you need. Alternatively you can install MYSQL server on OSMC which will then move with you anyhow assuming you use the path where you run OSMC of the harddisk.

For your option 1 where you just want to keep separate guisettings.xml on the SD card
> sudo systemctl stop mediacenter
> cp .kodi/userdata/guisettings.xml /boot/
> mv .kodi/userdata/guisettings.xml .kodi/userdata/guisettings.xml.backup
> ln -s /boot/guisettings.xml .kodi/userdata/guisettings.xml
> sudo systemctl start mediacenter

Last but not least:

There should be no need to configure overscan, just configure both displays as justscan or 1:1 or however that mode is called on your TVs.

thanx so much for your input!

have always had to setup overscan for 1080p and the different refresh rates, i.e. configuring the screen corner setup in osmc, to match my different tv’s

If you know what you are doing, you might also be able to install osmc to the harddrive and clone the startingsdcard.

But I wouldn’t recommend this if you are new to linux or if you want to update files by plugging the hdd into a windows pc.

Edit: actually scratch that… as kernelupdates might mess things up if not both sdcards get updated I’d guess.


have finally gotten around to try it out.

You write about installing mysql on osmc - would it be possible to install mysql or have its database on the external drive so the library would move with the external drive and thereby not having to do all the sudo commands to do file redirection of the guisettings

Just trying to find the simplest solution :slight_smile:

Sure it’s possible but would require a higher amount of sudo commands

ok - thanx for the input

have just tried to install osmc with usb configuration i.e. the hard drive but during installation it came back with:

install failed can not mount root.

the install.log file says:

Thu Jan 1 00:00:07 1970 Starting OSMC installer
Thu Jan 1 00:00:14 1970 Detecting device we are running on
Thu Jan 1 00:00:14 1970 Mounting boot filesystem
Thu Jan 1 00:00:14 1970 Trying to mount to MNT_BOOT (/mnt/boot)
Thu Jan 1 00:00:14 1970 Using device->boot: /dev/mmcblk0p1 and FS: fat32
Thu Jan 1 00:00:14 1970 Preseed file found, will attempt to parse
Thu Jan 1 00:00:14 1970 Found a definition for storage: usb
Thu Jan 1 00:01:20 1970 Creating root partition
Thu Jan 1 00:01:20 1970 From a root partition of /dev/sda1, I have deduced a base device of /dev/sda
Thu Jan 1 00:01:20 1970 Must mklabel as root fs is on another device
Thu Jan 1 00:01:20 1970 Going to mklabel with device: /dev/sda with a label type of MSDOS
Thu Jan 1 00:01:21 1970 Calling mkpart for device: /dev/sda and fs: ext4 with start 4096s and end 100%
Thu Jan 1 00:01:22 1970 Calling fmtpart for partition /dev/sda1 and fstype ext4
Thu Jan 1 00:01:22 1970
Thu Jan 1 00:01:22 1970 Mounting root
Thu Jan 1 00:01:22 1970 Trying to mount to MNT_ROOT (/mnt/root)
Thu Jan 1 00:01:22 1970 Using device->root: /dev/sda1
Thu Jan 1 00:01:22 1970 Error occured trying to mount root of /dev/sda1
Thu Jan 1 00:01:22 1970 Halting Install. Error message was: can’t mount root

a 2 tb partition is created along side with the remaining space in another partition

drive is wd WDBBKD0040BBK-EESN

Is the drive powered by its own power supply or at least connected to a powered USB hub?

Also for your information all data on the USB disk will be deleted regardless of the partition

not so worried about the partitions - nothing is on the disk at the moment

the disk is connected directly to the pi3 via usb3 cable

The OSMC installer must install to sdcard. After that is complete, insert that sdcard into the pi and connect your USB HDD. Boot the pi and install to desired media will complete.

If it is a hard disk you need to separately power it

oh, didnt know that

it comes on and seems to spin up ok…

any suggestions on compact powered usb hubs?

or what about y-cables where the device draws power from two usb ports?

just did an install only to sd card and hooked up the hard drive afterwards with media on it, and everything works like a charm, so there must be something going wrong during installation…

with regards to partitions created during install: can these be changed afterwards so that there is either one giant 4tb partition or a small with osmc on it and then the rest on another partition?