Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Here's my script...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Here's my script...
Authored by: a1291762 on Jan 24, '08 04:09:36AM
Here's the script I've been using to boot Windows since shortly after I installed Boot Camp...

#!/bin/sh

if [ "$(id -u)" != 0 ]; then
    # need root privs
    exec sudo $0 "$@"
fi

# snip the bit where it cranks up the fans (because I use Windows for games and the machine gets hot without the fans cranked up)

# boot into Windows for the next boot only, completely bypassing rEFIt
bless --mount /Volumes/Windows --legacy --setBoot --nextonly

# clean reboot (equivalent to doing Apple -> Restart)
# doesn't kill apps like 'shutdown' does
osascript -e 'delay 1
tell application "System Events" to restart' &
It's just a .command file sitting on my desktop. I click it, enter my pasword, press enter twice (once for fans, once for reboot) then walk away while it reboots.

I have rEFIt installed but I prefer this because I hate waiting for the machine to get to the rEFIt prompt after hitting "Restart" and the Startup Disk pref is a permanent setting while I generally want to boot into Windows only once.

Granted I don't currently have NTFS-3G active but I do have it installed and I don't recall any problems with this method while it was activated. I'm also on 10.4 if that makes a difference.

[ Reply to This | # ]

Here's my script... (here's the fans part)
Authored by: a1291762 on Jan 24, '08 04:19:35AM
Ok... in case someone asks, here's how I crank my fans.

    killall FanControlDaemon
    sleep 1
    /usr/local/bin/smc -k F0Mn -w 5dc0
    /usr/local/bin/smc -k F1Mn -w 5dc0

FanControlDaemon is the process used by Fan Control. You need to stop it or it might change the fan speed before you restart.

smc lets you modify SMC values (it's literally the first version of the low-level tool that some awesome hacker released). The SMC tool (or code based on it's principles is what powers all of the fan control apps you can get now). There's 2 calls to smc because my MBP has 2 fans. They're set to 6000 RPM - the max for my machine.

This is something I setup before the fan control apps existed which is why it uses this low-level tool. I'm also on a MBP rev 1, newer machines may not like these values.

[ Reply to This | # ]