Just adding that this indeed functions for all intents-and-purposes the same way on SQL Server on Linux. The System Resource Database files are in a different location; on my RHEL Server box, they are:
/var/opt/mssql/data/mssqlsystemresource.mdf
/var/opt/mssql/data/mssqlsystemresource.ldf
On my machine, I have user databases stored in /data/mssql/data
and logs stored in /data/mssql/logs
, so I needed to execute the following set of commands before attaching the System Resource Database to the instance:
> su - root
password: <xxx>
> cp /var/opt/mssql/data/mssqlsystemresource.ldf /data/mssql/logs/SystemResourceDB.mdf
> cp /var/opt/mssql/data/mssqlsystemresource.mdf /data/mssql/data/SystemResourceDB.ldf
> chown mssql:mssql /data/mssql/logs/SystemResourceDB.mdf
> chown mssql:mssql /data/mssql/data/SystemResourceDB.mdf
Then, in SSMS, I used the following to attach the System Resource Database files:
CREATE DATABASE [SystemResourceDB]
ON
(FILENAME = N'/data/mssql/data/SystemResourceDB.mdf')
, (FILENAME = N'/data/mssql/logs/SystemResourceDB.ldf')
FOR ATTACH;