Wednesday Jan 26, 2005

opensolaris.org is now up and running, with the DTrace source available to the world. There's lots more to come, and it is really exciting we're starting with DTrace. Bryan already has a nice introduction written, and Adam has also put up a some interesting tidbits.

I've seen a few questions raised about the delay in releasing the full, buildable version. Mike Kupfer gives an inkling of what's still to be done. But, I'm sure that those who want to grunge about in the most cobweb-covered it-came-from-New-Jersey parts of the system will get their chance too. For now, there's already plenty of interesting code to wander through.

Wednesday Jan 19, 2005

Ok, so maybe the title reference is a little stretched by now, but anything worth doing is worth overdoing. Now that you've got a map to the center of boot (-m milestone=none), you may want to be able to get around, visit the library, fight some of those antediluvian monsters, the usual.

First, if you've a recent-enough version of Solaris 10, you'll have a copy of /lib/svc/share/README. It appeared around December, so you may need to wait for the final version of S10 to see it. In any case, it is pointed out to the unfortunates who get dropped to the administrative maintenance prompt during boot because something went wrong. Those who went to a restricted milestone like milestone=none by actions of their own fingers aren't told explicitly about the file.

Most helpfully, that file gives you instructions on how to get to the network, if your system drops to maintenance and you need to retrieve some binary to replace a bad one. This happens to those of us who develop things in the boot path quite a bit.

If you really just need to change some service configuration, if you've got a single filesystem for / and /usr, you can (usually) run

   mount -o remount,rw / 

Then, you'll be able to disable services, run svccfg(1M), etc. at will. If you have a separate /usr mountpoint, you'll need to run the methods described in the README.

Oh, and apologies for overloading the term "core". I promise I'll find a new metaphor rather than beating this dead one any more.

Thursday Jan 13, 2005

I went skiing yesterday and skied off my first cornice. What fun! I wish I had pictures, but left the camera in the car. It had to be the easiest run-out to a cornice in the world, and the snow was awfully friendly but... it still felt like the first drop off a roller-coaster, except you had to push yourself over the precipice (took me a few minutes to get up the nerve). Rewarded by a nice dropping feeling in the stomach and a big grin. Surely those who are more accomplished skiers than I will chuckle at my amaturish joy; I'll probably also look back on this entry with a bit of embarrassment someday, but whatever. It was great!

I was at Alpine Meadows in the Sierras for the first time. Nice little hill. I usually go to Squaw, and just got back from a holiday vacation at Whistler. Whistler/Blackcomb is the best unkept skiing secret in North America. 6.5 mile runs through incredible bowls to mid-mountain. Untracked turns to be made serviced by lifts even 4 days after a meagre snowfall. Never mind, I'm getting nostalgic. Already. This was my second time there and I'll be back again before the Olympic craziness gets into full swing.

Back to Alpine -- the cornice was into Wolverine Bowl, then a nice little run through Waterfall. Best snow was, no doubt, through High Yellow Gully. And, there's nowhere but the Sierras where you regularly get to have a lovely January day of skiing complete with lunch outside in the snow in your shirtsleeves. Beatuiful. (Paid for by sore muscles due to heavy snow, but often worth the price.)

(An aside -- I'm assured I looked like a complete dork dropping off that cornice. I figure the fact that I did it twice without faceplanting was victory enough. Despite technicolor hair, I'm no Seth Morrison.)

Tuesday Jan 11, 2005

With the tools that smf(5) brings, you can now watch boot from the inside. Well, at least the user-land part of boot.

I personally think it is pretty cool to watch the system come up bit by bit, but perhaps not everyone shares my overdeveloped sense of wonder at a service graph. Watching boot happen is also actually useful if you're finding you can't get a console login prompt. We make a concerted effort with smf to drop you to a root password prompt if something goes wrong, but there are some cases where the system appears hung and there's no login prompt to be seen. They're rare, but not completely impossible.

At the boot prompt (ok on sparc, Select (b)oot or (i)nterpreter: on x86), type b -m milestone=none. That'll get you to here:

     Select (b)oot or (i)nterpreter: b -m milestone=none
     SunOS Release 5.10 Version gate:2005-01-10 32-bit
     Copyright 1983-2005 Sun Microsystems, Inc.  All rights reserved.
     Use is subject to license terms.
     DEBUG enabled
     Booting to milestone "none".
     Requesting System Maintenance Mode
     (See /lib/svc/share/README for more information.)
     Console login service(s) cannot run

     Root password for system maintenance (control-d to bypass): 

Log in. If you run svcs now, you'll note that all services are disabled or uninitialized. The disabled services are temporarily disabled by svc.startd because that's how we implement running in a limited milestone: we temporarily disable all services that aren't part of that milestone's subgraph. The uninitialized services are managed by a different restarter than svc.startd. Their restarters haven't shown up yet to manage their state, so they remain uninitialized.

Now, to start up the rest of the system. Run svcadm milestone all, then use svcs to watch your system start up. I won't post examples here, as this is really easy to try yourself. If you're looking to debug a specific problem, wait until the svcs output stabilizes, then run svcs -x to see what services are causing trouble. Look at the services' logfiles for more details on what's going wrong.

Finally, when you're done poking around, just exit the login shell to resume normal console login.

This blog copyright 2009 by lianep