Showing posts with label superduper. Show all posts
Showing posts with label superduper. Show all posts

Monday, September 22, 2008

Shane's Top Mac Troubleshooting Tips

(This was posted originally in January 2006 when running OS X 10.4.3, Tiger; it has been updated to address changes since Snow Leopard in 2009).

I’m no expert on this stuff, but due to the years of diagnosing and fixing Mac issues (since 1993 to be exact with my old Classic II) I’ve developed a few troubleshooting routines that I automatically run through when stuff starts acting weird. Of course, most of the tricks of the old classic pre-X days are useless now (unless troubleshooting for Classic, of course), but here are some helpful ideas for X (currently 10.6.2).

= Command key (might have an Apple on the key as well)
= Option key
= Shift key

[Complete List of Macintosh Keyboard Shortcuts - http://support.apple.com/kb/HT1343]

First, get to know these helpful “snags” (startup key sequences):

* Start up in Open Firmware: --O-F (more below)
* Reset parameter RAM: --P-R (zaps the PRAM - see also Open Firmware reset)
* Bypass startup volume: -- -Delete (gets to a new volume if your current one is busted)
* Open the Startup Manager: (pick the volume you want to start up from)
* Force Mac OS X startup: X or -X (start in OS X)
* Start up from an optical disc: C (force start from your CD or DVD drive)
* Eject optical disc: mouse, trackpad button, or hold down the eject button (at startup)
* Start up from a network server: N (if you have a network startup volume)
* Reset PowerBook screen: R (no clue)
* Start up in Target Disk mode: T (firewire two computers together and boot from the other)
* Start up in Safe mode: (more below)
* Start up in Verbose mode: -V (great for seeing what the startup problem is)
* Start up in Single-User mode: -S (more below)

Most of these key sequences are still valid for Classic OS boots also (pre-X), and most of these don’t work if an Open Firmware password has been set using either Terminal or Apple’s OFPW application. Using an OF password is a good idea, especially for notebooks that could get stolen (protect your data from thieves at least).

Backup, Backup, Backup

Before doing anything, learn to regularly backup your system. I backup every hour to another drive (using Time Machine). It’s always best to keep two backups if possible, but one is better than none. There are other good backup solutions available too, such as Carbon Copy Cloner and SuperDuper. Do a backup immediately before making any major changes to your system too!

Programs are a-crashin’

If you have apps that are crashing, not responding, or you’re getting kernel panics, this is a sign that something is amiss. Here are the beginning steps to take:

• Repair permissions using Disk Utility if you can (this should always be your first step). Always try to repair permissions from the startup volume itself. If that doesn’t work, startup from your Install Disc and repair permissions from the Install’s Disk Utility (see below).

• Try logging out and back in.

• Try creating a new account and see if the problem persists. If it goes away then the problem is likely with your Home folder.

• Try restarting (rebooting).

• Check the volume for file system errors. There are a few ways to do this. I usually boot into Single-User mode first (see above snag list); to run a file system check, at the prompt type:

# /sbin/fsck -fy

If errors were found, continue running the above command until they’re gone; then type:

# reboot

If no errors were found, continue booting normally by typing:

# exit

Of course, you can also boot from your OS X install disc (hold C while booting), Repair Permissions, and run Repair Disk in Disk Utility. If Disk Utility or fsck won’t do the trick, consider an emergency boot disc or another bootable volume (separate hard drive or partition) with TechTool Pro or Disk Warrior to repair the volume.

• If none of these steps solved your problem try what’s listed below.

Safe Mode ( while starting up)

Here’s what it does for you:

* Performs a directory check of the hard drive identical to clicking Repair Disk in the First Aid pane of Disk Utility.
* Ignores kernel extensions cache (/System/Library/Extensions.kextcache).
* Loads only required kernel extensions (/System/Library/Extensions).
* Runs only Apple-installed startup items (/Library/StartupItems and /System/Library/StartupItems).
* Loads only those fonts in /System/Library/Fonts (Mac OS X 10.4 or higher).
* Trashes all font caches stored in /Library/Caches/com.apple.ATS/user ID number (Mac OS X 10.4 or higher).
* Disables Login Items (Mac OS X 10.4 or higher).

Safe Mode is a limited mode which also allows one to install and uninstall software and kernel extensions, and Disk Utility will easily repair permissions while in Safe Mode. Also, a good troubleshooting step while in Safe Mode is to use the Finder to delete the following:

/Library/Caches/* (delete entire directory contents)
/System/Library/Caches/* (delete entire directory contents)
/System/Extensions.kextcache (delete only this file)

NOTE: This can also be done in Single-User mode (see below).

More Single-User Tricks (-S while starting up)

Much can be done in Single-User mode (not just running fsck). It’s basically the BSD command line, so you can mount volumes and do a variety of maintenance tasks if you’re Terminal savvy (er…you’re a UNIX geek). To learn more about these commands and what they do, Google it and find out!

Mount the volume:

# mount -uw /

Run the cron routine maintenance scripts:

# sudo periodic daily
# sudo periodic weekly
# sudo periodic monthly

Update the prebindiing:

# sudo update_prebinding -root / -force

Repair permissions:

# sudo diskutil repairPermissions /

Eliminate some startup, cache, and kernel extension problems:

# /sbin/mount -uw /
# cd /Library/Preferences
# rm com.apple.loginwindow.plist
# rm com.apple.windowserver.plist
# cd /Library/Caches
# rm -r *
# cd /System/Library
# rm Extensions.kextcache
# cd /System/Library/Caches
# rm -r *
# reboot

You could also install Applejack, which is a wonderful utility to automate many Single-User maintenance and troubleshooting tasks for you.

Open Firmware (--O-F while starting up)

One could do quite a bit of damage when booting into Open Firmware (basically the Mac version of BIOS), so stick strictly to these commands unless you really know what you’re doing.

You can check the current OF environment by typing:

> printenv

To reset the OF and reboot, at the prompt type:

> reset-nvram
> set-defaults
> reset-all

Sometimes, you’ll need to eject a disc when the usual methods (holding down the mouse, E, or Eject buttons) don’t work. In OF, do this:

> eject cd
> mac-boot

Another neat fact. OF is based on the old programming language called Forth, which was originally written by an astronomer named Charles Moore to control telescopes. Forth is unique in the way it handles math; one must think in RPN (Reverse Polish Notation). So to add 2 and 5 to get 7, at the prompt type:

> 25+
> 7

Hopefully by now, your problem is solved. If not, you’re going to have to jump in some place like Apple Support (especially Discussions) or MacFixit forums.

Other Resources

Lots are available online, but here are some great links:

http://delicious.com/sonicdeviant/macintosh+Troubleshooting%20

Friday, June 23, 2006

No Unlock-a D' Folder

I just had a unique issue pop-up regarding locked folders. A folder inside my applications folder was suddenly locked for some inexplicable reason. I only discovered this when SuperDuper was trying to back it up to a sparseimage and failed with an error at that folder. So I did what most people do when they have any of a plethora of OS X problems that aren’t covered by the usual troubleshooting tricks--go to Google. This led me to Apple’s Support site, where I found this article and attempted these steps below: If the item you are trying to unlock is a folder,use these steps:         1.        Open Terminal (/Applications/Utilities).         2.        Type this, followed by a space: sudo chflags nouchg         3.        Drag the folder you would like to unlock into the Terminal window.         4.        Press Return.         5.        Enter your password and press Return. If you have attempted to unlock a file in the Finder but it is still locked, follow these steps to remove the system immutable bit from affected files, which can cause this issue. Mac OS X 10.4 or later 1. Start in single-user mode 2. Type this, followed by Return: mount -uw / 3. Type this, followed by Return: 
/usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d 4. Type this, followed by Return: autodiskmount 5. Type this, followed by Return: 
find / -flags schg -exec chflags noschg {} \; 6. Once this is finished, type this followed by Return: reboot Of course, the first set of instructions designed for a folder didn’t do the trick. But I booted single-user and typed in the long commands for fixing files, and this did do the trick!

Thursday, March 02, 2006

Stuck at the gray apple screen in Tiger

This is a problem I was having (see previous post) after upgrading to 10.4.3. Well, I’m finally up and running 10.4.5 and seem to have eliminated the issue (so far). I’d like to describe my solution for others having the problem (see my original post for background info).

I believe the problem has to do with using the Migration Assistant--specifically, the option to move over Files and Folders at the root level, so I recommend leaving this option unchecked during your migration. As a matter of fact, leave anything you can absolutely do without unselected to minimize the chance of corrupting your new system during migration.

My solution:

The first thing I did was install and upgrade completely (from 10.4.2. to 10.4.5. using the Combo installer and the Software Update panel to get it all up to speed). Then, after repairing permissions, I manually installed every kernel extension I could think of (i.e., xxx.kext) that I thought I would use; this way, no extensions would be installed via the migration from Panther to Tiger. After getting to this point (with a system that would restart fine every time), I made a backup using SuperDuper just in case I had to go back to square one.

Finally, I proceeded to use Migration Assistant, but I did not migrate root-level files and folders, and I also didn’t migrate my network settings. Everything else migrated fine, and I’ve noticed no major differences so far (except that Tiger is much snappier on my system than Panther was). So far, the dreaded, sneaky gray-Apple-screen-of-death issue has been averted. I don’t know why or exactly how, but for those of you having this problem, you should attempt this fix in the Migration Assistant. Better yet, don’t use it all and start over from the beginning (manually copying over stuff you need).

Again, my issue is different from some others in that I was migrating on the same computer...on old, heavily-upgraded G4 AGP Mac. All seems great right now...