<?xml version="1.0" encoding="utf-8"?>
<!-- generator="Joomla! - Open Source Content Management" -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>HappyMac™ - Technical Advice</title>
		<description><![CDATA[HappyMac™ 
We Know Macintosh
HappyMac provides Macintosh systems support, networking and business IT services serving Knoxville, TN and area since 1994]]></description>
		<link>https://www.happymac.info/cms/knowledge-base/tech-advice.html</link>
		<lastBuildDate>Mon, 23 Nov 2026 00:38:38 +0000</lastBuildDate>
		<generator>Joomla! - Open Source Content Management</generator>
		<atom:link rel="self" type="application/rss+xml" href="https://www.happymac.info/cms/knowledge-base/tech-advice.feed?type=rss"/>
		<language>en-gb</language>
		<managingEditor>mmadmin@metamedia.us (HappyMac)</managingEditor>
		<item>
			<title>macOS Mojave:  VMware Fusion Pro 11 Performance</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/130-macos-mojave-performance-in-vmware-fusion-pro-11.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/130-macos-mojave-performance-in-vmware-fusion-pro-11.html</guid>
			<description><![CDATA[<p>When running a macOS virtual machine on a macOS Mojave host running VMware Fusion Pro 11 you will more than likely run into issues with the virtual machine running very, very slowly.  When attempting various adjustments to the VMware settings, it is best to always make sure, first and foremost, that VMware Tools are upgraded to the latest version.  In addition to making sure that VMware Tools are running the latest version, it is also suggested that the Metal renderer be disabled and to use OpenGL instead in the virtual machine.</p>
<p>In order to disable the Metal renderer and enable the OpenGL renderer you have to modify the .vmx file for the virtual machine:</p>
<ul>
<li>Shut down the virtual machine</li>
<li>Open the .vmx file for the virtual machine</li>
<li>Add the following lines to the .vmx file:<br /><em>mks.enableMTLRenderer = "FALSE"</em><br /><em>mks.enableGLRenderer = "TRUE"</em></li>
</ul>
<p>For some reason, this performance issue seems to only occur when the VMware host is running macOS Mojave.  Earlier macOS versions do not seem to have this issue (even if the guest VM has Metal renderer enabled).</p>]]></description>
			<author>abudzynski@happymac.info (Alexander Budzynski)</author>
			<category>Technical Advice</category>
			<pubDate>Tue, 30 Jul 2019 14:55:59 +0000</pubDate>
		</item>
		<item>
			<title>Securing Joomla with mm_jlock</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/127-securing-joomla-with-mm-jlock.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/127-securing-joomla-with-mm-jlock.html</guid>
			<description><![CDATA[<h3><img src="https://www.happymac.info/cms/images/joomla_logo_black.jpg" alt="" /></h3>
<h3>Joomla is popular, so it's a target</h3>
<p>Joomla is great open source software. It has a huge, active community. It is well designed, well built and well supported. It is no wonder it is estimated that 3% of all web sites are based on Joomla (<a href="http://w3techs.com/technologies/details/cm-joomla/all/all" target="_blank" rel="noopener noreferrer">W3Techs</a>). So it probably shouldn't come as any surprise that the bottom-feeders of the Web world are increasingly targeting Joomla sites for their attacks. If you have ever had a Joomla site infected with malware (which is probably why you are here) you know what a pain it is to clean up. Hopefully you have a clean backup or an easy way to migrate your content to a fresh install. There are some good resources out there that discuss cleanup options. If you are not at least using <a href="https://www.akeebabackup.com" target="_blank" rel="noopener noreferrer">Akeeba Backup</a> or something like it, you should look into that now.</p>
<p>When hackers try to use their various exploits to change your Joomla code files, they can't. You still need to take other precautions, like preventing hackers from gaining access to the Joomla back-end. We use <a href="https://github.com/codeling/bfstop" target="_blank" rel="noopener noreferrer">Brute Force Stop</a> within Joomla to stop brute force attacks against login. We use fail2ban on our Linux servers. But none of these stop hackers from exploiting any security vulnerabilities that may be in Joomla itself. </p>
<h3>Easy-to-update makes Joomla vulnerable</h3>
<p>One of the great things about Joomla is its ability to update its own code. You can run updaters to keep the software current and you can install all kinds of extensions to add functionality. But this is also what makes Joomla vulnerable. In order to update its own code, the user account that the web server runs under must have write access to the code files themselves. So if hackers can get that user account to run some malicious code they can change the web site's own code - usually to insert more and more malicious code, give them greater access, cause the site to spread malware code and so on.</p>
<p>So what do you do about this? You can lock down the file permissions so that the web server can run the code but not update itself. But this is not very Joomla-like. Now you can't run updates and install extensions. Plus there are a few directories that need more open access for content development and site operation, like the images directory and the cache and temp directories.</p>
<p>A lot of Joomla security blogs suggest that there is just no way around it. The web server user just cannot have write access to the Joomla code files. You open up only the directories required for content development and normal site functionality and lock down the rest. Sadly, they are right.</p>
<p>Yes, you could lock the file system down to the web server user and make your installs via something like FTP with a different user account. It is not a bad idea, but some extensions are pretty complex. Installing them by hand is tedious and error-prone. The installers provided by extension publishers might have more going on in them besides file copying - custom code execution, database operations, etc. In fact, manual install instructions are getting harder and harder to find for extensions. I avoid manual extension install whenever I can. There are just too many variables.</p>
<p>So, what is the answer? You need to be able to run updaters and installers. The web server account is required for this and it must have write access to the Joomla files, but thanks to the jerk hackers we can't do that. There are a few Joomla extensions out there that provide controls within Joomla's admin for this type of thing, but if Joomla's admin can adjust file permissions then you are back to the fox having the keys to the henhouse. In "locked" mode, Joomla simply cannot have write access to its own files.</p>
<p>Well, if your site(s) are like most Joomla sites, you might update content every day but you only run updates or install extensions every now and then - maybe even rarely. So what if you just open up security for the short time it takes to make your code updates and then shut it back down again?</p>
<p>We found a very nice article on this idea from <a href="http://www.itoctopus.com/are-all-php-files-on-your-joomla-website-hacked" target="_blank" rel="noopener noreferrer">IT Octopus</a>. They take a slightly different approach based on changing account groups before/after installs. We didn't want to make the suggested group change they use, so our approach is to actually change file owners and permissions only when updating the Joomla or installing extensions. This could be done manually, of course, but there are a number of different operations, and not everyone is a hardcore Unix admin. So why not use a shell script? Let the computer do all the work.</p>
<h3>Let's make locking down Joomla simple</h3>
<p>Instead of making file permission changes manually, we prepared a shell script to make the changes. When you want to update Joomla or install extensions/modules, you use the script to unlock the site. Afterwards, you use the script to lock down the site.</p>
<p>You have to run this script from within its directory as the root user (or sudo). So you need command line access to the files in your Joomla installation and you need to be able to run scripts as root (or sudo). We realize this isn't perfectly user friendly, but instructions are provided. You run "unlock" when you are ready to run your updates and installs from the Joomla administrative back-end. When you are done, you run the "lock" and it locks down the site again to prevent malware attacks. It is a simple, one-line command and just takes a minute or two to run.</p>
<p>SSH into your server and once installed it works like this:</p>
<pre>cd /var/www/www.yoursite.com/mm_jlock<br />./mm_jlock.sh -a unlock</pre>
<p>Follow the instructions, then when you are done:</p>
<pre>./mm_jlock.sh -a lock </pre>
<p>Easy peasy.</p>
<h3>Installing mm_jlock</h3>
<p>Installation is simple.</p>
<ol>
<li>SSH into your web site
<pre>&gt; ssh -l root [web-server-ip-address]</pre>
</li>
<li>cd to your site root (the root of your web site)
<pre>&gt; cd /var/www/www.yoursite.com</pre>
</li>
<li>Make the directory where the script will live
<pre>&gt; mkdir mm_jlock</pre>
</li>
<li><a href="https://www.happymac.info/cms/images/stories/127-mm-jlock/mm_jlock_v1.0.zip">Download mm_jlock.sh</a> and place it in this directory<br />The current version is 1.0</li>
<li>cd to this directory<br />
<pre>&gt; cd /var/www/www.yoursite.com/mm_jlock</pre>
</li>
<li>Run the script, and follow the instructions. It will check permissions, give you installation warnings, and display help.
<pre>&gt; ./mm_jlock.sh</pre>
</li>
<li>If you need to change the environment variables, edit the script in your favorite text editor.</li>
</ol>
<h4> </h4>
<h4>Version History</h4>
<p>v1.0: 2019-04-26 <a href="https://www.happymac.info/cms/images/stories/127-mm-jlock/mm_jlock_v1.0.zip">Download</a></p>
<p>v0.9: 2014-09-01</p>
<h4>License</h4>
<p>mm_jlock is (C)opyright and released under the gpl-3.0 license for non-commercial distribution. See the enclosed license. </p>]]></description>
			<author>cgray@metamedia.us (Christopher Gray)</author>
			<category>Technical Advice</category>
			<pubDate>Tue, 23 Apr 2019 15:00:53 +0000</pubDate>
		</item>
		<item>
			<title>Switchvox Hardware Appliance Virtualized Using VMware Fusion</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/125-switchvox-virtualized-using-vmware-fusion.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/125-switchvox-virtualized-using-vmware-fusion.html</guid>
			<description><![CDATA[<p>Now that Switchvox was acquired by Sangoma, they have offered a VMware-ready version of their Asterisk PBX appliance. This allows us to move away from their proprietary hardware appliances and treat the PBX system as 'just another server on the server farm'. This is now much, much easier to setup and migrate from physical to virtual than Digium's old unsupported path to virtualization.</p>
<p>Digium has an <a href="https://support.digium.com/s/article/Can-I-use-Switchvox-in-a-Virtualized-Environment" target="_blank" rel="noopener noreferrer">article on how their virtual appliance works</a>, what hardware gateways are available. You can get a link to the download site by logging into to your support portal then going to <a href="http://vmware.dl.digium.com" target="_blank" rel="noopener noreferrer">http://vmware.dl.digium.com</a> (you might need to follow this link twice for it to accept your login), or contacting Digium tech support.</p>
<h3>Importing the VM into VMware Fusion</h3>
<p>The VMware image they supply is in Open Virtual Format (OVF), which requires a little work to get running in the (less-costly) VMware Fusion edition on a Mac system. While it would be nice to run our VMs in vSphere, most small business customers can't afford it, and Fusion is a very acceptable way to run an inexpensive server farm.</p>
<p>After you download the image from Digium, you will have a directory containing 3 files:</p>
<ul>
<li>SWVX-6.5.1.1-20G_VMware-disk1.vmdk</li>
<li>SWVX-6.5.1.1-20G_VMware.mf</li>
<li>SWVX-6.5.1.1-20G_VMware.ovf</li>
</ul>
<p>In VMware Fusion, from the File menu, select Import..., then select SWVX-6.5.1.1-20G_VMware.ovf to start the import.</p>
<p>You will probably see the error: "The import failed because {path to ovf file] did not pass OVF specification conformance or virtual hardware compliance checks."</p>
<p>If you retry, it will fail hard with the error: "Invalid target disk adapter type: pvscsi". Doh!</p>
<p>The site Root Users has an <a href="https://www.rootusers.com/fixing-vmware-virtual-machine-pvscsi-import-error/" target="_blank" rel="noopener noreferrer">article on how to </a>edit the ovf file to modify the offending resource.</p>
<p>To summarize:</p>
<p>In file: SWVX-6.5.1.1-20G_VMware.ovf<br />Replace: &lt;rasd:ResourceSubType&gt;<strong>VirtualSCSI</strong>&lt;/rasd:ResourceSubType&gt;<br />With: &lt;rasd:ResourceSubType&gt;<strong>lsilogic</strong>&lt;/rasd:ResourceSubType&gt;</p>
<p>Re-hash the manifest from the command-line in Terminal:  openssl sha1 /path/to/SWVX-6.5.1.1-20G_VMware-disk1.vmdk /path/to/SWVX-6.5.1.1-20G_VMware.ovf &gt; /path/to/SWVX-6.5.1.1-20G_VMware.mf</p>
<p>Now you should be able to import the VM to Fusion without error (following the above import process).</p>
<h3>Initial Setup</h3>
<p>Before you migrate your existing Switchvox, you need to get the VM upgraded to the same version as your existing appliance. Digium advises your update both to most recent.</p>
<p>Boot up the VM and it will go through the initial setup options.</p>
<p>Network options: I plan to use the same IP address as the current appliance for the VM, but that comes later. For now we want to use an IP address provided by the DHCP server.<br />Use arrow keys to select DHCP, then hit the spacebar to select, the Return to continue. </p>
<p>Answer the rest of the initial setup questions, then you'll see a window providing the URL to access the web admin interface.</p>
<p>Open that URL in a web browser.</p>
<ul>
<li>You will be prompted to login. The default username is <strong>admin</strong> and the default password is <strong>admin</strong>.</li>
<li>From the Server menu, select Registration. Enter your personal info and your current software registration code, and register.</li>
<li>From the Server menu, select Updates, and update your VM to the current Switchvox version.</li>
</ul>
<h3>Migrating An Existing Switchvox to the VM</h3>
<p>On your physical Switchvox:</p>
<ul>
<li>Confirm that your physical Switchvox is at the same version as the VM. If not, run updates.</li>
<li>Login to the admin web interface, then from the Server menu, select Backups. Choose what to include (everything except error logs?), then Save Backup.</li>
<li>The backup file will appear on the list. Click on the disk icon to download the backup file to your browser.</li>
<li>From the Server menu, select IP Configuration, then note the protocol for the eth0 interface and, if it's set to 'static', note the IP address and netmask currently used.</li>
<li>Shutdown your Switchvox (so we can use its LAN static IP without conflict)</li>
</ul>
<p>On your new VM:</p>
<ul>
<li>From the Server menu, select Backups, then click on the Upload &amp; Restore Backup button.</li>
<li>In the Choose Backup File window, drag the backup file you just downloaded to the Backup File field, then click on the Upload &amp; Restore Backup button
<ul>
<li>The VM Switchvox will import all settings EXCEPT for the LAN static IP address.</li>
</ul>
</li>
<li>If your physical switchvox used the 'static' protocol for eth0 interface, from the Server menu, select IP Configuration, then:
<ul>
<li>Protocol: change to 'static'</li>
<li>IP Address: Enter the address you noted from the physical Switchvox</li>
<li>Netmask: Enter the mask you noted from the physical Switchvox</li>
<li>Click the Save IP Configuration button and the VM will restart</li>
</ul>
</li>
</ul>
<p>Be sure to compare the memory in your physical switchvox and virtual machine. The defaults they provide on the VM are mimimal, and probably need to be increased.</p>
<p>Test your phone system. I'm finding the web UI is whiplash faster than on the old, physical Switchvox hardware.</p>
<p> </p>
<p> </p>]]></description>
			<author>cgray@metamedia.us (Christopher Gray)</author>
			<category>Technical Advice</category>
			<pubDate>Wed, 30 Jan 2019 14:52:57 +0000</pubDate>
		</item>
		<item>
			<title>How to change user shortname in OSX</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/123-how-to-change-user-shortname-in-osx.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/123-how-to-change-user-shortname-in-osx.html</guid>
			<description><![CDATA[<p>Login as a (different) admin user and change user shortname to whatever it should be:<br /> https://support.apple.com/en-us/HT201548<br /> <br /> Go to the Users folder on the startup drive. The Users folder contains the home folder of the account you're renaming. Rename that account's home folder and make note of both the old name and new name.<br />When prompted, enter the then enter the administrator name and password that you used to log in.</p>
<p>From the Apple menu, choose System Preferences.<br />Click the Users &amp; Groups icon in the System Preferences window.<br />Click the lock icon in the Users &amp; Groups pane, then enter the administrator name and password that you used to log in.<br />From the list of accounts, Control-click or right-click on the account that you want to rename. <br />Choose "Advanced Options" from the shortcut menu that appears.<br />Change the "Account name" field to match the new name that you gave the home folder in the Users folder.</p>
<p>When modifying the account name (short name) or the home folder name, it should not contain any spaces. If the current account name already contains a space, you won't be able to edit this field until the space has been removed. Click immediately after the space, or use the left arrow key to move the text insertion point immediately after the space, then press the Delete key to remove the space.</p>
<p>Change the "Home directory" field to match the new name that you gave the home folder in the Users folder.<br />Click OK, then close System Preferences.<br />Log out of the current administrator account, then log in to the renamed account.<br />Verify that your old files and folders are visible and the account is working normally</p>]]></description>
			<author>cgray@metamedia.us (Christopher Gray)</author>
			<category>Technical Advice</category>
			<pubDate>Mon, 12 Feb 2018 16:16:45 +0000</pubDate>
		</item>
		<item>
			<title>Missing network when moving virtual machines to new host</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/121-missing-network-when-moving-virtual-machines-to-new-host.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/121-missing-network-when-moving-virtual-machines-to-new-host.html</guid>
			<description><![CDATA[<p>When moving UNIX virtual machines from one VMware Fusion host to another, the network interfaces can get totally borked. This seems to be caused by Fusion not presenting the same virtual hardware to the VM.</p>
<p>If you move your VM and you cannot ping the device, and you've already checked your network settings in VMware, it could be that your virtual machine needs to be configured to recognize the new virtual network hardware.</p>
<p>These examples are for CentOS, as that is what we have in our production environments. Your mileage may vary.</p>
<p>To see your network interfaces, from the command line in the VM:</p>
<pre>ifconfig</pre>
<p>... will display something like this:</p>
<p> <img src="https://www.happymac.info/cms/images/stories/121-moving-vms/121-ifconfig.jpeg" alt="" /></p>
<p>Note that there is no eth0 interface at all! There was before!</p>
<p>To list your available ethernet devices, use either: <code>ifconfig -a</code> or <code>ip link show</code> , which displays the devices and their information.</p>
<p><img src="https://www.happymac.info/cms/images/stories/121-moving-vms/121-ip-link-show.jpeg" alt="" /></p>
<p>Note the MAC address, as in this example: 00:0c:29:20:0c:86. We will need this in order to modify the network script.</p>
<p>Edit your network script located at /etc/sysconfig/network-scripts/ to use this new MAC address. </p>
<p>Change or add the line in your network script to match the value we discovered above, e.g.</p>
<pre>MACADDR=00:0c:29:20:0c:86</pre>
<p> </p>
<h5>References</h5>
<p><a href="https://unix.stackexchange.com/questions/125400/how-can-i-find-available-network-interfaces" target="_blank" rel="noopener noreferrer">https://unix.stackexchange.com/questions/125400/how-can-i-find-available-network-interfaces</a></p>
<p><a href="https://www.centos.org/forums/viewtopic.php?t=8181" target="_blank" rel="noopener noreferrer">https://www.centos.org/forums/viewtopic.php?t=8181</a></p>
<p><a href="http://www.putorius.net/2012/10/how-to-configure-static-ip-address-in.html" target="_blank" rel="noopener noreferrer">http://www.putorius.net/2012/10/how-to-configure-static-ip-address-in.html</a></p>]]></description>
			<author>cgray@metamedia.us (Christopher Gray)</author>
			<category>Technical Advice</category>
			<pubDate>Thu, 24 Aug 2017 15:11:23 +0000</pubDate>
		</item>
		<item>
			<title>Printing in Duplex Mode by Default in OS X</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/115-printing-in-duplex-mode-by-default-in-os-x.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/115-printing-in-duplex-mode-by-default-in-os-x.html</guid>
			<description><![CDATA[<p style="orphans: 2; widows: 2;">Assuming that your printer supports duplex printing, it is actually a bit tricky to get OS X to print in duplex mode by default.  If you activate duplex mode on your printer via the CUPS web interface (must be activated with the Terminal command "cupsctl WebInterface=yes"; accessed by pointing your web browser to http://127.0.0.1:631) it won't reflect in the OS X GUI.  This has to do with the fact that the PPD doesn't reflect changes made to CUPS settings via the web interface.</p>
<p style="orphans: 2; widows: 2;">In order for the OS X GUI to reflect changes made in the CUPS settings we have to make use of the "lpadmin" Terminal command paired along with the "-p" and "-o" flags.  For example:  "lpadmin -p printer_name -o sides=two-sided-long-edge".  By doing it this way, we are altering the PPD that was placed in /etc/cups/ppd/ when the printer was installed.</p>
<p style="orphans: 2; widows: 2;">So, to get a list of printers from CUPS via Terminal use the following command:  "lpstat -a"</p>
<p style="orphans: 2; widows: 2;">Once you have a list of CUPS printer name(s) (in my case, "EPSON_WF_7520_Series") you can initiate the command to enable duplex printing:  "lpadmin -p EPSON_WF_7520_Series -o sides=two-sided-long-edge".</p>
<p style="orphans: 2; widows: 2;">Now, when printing via the OS X GUI, you will see that duplex mode is selected by default.<br /><br /></p>
<p style="orphans: 2; widows: 2;">Cheers!</p>]]></description>
			<author>abudzynski@happymac.info (Alexander Budzynski)</author>
			<category>Technical Advice</category>
			<pubDate>Fri, 28 Oct 2016 15:28:05 +0000</pubDate>
		</item>
		<item>
			<title>Enabling Bridge Mode On a Netgear CG3000DCR Cable Modem</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/114-enabling-bridge-mode-on-netgear-cg3000dcr.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/114-enabling-bridge-mode-on-netgear-cg3000dcr.html</guid>
			<description><![CDATA[<p>Officially, there is not a way to put the Netgear CG3000DCR cable modem router used Comcast into "true" bridge mode.  The official documentation offers a workaround that instructs you how to put the CG3000DCR into "pseudo-bridge mode" or, more appropriately, "IP passthrough mode".  Either way, it would be nice if the Netgear CG3000DCR router supported true bridge mode so that a double NAT situation could be avoided.  After some research and digging into forum responses I found a great bit of advice to get the CG3000DCR into true bridge mode.  It is a hidden function built within the firmware of the router.</p>
<p>(These "hidden" webpages are not advertised or spoken of by Comcast or Netgear but they are accessed as follows):</p>
<p>To enable bridge mode (depending on how your CG3000DCR is addressed):  http://x.x.0.1/RgNatControl.asp (In my case, http://192.168.0.1/RgNatControl.asp).  Accessing this webpage turns bridge mode on and disables NAT.</p>
<p>Adversely, to disable bridge mode (depending on how your CG3000DCR is addressed):  http://x.x.100.1/RgNatControl.asp (In my case, http://192.168.100.1/RgNatControl.asp).  Accessing this webpage turns bridge mode off and NAT will thusly be re-enabled.<br /><br />Notice the difference in IP addresses.  One ends in "0.1" (to enable bridge mode) and the other ends in "100.1" (to disable bridge mode).</p>
<p> <br />Cheers!</p>]]></description>
			<author>abudzynski@happymac.info (Alexander Budzynski)</author>
			<category>Technical Advice</category>
			<pubDate>Fri, 28 Oct 2016 13:34:04 +0000</pubDate>
		</item>
		<item>
			<title>Disc recovery using ddrescue on OSX</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/103-disc-recovery-using-ddrescue.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/103-disc-recovery-using-ddrescue.html</guid>
			<description><![CDATA[<p><a href="http://www.gnu.org/software/ddrescue" target="_blank">GNU ddrescue</a> is a data recovery tool. It copies data from one file or block device (hard disc, cdrom, etc) to another, trying to rescue the good parts first in case of read errors. You can use ddrescue to recover data from a damaged drive volume or from CDs, DVDs or other media.</p>
<p>If you have multiple, identical copies, you can combine partial recoveries to hopefully make one completely recovered image. See the <a href="http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html" target="_blank">ddrescue documentation</a> for full usage notes as this app can do so much more, but for this example we are going to attempt recovery from two identical DVDs, both of which are damaged. The hope is that between the them a single, whole image can be reconstructed.</p>
<h2>Installing ddrescue</h2>
<p>ddrescue for OSX is easiest to install via MacPorts, which requires Xcode and the Xcode command line tools. See the <a href="https://www.macports.org/install.php" target="_blank">MacPorts install page</a>. After you have MacPorts installed, you can install ddrescue form the command line:</p>
<pre>sudo port install ddrescue</pre>
<p>This installs ddrescue at: /opt/local/bin/ddrescue , and should be in your search path.</p>
<h2>Determining the device path of the volume to recover</h2>
<p>Since ddrescue operates at the command line, you have to provide the path to the device which you are attempting to recover. Insert one of the DVDs, wait for it to mount or otherwise become available, then:</p>
<pre>diskutil list</pre>
<p>provides a list of volumes and their paths similar to this:</p>
<pre>Hungry-Calliope-2:~ cgray$ diskutil list<br />/dev/disk0<br />   #:                       TYPE NAME                    SIZE       IDENTIFIER<br />   0:      GUID_partition_scheme                        *500.1 GB   disk0<br />   1:                        EFI EFI                     209.7 MB   disk0s1<br />   2:                  Apple_HFS Macintosh HD            499.2 GB   disk0s2<br />   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3<br />...<br />/dev/disk6<br />   #:                       TYPE NAME                    SIZE       IDENTIFIER<br />   0:                            MY_DVD1              *4.5 GB     disk6</pre>
<p>so in this example the device path is: /dev/disk6</p>
<h2>Create a working directory</h2>
<p>Create a directory somewhere where you have plenty of disk space. This is where you will save the partially recovered images and log files. ddrescue log files contain information about which parts of the disc were read un/successfully, so you can interrupt the recovery process and continue where you left off trying to scrape off every bit of readable data.</p>
<h2>Recover from the first disc</h2>
<p>In Terminal, cd to the local working directory. This sets the path for ddrescue to that directory.</p>
<pre>ddrescue -v -n -b2048 /dev/disk6 image1.dmg logfile1</pre>
<ul>
<li>-v : verbose mode</li>
<li>-n : disable the scrape mode, which takes a very long time to perform</li>
<li>-b : sets the sector size
<ul>
<li>512 for hard discs and 3.5" floppies,</li>
<li>1024 for 5.25" floppies</li>
<li>2048 for cdroms, DVS</li>
<li>(Defaults to 512)</li>
</ul>
</li>
<li>/dev/disk6 : the device path</li>
<li>image1.dmg : the disk image file where recovered data will go</li>
<li>logfile1: the log file for this copy of the DVD</li>
</ul>
<p>The recovery process can take a very long time.</p>
<p>If you get an error "ddrescue: Can't open input file: Resource busy", unmount the DVD (not eject):</p>
<pre>diskutil unmount /dev/disk6</pre>
<h2>Recover from the second disc</h2>
<p>Mostly a repeat of what we have already done. Eject the first disc and set it aside (be sure to label it!).</p>
<pre>diskutil eject /dev/disk6</pre>
<p>If you are having trouble ejecting with error "device is busy", you might have to quit Terminal and re-launch to get it to eject.</p>
<p>Insert the second disc. Check that the device path remains the same, unmount the volume if it mounted, and increment the disk image name and the logfile name as in the command below:</p>
<pre>ddrescue -v -n -b2048 /dev/disk6 image2.dmg logfile2</pre>
<h2>Merge the partial recovered images</h2>
<p>We now have two disk images and two log files, and both had errors during recovery. Now let's merge the partial recovered images into a single (and hopefully complete) image:</p>
<pre>ddrescue -m logfile1 image1.dmg image_combined.dmg logfile</pre>
<p>then:</p>
<pre>ddrescue -m logfile2 image2.dmg image_combined.dmg logfile</pre>
<p>If the if errsize is zero, combined.dmg now contains a complete image of the DVD and you can write it to a blank DVD.</p>
<h2>Misc</h2>
<h4>How can I see the number of errors on any recovered disc image?</h4>
<pre>ddrescuelog --show-status logfile</pre>
<p>which will show you something like this:</p>
<pre>Hungry-Calliope-2:2 cgray$ ddrescuelog --show-status logfile<br /><br />   current pos:     3871 MB,  current status: finished<br />logfile extent:     4521 MB,  in    27 area(s)<br />       rescued:     4520 MB,  in    14 area(s)  ( 99.98%)<br />     non-tried:    851968 B,  in    13 area(s)  (  0.01%)<br /><br />       errsize:         0 B,  errors:        0  (  0%)<br />   non-trimmed:         0 B,  in     0 area(s)  (  0%)<br />   non-scraped:         0 B,  in     0 area(s)  (  0%)<br />    bad-sector:         0 B,  in     0 area(s)  (  0%)</pre>
<p>You can see all was recovered except for about 832K. So my work is not yet done...</p>
<h4>What can I do if there are still errors?</h4>
<p>Repeat the recovery steps above but omit the -n flag. This enables the scrape mode, which takes a lot of time but may be able to eventually recover more of the missing bits. You don't have to start over with the merge, just merge to the combined image again with whichever recovery image has eventual success.</p>
<p>Perhaps there is a 3rd copy of the disc you can try to recover from...</p>
<p>Also, review the ddrescue documentation. ddrescue is very powerful and you can perform advanced surgery on the volume, such as filling bad blocks with data you specify, which depending on where they occur and the data types in question may allow proper usage anyway.</p>
<h4>References</h4>
<ul>
<li><a href="http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html" target="_blank">ddrescue documentation</a></li>
<li><a href="http://arstechnica.com/civis/viewtopic.php?t=1197911" target="_blank">How I saved a year of our family pictures from a dead hard drive</a></li>
</ul>]]></description>
			<author>cgray@metamedia.us (Christopher Gray)</author>
			<category>Technical Advice</category>
			<pubDate>Thu, 16 Apr 2015 12:32:59 +0000</pubDate>
		</item>
		<item>
			<title>VMware Fusion: Adding a raw physical disc</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/106-vmware-fusion-adding-a-raw-physical-disc.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/106-vmware-fusion-adding-a-raw-physical-disc.html</guid>
			<description><![CDATA[<p>VMware Fusion on Mac OSX currently provides no mechanism to associate a physical volume on the host with a virtual machine. This is a shortcoming for a variety of reasons:</p>
<ul>
<li>the VM has share a huge number of files, and the file-based VM disk image is just too inefficient, or</li>
<li>if the VM is an OSX Server / file server and needs to maintain permissions on shares (can used VM Shared Folder)</li>
</ul>
<p>However there is a way to give control of a physical disc belonging to the host to a VM.</p>
<p>1. Shutdown the VM that you want to mount the physical drive</p>
<p>2. Launch terminal and use the diskutil command to find the IDENTIFIER of the device you want to migrate (should be something like 'disk1' or 'disk2s3'):</p>
<pre>diskutil list</pre>
<p>3. Unmount the volume from the host filesystem:</p>
<pre>diskutil unmount &lt;IDENTIFIER&gt;</pre>
<p>3. Create a link file to this physical volume to be used by VMware. I like to put this in the VM package.</p>
<pre>/Applications/VMware\ Fusion.app/Contents/Library/vmware-rawdiskCreator create /dev/&lt;IDENTIFIER&gt; fullDevice &lt;full-path-to-.vmwarevm-file&gt;/&lt;IDENTIFIER&gt;-link ide</pre>
<p>4. In Finder, find and select the .vmwarevm file for the VM, and choose “Show Package Contents”. Open the enclosed .vmx file a text editor, and append to the bottom of the file and save:</p>
<pre>ide0:0.present = "TRUE"
ide0:0.fileName = "&lt;IDENTIFIER&gt;-link.vdmk"
ide0:0.redo = ""</pre>
<p>Note: if there are other IDE drives associated with the VM, you might need to increment the 0 in 'ide0:0' to 'ide1:0' so that the volume does not conflict.</p>
<p>Note: Since the association is made by the host system disk IDENTIFIER, be very very careful about attaching or removing drives to the host OS, as it could cause some other physical drive to be substituted, and much havoc could ensue. The link may be broken should the host's drive mounting order change or if partitions on the drive change order, so be mindful of this if moving the VM to another host or should the drive not otherwise be found. </p>
<h3>References:</h3>
<p><a href="http://www.somerandomstuff.com/2014/01/18/vmware-fusion-adding-a-raw-physical-disc/" target="_blank">Some Random Stuff</a></p>
<p> </p>]]></description>
			<author>cgray@metamedia.us (Christopher Gray)</author>
			<category>Technical Advice</category>
			<pubDate>Thu, 23 Jul 2015 14:48:54 +0000</pubDate>
		</item>
		<item>
			<title>Flashback Trojan Detection</title>
			<link>https://www.happymac.info/cms/knowledge-base/tech-advice/95-flashback-trojan-detection.html</link>
			<guid isPermaLink="true">https://www.happymac.info/cms/knowledge-base/tech-advice/95-flashback-trojan-detection.html</guid>
			<description><![CDATA[<p>There's starting to be more and more press about the Flashback Trojan malware for Mac OS X that was discovered last September. According to recent <a target="_blank" href="http://www.macrumors.com/2012/04/05/600000-macs-worldwide-reportedly-infected-by-flashback-trojan/">reports</a>, about 600,000 Macs world-wide are infected with this malware. Read on to find out if you might be infected and what to do about it.</p>
<p class="feed-readmore"><a target="_blank" href ="/cms/knowledge-base/tech-advice/95-flashback-trojan-detection.html">Read More ...</a></p>]]></description>
			<author>kbarnt@happymac.info (Ken Barnt)</author>
			<category>Technical Advice</category>
			<pubDate>Thu, 05 Apr 2012 14:51:28 +0000</pubDate>
		</item>
	</channel>
</rss>
