PDA

View Full Version : I'd like an introduction to my operating system


AHunter3
05-31-2002, 07:49 PM
I browse the books that purport to tell the existing base of Mac users all about their shiny new Unix-based OS. I flip past the "how to get around in Aqua" stuff and usually find a couple of chapters towards the back devoted to Unix, and I find page after page of stuff like

To find out what directory you're in, type "pwd" at the prompt. To copy a file, type "cp" followed by the current file path, space, then the file path of the copy. To go up one level type "cd" then two periods. To create a directory, type "mkdir" followed by the name you wish to give the new directory.


When I say I need to learn Unix, though, that isn't what I mean. While an ability to use the command prompt will probably come in handy, that isn't the part of Unix I feel stupid about.

Under MacOS 9, I have a decent idea of what happens when I hit the power button and power the machine on. I may not know the fine details of the Toolbox, but I know there's a ROM that loads very early on, then the search for a System Folder (defined as the combo of Finder file and System file) on floppy then (if "C" key is pushed) on CD then (or otherwise) on the volume specified in PRAM (that setting having been set in the Startup Volume CP), then on other volumes. I know that the data in the System file loads and then INIT code in files in the Extensions folder followed by the Control Panels folder is loaded, items in the Startup Items folder are executed, the Finder mounts the other local volumes on the Desktop, and that, more or less, is your boot sequence. Knowing that, I can trouble-shoot my way around a misbehaving Mac.

Under MacOS X, I haven't the foggiest idea what happens, in what order, what files the machine looks for in what order as specified by what file or files telling it to do so, how it is likely to behave if this or that setting is problematic in this or that way, and (most important) what one edits, disables, or moves in order to cure such problems so as to change a non-booting or significantly unhappy MacOS X computer into a booting and happy MacOS X computer. THAT'S WHAT I MEAN WHEN I SAY I WANT TO LEARN UNIX.

The best book along those lines that I've found so far is The Complete FreeBSD. Unfortunately, it is written with an anticipated audience of other Unix users plus some helpful hints for people familiar with Microsoft OSes, not an anticipated audience of Mac heads, so there are parts where I need some more rudimentary babytalk that isn't provided and therefore I don't get it all. Besides, it isn't about MacOS X anyway, it's about a variant of its ancestor, BSD Unix, so there's a lot that's missing (I do need to know about the loading of the Aqua graphical shell and the handling of resource forks and stuff like that) and a lot that might be different under Darwin/X than it would be under BSD.

Can anyone recommend me such a book? And would the book Mac OS X Unleashed perhaps be likely to please me in this regard?

mervTormel
05-31-2002, 10:59 PM
you might wanna be wide awake for this snooze fest; the boot sequence...

http://developer.apple.com/techpubs/macosx/Essentials/SystemOverview/BootingLogin/The_Boot_Sequence.html

as for 'likely behavior' if the boot misbehaves before the /etc/rc script, you'll be having hardware or driver problems, get to single user and start examining the boot screen. if it's after the rc script, examine the logs.

i had this problem just the other day. i dropped an old /etc/ttys in (shoot foot) and the boot panel never appeared. i found the errant message in the system.log:

May 31 12:41:47 gunther init: can't exec getty '/System/Library/CoreServices/loginwindow' for port /dev/console: No such file or directory

fixed /etc/ttys and i was good to go. know thy logs.

as for 'what one edits, moves (?), twiddles', well, you've gotta be a bit of a detective and 'sniff the trail'. depends on what facility is misbehaving. but, as pointed out above, modifications to startup are not to be made 'in a vacuum'. you'll want to know a lot and test your assumptions.

sounds like you might be interested in sysadmin kinds of things. sysadmins need to know how everything gets to working. there's several very good books for that. it's important to note that you'll need to be a good 'translator' for any 'documentation' of a system. that is, the commands may be different, but the goals, effects are close to the same.

O'reilly's Essential System Administration by Æleen Frish - covers several unices

Prentice Hall's Unix System Administration Handbook by Evi Nemeth, et. al. - ditto

Unix Unleashed, Unix Power Tools

all good books to have in your reference library.

i hear OSX unleashed and o'reilly's 'missing manual' are good, but i haven't seen them (might be a little too aqua fluffy for me).

osxpez
06-01-2002, 01:57 AM
AHunter3: While I agree with you that it feels comfortable to know what goes on under the hood of the OS I must ask. How did you get to learn about the inner workings and dependencies of the old Mac OS ? My guess is that you earned that knowledge over time. There was a time when the Ancient OS was young as well and back in those times I bet it took some time before wide spread books and texts introduced the OS in the way you ask for.

Anyway, I'll dig for some introductory information about BSD. I'll get back here if I find some. I bet I could learn some from it as well, since I come from a System V background.