Sstem Disk Shortcut

dweller

Registered
Does anyone know if there is a to switch the Startup Disk from the command line? The GUI way takes so long... and I'm so impatient. I am running OS X and OS 9 on separate drives.
Thanks,
- Devon
 

mtc7501

Message Board God
Everyone says "Hold the option key on startup and you will startup in OS 9." For some odd reason, it doesn't work. On either of my macs. Now, maybe I'm smoking crack or somethign and can't fully understand the sentence "hold down the option key on startup" or it just doesn't work. Could someone shed some light on this subject? I'm suspecting that since I have OS X on a BW G3, and a 7500 it's because it's not supported on those machines. On my New Firewire Powerbook though, without OS X, I get a nice little startup disk selecter.
 

The DJ

Registered
Originally posted by mtc7501
I'm suspecting that since I have OS X on a BW G3, and a 7500 it's because it's not supported on those machines. On my New Firewire Powerbook though, without OS X, I get a nice little startup disk selecter.
You are completly right. The disk selector is a little app which is located in your Firmware. Only Macs with the NEW Firmware structure (I believe most iMacs, and every G4, maybe even more machines) have this little app. And it is real handy.

DJ
 

DiskBreaker

Registered
Good question. :) I have not tried it out yet but I am pretty sure you could use the nvram command to edit your OpenFirmware boot parameter... then just reboot and it should boot into OS 9. Would be really usefull as using the shell is so much faster.

DiskBreaker
 

budncal

Registered
Did you do a Firmware upgrade before installing OS X? I did that before installing on my BW G3, and OS X boots into 9 on bootup with option down. What you do is hold it down until you hear the chime and the screen starts to show. This is your machine trying to boot into OS X. So, keep holding the option key down and your system will chime again and flash. This time it's booting into OS 9. After the second chime you can let go of the option key.
 

AdmiralAK

Simply Daemonic
I used to use LinuxPPC before I replaced it with OS X.
LinuxPPC came with a control panel that at the begginin of each start up it asked me
which OS I wanted to boot, MacOS or Linux. (The default was MacOS)
Is there something similar for choosing between OS X and OS 9 ?
 

budncal

Registered
The G4s and everything after have built-in support for dual booting at startup time. When you hold down the option key during startup, you get a window for choosing which operating system you want. On the G3s the only choice you have is the startup disk control panel and holding down the option key to at startup to switch from the OS X system back to OS 9. I guess some enterprising person could write something to do the same for older machines as the G4s do.
 

AdmiralAK

Simply Daemonic
Is this info in the ROM, or in the Open Firmware.
I guess that the firmware can be updates but the ROM can't as far as I know ...
Hopefully someone will come up witht teh answer lol ;)

Thanks for the info
 

texclayton

