Maintenance

  • Home
  • Log in
  • « Leopard tweaks
  • Study 1200 testing »

Dual boot iMacs update

Posted by gregster on 05 Feb 2008 in Labs, R & D, Activity log

Two annoyances regarding a polished deployment:
1) When users choose Mac OS the windows partition should not be visible/mounted.
2) When Windows users log off the machine needs to reboot in order that Bootpicker gets launched for the next user.

Problem was that for (1) Leopard has deprecated things like fstab, /etc/rc and the like, which I was inclined to use. Rather, Leopard uses launchd and a control panel for it called launchctl to do this. One can create plists that will handle lots of tasks, so this will be my first stop for running commands on login/startup etc. Rather than struggle with hand writing it, I built my plist with a GUI tool called Lingon (written by the same guy that wrote Smultron, an awesome text editor for Mac OS). It seems to work a treat. FYI, the plist lives in /Library/LaunchAgents/. I called it com.hcmc.UnmountWindowsPartition (catchy, eh?). It looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.hcmc.UnmountWindowsPartition</string>
<key>ProgramArguments</key>
<array>
<string>diskutil</string>
<string>unmount</string>
<string>/Volumes/Windows\ XP</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

Problem for (2) was that all of my logoff scripts (shutdowm -r etc.) either didn't work at all or would kill the desktop, but not restart the machine (wallpaper and cursor remain active, but no icons or functionality). I downloaded psshutdown from sysinternals and set a group policy in the "User Configuration -> Windows Settings -> Scripts (Logon/Logoff)" section of gpedit.msc. I point to the script, which I have currently placed in the C:\Windows\ directory (and there it shall remain until someone explains why it shouldn't live there), and give it the following parameters:
-r -t 1 -v 0
This will run the following command at logoff
C:\Windows\psshutdown.exe -r -t 1 -v 0
Parameter explanation: -r = restart, -t 1 = do it in 1 second (0 seemed to hang the machine), and -v 0 = no messages (without this there is a message informing the user that the machine is shutting down). More on the app is available at the above link.
So far, so good.

This entry was posted by Greg and filed under Labs, R & D, Activity log.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2026 by admin • Help • Social CMS software