Hackintosh – ASRock Z87E-ITX and OS X 10.11 (El Capitan)

I successfully upgraded my Hackintosh to OS X 10.11 and it appears everything is working as expected including audio and Intel SpeedStep. I performed a clean install of El Capitan by using this guide; I was pleasantly surprised to discover that in 10.11 you can restore all of your applications/data/settings from a Time Machine Backup using the Migration Assistant. Initially I had trouble getting the new OS X installation to boot correctly; the Unibeast application used for making the installer has changed to the Clover bootloader. Clover has support for booting in UEFI mode and it seems some ASRock boards have issues booting from it. To fix this I had to create a manual entry for the Clover bootloader in my UEFI Boot menu; it’s not enough to just configure the drive as first boot device in the BIOS. I found the necessary commands thanks to the following guide (under section 4.1).

After booting from the Unibeast USB and selecting “Start UEFI Shell 64” you will be greeted by the following screen:

uefi_shell

On this screen we have entries for FS0, FS1, etc. which are the partitions detected; we need to find the one that corresponds to the EFI partition of the drive where OS X was installed. If you look at the strings beginning with “PciRoot (0x0)”, you will see some of them contain “/USB”; you can rule those out since that is the Unibeast USB. For my particular system I found the EFI partition under FS2.

For example, lets enter the partition FS2 and check the contents:

If we see a directory labeled EFI in the ls output, then we’ve found the right partition. Now we get a list of the current boot entries with:

You should get output similar to the screen below; this is from my Hackintosh after I already added Clover to the UEFI Boot menu.

bcfg_boot_dump

Use the following commands to add Clover to the ASRock UEFI Boot menu:

After going back into the BIOS, you can change your first boot device to Clover and OS X should boot normally.

Sega Dreamcast Battery Mod with Panasonic Eneloops

After modding my Sega Saturn to use AA Panasonic Eneloops, I found a guide where someone modded their Dreamcast with rechargeable AAA batteries. The Dreamcast uses a rechargeable 3V lithium battery; I’ve seen conflicting sources on the exact type of battery. I’ve read it can either an ML2430, ML2032, or LIR2032. Since my Dreamcast battery seemed to be dead, I decided to do the same mod but with AAA Panasonic Eneloops. They have a minimum capacity of 750mAh which is 7.5x the capacity of the ML2430 mentioned above. It will be interesting to see if the Eneloops stay topped off in the Dreamcast; assuming the Dreamcast uses the ML2430 and charges at a rate of 1C, it would take about 7.5 hours for the Dreamcast to fully charge the Eneloops.

You can see below I used a 2 AAA battery holder instead of taping and soldering them together like in the guide.

P1010461

Sega Saturn Battery Mod with Panasonic Eneloops

I’ve been cleaning out old boxes of junk and stumbled on my forgotten Sega Saturn console. Sometime during high school I had taken the wires for the CD-ROM door switch and simply twisted them together to enable using the Swap Trick to play backup games. I decided to implement a better fix by soldering an actual on/off switch and also do a mod of the built-in battery. Unlike the Sega Dreamcast that came after, the Sega Saturn does not use a built-in rechargeable battery for memory saves; it uses a CR2032 lithium battery. According to this Sega Saturn Battery FAQ, the CR2032 has a capacity of 230mAh and will last 1-2 years in normal use or 19 days if the console is unplugged. This FAQ also discusses using other lithium batteries with higher capacities than the CR2032; I decided to try using Panasonic Eneloops instead. They are considered one of the best, if not the best, rechargeable AA batteries on the market; Eneloops have a minimum capacity of 1900mAh and can keep their charge while sitting unused for several years.

I went to my local Fry’s Electronics store to pick up a 2 AA battery holder, mini on/off switch, and some 3M mounting tape. The battery mod is straight forward; solder the positive sides of the battery holder and the Saturn’s battery contact together and do the same for the negative sides. If you get a 2 AA battery holder, make sure it’s wired in series so you’re getting 3V from the two AA batteries.

