Wandering Thoughts archives


Some notes on booting single user in x86 Solaris 10

Here's some somewhat sketchy notes, mostly for my own future reference, on various bits of booting Solaris 10 x86 into single-user mode.

On x86 Solaris, kernel boot parameters go on the end of the 'kernel /platform/i86pc/multiboot' line in the GRUB boot entry. You put them in by interrupting the GRUB menu to edit the default boot entry (and then that line). The two most useful parameters are -s for single-user boots and -v to dump kernel messages to the screen as the system boots instead of just to syslog.

However, this single user isn't really completely single-user, because there are still a bunch of svcs things that get started and run. It is possible for some of these to crash, leaving you with a machine that will not come up even when booted with -s.

(You cannot fix this by booting the rescue environment, because you can't use it to turn services off in your regular system; the svcs framework has to be running before you can do things like svcadm disable errant startup bits.)

In this situation, boot with '-m milestone=none'; this starts the svcs framework but runs almost nothing. In particular, the root filesystem is not mounted read-write; you can either run /lib/svc/method/fs-root or do it by hand with

fsck /
mount -o remount,rw /

(you will also need to mount /usr and so on if applicable.)

At this point you can use svcs and svcadm to modify what will be run, for example to force off svc:/system/metainit. An important safety tip: under at least some situations, trying to svcadm disable an already disabled service will cause svcadm to just give you its general usage message instead of explaining what's actually wrong.

(It is possible to spend some time retyping command lines very carefully, trying to figure out just what stray bit snuck in, before the penny drops. Fortunately I was experimenting, not in the middle of a crisis.)

Useful information is in /lib/svc/share/README aka here, and the various scripts that are run to start things are in /lib/svc/method/.

(Probably all the hip svcs people already know that, but I didn't.)

solaris/SingleUserSolaris written at 23:13:00; Add Comment

Page tools: See As Normal.
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.