|
|
Startup Disk
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Anyone built a startup disk clone? I need something for OS X like the startup disk control panel was, just without the security lock so anyone can change the startup disk.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Status:
Offline
|
|
Getting rid of the security lock, eh? Methinks it was put there for a reason.
Seriously, though, I think that setting the boot disk is something that simply HAS to be done as an admin. That's just the nature of OS X's (and other *nix's) permissions architecture. After all, you certainly can't really want EVERYONE to be able to change such core settings as that? If that's the case, just make everyone on your machine an admin... hmmmm...
|
The server made a boo boo. (403)
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Yeah, only root has write privs to nvram.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
I was thinking of maybe a script that would change the startup disk. I need some regular users to be able to do this.
Would it be possible for a user to launch a script that changed the startup disk settings?
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status:
Offline
|
|
You need privileges in order to change the startup disk. Anyway, what you want is probably:
OSErr HGetVol (
StringPtr volName,
SInt16 *vRefNum,
SInt32 *dirID
);
To find out what the startup disk is and:
OSErr HSetVol (
ConstStr63Param volName,
SInt16 vRefNum,
SInt32 dirID
);
To set the startup disk. I'm not 100% sure of these functions because I have never used them but they are part of the Carbon file manager. Note: It's okay to mix most Carbon functions with Cocoa. I think that the only things that don't play well together are anything that draws to the screen. ie don't use any Carbon draw commands in a Cocoa app.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Dalgo
I haven't really messed with programming much, especially with OSX. Could you possibly explain a little more?
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Uhm... You could probably create a shell script that manipulates the nvram via the nvram command, that is setuid so it runs as root... Would that do the trick?
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Still lost. Anyone have some directions?
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: May 2001
Status:
Offline
|
|
Well, if your OS X and OS 9 installations are on different partitions/disks, then you could just have people reboot and hold down the option key. That would give them little buttons for each startup disk. Then they could easily choose which one and be on their way.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by mccullocht:
<STRONG>Well, if your OS X and OS 9 installations are on different partitions/disks, then you could just have people reboot and hold down the option key. That would give them little buttons for each startup disk. Then they could easily choose which one and be on their way.</STRONG>
Not all of us are on top-of-the-range NewWorld machines, you know!
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Bingo!
So can anyone assist with this script? It would be really useful.
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
OK, I don't have a clue how to use the provided code. Can anyone provide some instructions?
|
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Sep 2000
Status:
Offline
|
|
Last try, anyone care to explain?
(boy this server is really under a lot of load. I hope the new server is up and running quick.)
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Status:
Offline
|
|
Originally posted by macvillage.net:
<STRONG>Last try, anyone care to explain?
(boy this server is really under a lot of load. I hope the new server is up and running quick.)</STRONG>
Umm, what else is there to explain?
If you follow mccullocht's advice (is that why you said "Bingo!"? ), you don't have to write any sort of program. Just DO what he said. There's no code to write. That little "trick" is in Apple's OpenFirmware code, assuming you have a fairly new computer. Just try it and see for yourself.
|
The server made a boo boo. (403)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|