1752480 Members
5612 Online
108788 Solutions
New Discussion

Changing root directory

 
Paul McCleary
Honored Contributor

Changing root directory

Hi,

I've created a golden image of a trusted system, where I have changed the root directory from / to /root. Only when I rebuild the server it doesn't make this change and results in the system not functioning correctly. If you edit passwd and change the directory the system works fine.

I'm using post_configure_script to copy over hosts, nsswitch and resolv, I'm also thinking of scripting in changing the passwd. Does anyone know the syntax for this?

Many Thanks, Paul
1 REPLY 1
marc seguin
Regular Advisor

Re: Changing root directory

Accordingly to make_sys_image(1M) man page, the file /etc/passwd is by default preserved in the golden image on trusted systems.

You can check it doing the command :
gzcat | tar tf - | grep 'etc/passwd'
If the file /etc/passwd is included in you golden image, customized root directory should be active (as i do for myself, but on a non-trusted system).

Tor set the password during an installation, use
root_password =
in Ignite config files (see instl_adm(4)).