Is there any way of seeing a list of commands that were run at startup/boot on Solaris?
I know there is a network drive being mounted at startup but I wanted to see the exact 'mount ...' command being used.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityTo see all the filesystem related services that start by default in Solaris 10 and newer, run:
svcs \*filesystem\*
This will return output like:
STATE STIME FMRI
online Jun_11 svc:/system/filesystem/root:default
online Jun_11 svc:/system/filesystem/usr:default
online Jun_11 svc:/system/filesystem/minimal:default
online Jun_11 svc:/system/filesystem/local:default
online Jun_11 svc:/system/filesystem/autofs:default
To see how the any particular filesystem service is mounting it's filesystems, you need to look at the start/exec service property for that service.
For example, let's look at the /usr filesystem.
svcprop -p start/exec svc:/system/filesystem/usr:default
Shows us the method script that's used for this service.
/lib/svc/method/fs-usr
Reading that script will show you that a 'mountfs' command is being used to mount the /usr filesystem. Looking at the top of the method script, you can see that /lib/svc/share/fs_include.sh is being included. Inspecting that file reveals a shell function called mountfs, that standardizes options being passed to /sbin/mount.
By understanding SMF, and the interactions between services and dependencies, you can get a deeper understanding of what your system is actually doing, and how tasks are accomplished.
Answering to the title question:
Yes, you can do that easily if you are running Solaris 10 or newer. Just use an anonymous dtrace script that will log every exec call starting from boot.
See that blog for an example: http://alexeremin.blogspot.com/2009/01/boot-chart-with-help-of-dtrace-and.html
You will need to modify that script for it to display the parameters passed to exec.
Maybe you should have a look at Chapter 28 - Mounting and Unmounting File Systems (Tasks) from the System Administration Guide, Volume 1.