Can not set startup disk At System Preferences > Startup Disk I select a disk with Mac OS X (10.5 or 10.6) installed, but when I click Restart I get this error message: You can’t change the startup disk to the selected disk. The bless tool was unable to set the current boot disk.

I have 10.6 installed on an internal hard drive and 10.5 on an external drive.

I have completely erased both disks from Disk Utility; done Verify Disk, Repair Disk, Verify Disk Permissions, Repair Disk Permissions; reinstalled Mac OS several times on both drives...

Update:

Looks like something is wrong with internal hdd. I have tried to restart the machine in target disk mode, but I got You can't start up with target disk mode. The nvram tool was unable to set a preference
From the errors given, it sounds like it's more about setting the NVRAM than the startup disk itself.  Clear the NVRAM (previously referred to as PRAM; reboot holding command-option-P-R until you hear a second chime) and see if the problem works itself out.