Link Below:
Changing the Path for the Master Database
This article will show how we can move the master database to a new location.
The ALTER DATABASE command would work for moving all the user databases and some system databases, including model, msdb and tempdb, but changing the path of the master database required a different strategy.