Since the Eneloops have a capacity of at least 1900mAh, it should theoretically last much longer than using a CR2032. I’ve had it running since yesterday July 29th; I will make an update in the future on how well it performs. You could also use AA Lithium batteries instead like these.

I lost the cover to the battery compartment so I just mounted the battery holder where you would normally see the model number of the Sega Saturn. You can also see the mini on/off switch mounted above the battery compartment area. Not the cleanest looking mods but it works.

P1010451

Kodibuntu and TL-WN822N v3 wireless fix

I have a Zotac MAG HD-ND01-U I bought almost 5 years ago that I use to play movies for the family. Even at the time I bought it, the Zotac was very low end; it ships with an Intel Atom N330 CPU, Nvidia ION GPU, 160GB 5400RPM HDD and 2GB of RAM. It has been since upgraded to a 500GB 7200rpm HDD and 4GB of RAM. Previously I was just running Win7 and using MPC-HC to play movies on the big screen. The Zotac was just barely capable of playing 1080p x264 mkvs with that combination; CPU usage was still very high despite using hardware acceleration in LAV Video Decoder. It was also really annoying waiting for Windows processes (TrustedInstaller.exe and svchost.exe) to stop eating CPU cycles after boot up. I decided it was time to take look at Kodi; a software media center formerly known as XBMC. I made a Live USB of Kodibuntu and spent a couple hours just trying to get it to find my movie library over the network; when I finally got a movie to play, it played perfectly with no jitter and very low CPU usage. If anyone out there is wondering if an Intel Atom and Nvidia ION are enough to play 1080p x264 mkvs, I can assure you it will play perfectly under Kodibuntu. However it will struggle with mkvs encoded in 10bit.

After the successful trial of the Live USB, I rebooted and performed the full installation thinking that maybe the network issue was just the Live USB environment. After the full install, I tried installing updates and the network would stop working after a few minutes. I did some searching online and apparently the driver that ships with Ubuntu based distributions doesn’t work properly with the TL-WN822N v3 USB wireless adapter I was using. I found the solution here via this page of the Ubuntu Community Help Wiki. I’ve included all the commands from the solution below; they will install a patched driver and remove the native one.

ownCloud 8 on CentOS 6.6 using Nginx and PHP-FPM

Earlier this week I decided to test drive ownCloud; an open source alternative to cloud sync services like Google Drive or Dropbox. The main difference is that you install and run ownCloud on your own server.

ownCloud provides packages for most Linux distributions including CentOS here; the advantage of installing from the package is that it will automatically install required dependencies and you can  update ownCloud with yum. If you use the ownCloud package, you will also need Remi’s RPM repository as CentOS 6 provides PHP 5.3 and ownCloud 8 requires PHP 5.4.

Since I already had a server running Nginx I decided to skip the package installation of ownCloud because it also installs Apache as a dependency. The steps below can be used to set up ownCloud 8 on CentOS using Nginx, PHP-FPM and MySQL.

Set up Nginx and Remi repos:

Install Nginx, MySQL and PHP components:

Start MySQL and run mysql_secure_installation script to create root password (answer Y to all questions):

Now create the database and user for ownCloud:

Create document root for Nginx and install ownCloud:

Edit /etc/php-fpm.d/www.conf to replace apache user with nginx on lines 39 and 41:

Give nginx user permissions on /var/lib/php/session (this fixed a redirect loop I was getting when trying to login):

Make sure services start automatically on boot:

Now you just need to configure Nginx to work with ownCloud; below is my configuration file that I made based on the ownCloud documentation here.

Once you have Nginx configured correctly, browse to your server and you will be greeted by the following screen where you will create the admin account and provide the details of the MySQL database you created earlier:

ownCloud_setup_page

For added security, you can configure Fail2Ban to protect the ownCloud login page from brute force attempts by using the guide located here: http://www.tech-and-dev.com/2014/11/protecting-owncloud-against-bruteforce-attacks-with-fail2ban.html