<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rainbowlazer &#187; Dual Boot</title>
	<atom:link href="http://rainbowlazer.com/category/os/dual-boot/feed/" rel="self" type="application/rss+xml" />
	<link>http://rainbowlazer.com</link>
	<description>art, design &#38; new media technotes</description>
	<lastBuildDate>Fri, 02 Jul 2010 18:10:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WinRestart: Applescript Mini-App for Automatically Restarting Boot Camp in the Windows/Linux Partition</title>
		<link>http://rainbowlazer.com/scripting-programming/applescript-application-for-restarting-boot-camp-in-the-windows-partition/</link>
		<comments>http://rainbowlazer.com/scripting-programming/applescript-application-for-restarting-boot-camp-in-the-windows-partition/#comments</comments>
		<pubDate>Thu, 20 Mar 2008 15:37:14 +0000</pubDate>
		<dc:creator>Chris Reilly</dc:creator>
				<category><![CDATA[Boot Camp]]></category>
		<category><![CDATA[Dual Boot]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Scripting & Programming]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://rainbowlazer.com/?p=26</guid>
		<description><![CDATA[If you&#8217;re like me, you use Boot Camp to run both Windows/Linux and OS X on your Intel Mac. It&#8217;s truly a great setup, especially if you use a one-extra-partition setup (I use MacDrive on the Windows side) to share the same documents between all OS&#8217;s, and Thunderbird and Firefox sharing the same profiles to [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, you use <a href="http://www.apple.com/macosx/features/bootcamp.html" target="_blank">Boot Camp</a> to run both Windows/Linux and OS X on your Intel Mac. It&#8217;s truly a great setup, especially if you use a one-extra-partition setup (I use <a href="http://www.mediafour.com/products/macdrive/" target="_blank">MacDrive</a> on the Windows side) to share the same documents between all OS&#8217;s, and <a href="http://www.mozilla.com/en-US/thunderbird/" target="_blank">Thunderbird</a> and <a href="http://www.mozilla.com/en-US/firefox/" target="_blank">Firefox</a> <a href="http://kb.mozillazine.org/Profile_Manager" target="_blank">sharing the same profiles</a> to get to all your email, bookmarks and preferences from any OS.</p>
<p>The only downside to this setup is having to reboot every time I  switch OS&#8217;s. Boot Camp only allows one partition to be the default startup disk. I keep my default set to OSX, since that&#8217;s what I use most. But if I want to reboot in Windows or Linux, I have to sit and wait while I hold down &#8216;alt&#8217; and the Boot Camp bootloader comes up. I would rather spend this time staring out the window, or getting up for coffee.</p>
<p><strong>That&#8217;s why <a href="http://www.rainbowlazer.com/wp-content/uploads/2008/03/WinRestart.app.zip">WinRestart</a> is awesome.</strong></p>
<p>WinRestart is a [painfully] simple two lines of Applescript (thanks to <a href="http://www.taylorhokanson.com/1/hokanson/" target="_blank">Taylor</a> for the code) that passes a shell script to the Terminal, using the <a href="http://developer.apple.com/documentation/Darwin/Reference/Manpages/man8/bless.8.html" target="_blank">bless</a> command. This sets your Windows/Linux partition to be the boot disk on the next restart only. WinRestart is saved as an application, which means you can keep it in your Dock. Just click to launch, and you&#8217;re on your way to automatic restart heaven!</p>
<p>After downloading and extracting WinRestart, open it up in the Script Editor (Applications -&gt; AppleScript -&gt; Script Editor.app) and change the name of the boot volume to your alternate partition. For example, if your Linux partition is named &#8216;linuxpartition,&#8217; you would change the default Untitled:</p>
<p align="center">do shell script &#8220;bless -mount /Volumes/<strong>Untitled</strong>/&#8230; privileges</p>
<p>to &#8216;linuxpartition&#8217; (no quotes, though):</p>
<p align="center">do shell script &#8220;bless -mount /Volumes/<strong>linuxpartition</strong>/&#8230; privileges</p>
<p align="center"><a title="Set the name of your Alternate Partition" href="http://rainbowlazer.com/wp-content/uploads/2008/03/picture-22.png" rel="shadowbox[post-26];player=img;"><img src="http://rainbowlazer.com/wp-content/uploads/2008/03/picture-22.thumbnail.png" alt="Set the name of your Alternate Partition" /></a></p>
<p align="left"><strong>UPDATE:</strong> Andy writes with this tip about using WinRestart with an NTFS partition:</p>
<blockquote><p><em>I just wanted to thank you for your WinRestart post on rainbowlazer.  It was pretty much exactly the information I wanted &#8212; however, using a NTFS partition for boot camp did cause some problems with using bless.</em></p>
<p><em>Bless seems to require statfs, when you use it with the &#8211;mount option, which apparently isn&#8217;t supported with MacFuse/NTFS-3G.  Instead [of bless -mount /Volumes/Untitled/ -legacy -setBoot -nextonly], the following bless command worked great for me:</em></p>
<p><em>bless &#8211;device /dev/disk0s3 &#8211;legacy &#8211;setBoot &#8211;nextonly</em></p></blockquote>
<p align="left"><strong>Thanks for the input, Andy!</strong></p>
<p align="left"><strong>UPDATE:</strong> Tim writes with this tip about adapting WinRestart to work with System Events to prompt saving of open documents before restart:</p>
<blockquote><p><em>Thanks for developing the WinRestart application.  I wanted to comment that I have used it a lot and have found it really helpful.  I made a version of the script that might suit most users a little better though, maybe you would like to post it as an alternative.</p>
<p>do shell script &#8220;bless -mount /Volumes/Your_Volume_Here/ -legacy -setBoot -nextonly&#8221; password &#8220;Your_User_Password_Here&#8221; with administrator privileges<br />
tell application &#8220;System Events&#8221;<br />
   restart<br />
end tell</p>
<p>It doesn&#8217;t ask for a password and lets you save unsaved documents/close programs.</p>
<p>For users of this, I also recommend turning off the startup screen in the WinStart File menu.</p>
<p>Many Thanks Again,</p>
<p>Tim</em></p></blockquote>
<p align="left"><strong>Thanks for the tip, Tim! <br />The addition of your password in plaintext is a little iffy in my opinion, but if you&#8217;re not worried about it then it&#8217;s a good time-saver.</strong></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-9738136468704557";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0066cc";
google_color_text = "000000";
google_color_url = "008000";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://rainbowlazer.com/scripting-programming/applescript-application-for-restarting-boot-camp-in-the-windows-partition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
