I would like to boot Solaris to shell (root prompt) directly for recovery purposes. On linux I would pass a kernel option init=/bin/bash and it would directly boot me into shell without asking for password. How can I achieve the same for Solaris?
I realized the '-s' parameter, but that still asks for password. The official docs suggest booting an installer CD which I would like to avoid.
UPDATE I realized that another proprietary access method was available for me so this question is not that urgent for me, still I leave it up as it maybe interesting later and for others as well.
This is solaris 11 express on x86 hardware.
Both single mode -s
and -m milestone=none
asks for password:
Enter user name for system maintenance (control-d to bypass): root
Enter root password (control-d to bypass):
Use the
milestone=none
boot flag:If you are on SPARC, from the openboot prompt:
If you are on x86, adjust the grub boot entry the same way. The precise command will depend on the Solaris release.
Edit:
Not sure why you want to avoid booting from a CD but that's the simplest way to recover a lost root password. The alternatives seems overkill:
moving the disk to another Solaris on x86 machine, import its root pool and fix the password
installing a PXE boot server, boot from the network, import the pool, fix the password
find a remote server user account having passwordless ssh access to root or a user having the root role or sudo access on the target server.