Registered
OK, after DiskBreaker pointed out nvram and I confirmed that the Startup Disk is saved in the non-volatile RAM (via some technote, I don't remember which), I started playing...

/usr/sbin/nvram -p will list all the nvram variables
nvram -h (or any other invalid option) will list all the valid nvram options

So-
I piped the output of nvram -p into a file, ie
nvram -p > osXStartup
Then, I opened up the Control Panel and set the Startup Disk to my Classic partition, then I did:
nvram -p > classicStartup

checking the files for differences:
diff osXStartup classicStartup
gives:
22c22
< boot-device /pci@f2000000/pci-bridge@d/mac-io@7/ata-4@1f000/@0:10,\\:tbxi
---
> boot-device /pci@f2000000/pci-bridge@D/mac-io@7/ata-4@1f000/@0:9,\\:tbxi

So, it should be possiible to set the startup disk from the command-line (nvram name=value). Note that I haven't tried this and I don't know if it will work or if it will screw up anything.
I hope to setup a script to change the startup disk to Classic. Anyone have any idea how I could write a script/program to change the startup disk to OSX from Classic? The office backup software only runs on Classic, so I have to reboot into Classic, then shutdown for the backup software to work (on shutdown it waits for the backup server to back up the data, then it actually powers down). I'd like to have a script in the Classic Startup Items folder to change the startup disk to OSX so then I could just run the script in OSX to change the startup disk to classic and restart. The Classic script would then change the startup disk and wait for backup then shutdown... As it is, I have to do it all manually before leaving work every day.

(Yes, I've been avoiding using Classic for anything when at all possible...)

-Tex
 

DiskBreaker

Registered
Just wanted to point out that it works. I've made a small shell script which uses the nvram command to change it to the proper setting. You could extend it so that it also asks you which system to boot, and then reboots. BTW you need root privileges to change your NVRAM (makes sense :) so maybe you want to sudo your script... (man sudo and edit /etc/sudoers).

DiskBreaker
 

piecewise

Registered
I have no access to OS 9 at all.. System Preferences->Startup Disk crashes... option key on boot won't work either.. booting from CD won't either..
My only option is nvram. Here's what dumped out of nvram...

little-endian? false
real-mode? false
auto-boot? true
diag-switch? false
fcode-debug? false
oem-banner? false
oem-logo? false
use-nvramrc? false
use-generic? false
default-mac-address? false
real-base -1
real-size -1
load-base 0x800000
virt-base -1
virt-size -1
pci-probe-mask -1
screen-#columns 100
screen-#rows 40
selftest-#megs 0
boot-device hd:,\\:tbxi
boot-file
boot-screen
console-screen
diag-device enet
diag-file ,diags
input-device keyboard
output-device screen
input-device-1 scca
output-device-1 scca
mouse-device mouse
oem-banner
oem-logo
nvramrc
boot-command mac-boot
default-client-ip
default-server-ip
default-gateway-ip
default-subnet-mask
default-router-ip
boot-script
aapl,pci


What name=value do I need to set to make it boot in 9? Note.. X and 9 are on the same partitiion..
 

zpincus

Registered
System disk crashes if there is any sort of disk damage (something about node zero corruption in the catalog, or volume bitmap, or something -- I don't know filesystems well). Anyhow, maybe the OS X disk utility can fix it. Otherwise hose the pram a couple of times (option-command-p-r at startup) and hold option starting from BEFORE the startup chime -- there's a very small window in which you can hold option and have the machine boot into 9. Then run techtool or norton or something. (maybe you can run them in the classic blue box... but that doesn't sound like a great idea to me).
Hopefully something fixes some problem. Now system disk won't crash, and you can reboot into X and get a nvram dump for "boot into 9" and for "boot into x," and you can diff them. Maybe some linux gurus know more about the boot vars, but I sure don't know a priori what to change boot-device and boot-command (these are the pertinant nvram settings) to. The correct settings are totally different on new world rom machines than old world, and there are a lot of other things that one would have to know about your system to tell for sure what to change them to.

zach
 

VGZ

Registered
Just to clear this up once and for all. Holding option at startup only works if you have multiple partitions/hard drives. It will not allow you to switch between OS 9 and OS X if they are on the same disk. Also if you are in OS X then it will recognize both systems; however, if you are in 9 it will not recognize the OS X system.

I hope this clears up the option at startup trick or should I post this as a new thread?

As I said before you might have a corrupted OS 9 system folder. Will classic launch? If it will then try repairing the disk with OS X's disk utility program. If classic won't start then you'll need to reinstall OS 9. As to how to do that I'm not sure :(, but hopefully you can just run disk utility and get the system disk app working. Good luck.

Hope this helps :),
 

piecewise

Registered
Unfortunately because I share my iBook disk between 9 and X... I can't make direct repairs to the disk with disk utility because OS X is running ont hat disk..

Basically, I will never be able to boot into Mac OS 9 again, which renders this iBook completely useless.

StartupDisk doesn't work.. running OpenFirmware and attempting to reset nvram won't work.. disk utility won't repair.. Classis WILL start but that doesn't help me all that much -- SystemDisk can't be run in Classic/OSX... Let's see what else? Booting from a 9 CD won't work, either.

I'm helpless. Does anyone own an iBook (I have a Graphite SE) and you also have 9 and X on the same partition?

Make your startup disk OSX..
run in terminal
/usr/sbin/nvram -p > OSX
then make your startup 9..
/usr/sbin/nvram -p > 9
Then..
diff ~/9 ~/OSX

That'll produce a file with the settings I need to fix this problem, basically...
 
Top