Friday, September 30, 2011

FreeBSD 8.2 i386 on Samsung NC20

I decided to look at FreeBSD again. I've read that FreeBSD is a powerful operating system behind some well known websites, appliances, and services, so I thought it would be useful to learn. Also, where better to learn a Unix-like operating system than one that traces back to Unix?

The Samsung NC20 is a VIA Nano-based netbook. Its platform is not as widespread as an Intel or AMD-based system, so maybe I shouldn't be surprised I ran into problems. I found I could not install FreeBSD 7.4, either as an AMD64 or i386. I could not install FreeBSD 8.2 AMD64 either. FreeBSD 8.2 i386 could be installed, but I had to disable ACPI at first, then alter /boot/loader.conf to include the line debug.acpi.disabled="sysresources".

Next up, I wanted a wireless connection. My wireless connection is WPA-PSK using TKIP encryption. Things changed since last I looked at FreeBSD. I needed to alter /etc/rc.conf to include:
hostname="FreeBSDNC20"
wlans_ath0="wlan0"
wlan_tkip_load="YES"
ifconfig_wlan0="WPA DHCP"

I had to add my wireless SSID and passphrase to /etc/wpa_supplicant.conf. Because my original wpa_supplicant.conf was empty, I ran the following two commands (the first to verify the output):
wpa_passphrase ssid ssid_passphrase
wpa_passphrase ssid ssid_passphrase > /etc/wpa_supplicant.conf

After a restart, ifconfig reported an IP address. Success!

Thursday, September 29, 2011

Make IE9 look more like IE8

You can make Internet Explorer 9 (IE9) look more like Internet Explorer 8 (IE8) in Windows in a few ways. I was searching for a site to lay this out for me and found suggestions to uninstall IE9 or install a Windows Classic theme to be unhelpful. Here is what you can do:

One of the most apparent changes was that the tabs were moved up and to the left of the new, combined address/search bar (where you type in the websites). The tradeoff is you gain screen real estate but lose space for tabs. To futher gain screen real estate, the status bar (with the zoom icon on the bottom right), the Favorites bar, and the Command bar were removed.

To place the tabs below the address/search bar:
Right-click a tab or an empty area above the address bar and click "Show tabs on a separate row"

To add back the favorites, command, and status bar:
Press Alt to reveal the menu
Click View - Toolbars and click Favorites bar, Command bar, and Status bar

I don't think you can change Internet Explorer if you do not like the new download dialog, manager, the transparency effects, or the new buttons (back, forward, compatibility view, refresh, or stop)

Wednesday, September 7, 2011

iPad locking out user account

I found that an Apple iPad was locking out a user's Active Directory account every 10 minutes and 25 seconds by attempting to synchronize with their Microsoft Exchange e-mail account with the wrong password. I don't know if synchronizing every 10 minutes and 25 seconds is the default setting, but I was surprised there was no randomization factor, and my coworker was surprised that the iPad wasn't programmed to stop trying after a certain number of failed attempts by default.

A user told us that his account kept getting locked out. Others were taking care of the issue by unlocking his account. When I got involved, I unlocked his account and then waited to see him log in to our Terminal Server (the resource he was trying to access). When 13 minutes later he did not have an active session, I assumed he mistyped his password again. I unlocked his account and waited another 12 minutes. I still saw no active session, saw he was locked out again, and unlocked his account. I saw the same thing 25 minutes later and did the same thing. Finally, when I saw he was locked out again another 15 minutes later, I determined it must have been a device with an incorrect password.

However, now my interest was piqued, so I watched it. I kept narrowing in until I saw it was happening every 10 minutes and 25 seconds, far too regularly for him to be locking himself out. When we alerted him, we found it was his iPad. He turned the screen off (and it kept trying to synchronize) then later shut it down (which coincided with his last lockout time). It turns out the Additional Account Information tab in Active Directory is really helpful for finding this information. Leaving open the Account tab, you don't see when an account gets locked out because the window does not refresh/repaint. Our lockout time period was longer than the iPad's synchronization period, so if I hadn't been unlocking the account, it would have remained locked out. We were glad he confirmed it was a device because the other option was another source was trying to compromise his account.

Saturday, September 3, 2011

VirtualBox Mac OS X 10.7.1 EFI

Like booting Mac OS X 10.6.8 Snow Leopard using VirtualBox, I found a way to boot Mac OS X 10.7.1 Lion using "Enable EFI (for special OSes only)". Websites discussing such things suggest using the Mac App Store to buy Mac OS X 10.7 Lion.

Get the Mac OS X Install ESD.dmg disk image from Mac OS X 10.7 Lion the Mac App Store. Then, the general steps are to create disk images for the LionInstaller and one as a Lion Starter. Restore the BaseImage.dmg image to the LionInstaller, copy Mac OS X Install ESD files over, altering some files, download some preparation files. Sutdown and uncheck Enable EFI. Start using a Mac EFI emulating booter (like Empire EFI, iBoot, nawCom, or HackBook). Create your Lion Starter image using MultiBeast and copy over utilities. Shutdown, remove the Snow Leopard disk image, add a Lion disk image, Enable EFI, and boot to the LionInstaller. Install Lion to the Lion disk image and shutdown when the installation is complete. Uncheck Enable EFI and boot into the Lion Starter to boot into Lion. Erase PlatformSupport.plist, install PlatformUUID.kext using a kext installer, Shutdown, "Enable EFI", and boot into Lion (you can remove the LionInstaller and Starter disks). Download and install the 10.7.1 update from www.apple.com. Install the rest of the updates. The instructions require an existing VirtualBox Snow Leopard VirtualBox VM (Virtual Machine) and a processor supporting VT-x (Intel) or AMD-V (AMD). Here are instructions:

1) Boot into Snow Leopard and purchase Mac OS X 10.7 Lion from the Mac App Store. Shut down the Snow Leopard VM.
2) Click the Snow Leopard VM and click Settings, click Storage, click Add Hard Disk, click Create new disk, select VDI (VirtualBox Disk Image) and click Next, click dynamically allocated and click Next, type LionInstaller for Location and leave 5 GB for size and click Next, and click Create.
3) Click Add Hard Disk, click Create new disk, select VDI (VirtualBox Disk Image) and click Next, click dynamically allocated and click Next, type Starter for Location and type 100 MB for size and click Next, and click Create.
4) Start Snow Leopard. You are prompted that the disk is not readable (twice), click Initialize (twice).
5) In Disk Utility, select the Select 5.0 GB VBOX HARDDISK Media, Click Partition, Select 1 Partition under Volume Scheme, Name: LionInstaller, click Apply, and click Partition.
6) In Disk Utility, select the Select 100 MB VBOX HARDDISK Media, Click Partition, Select 1 Partition under Volume Scheme, Name: Starter, click Apply, and click Partition.
7) Open the Mac OS X Install ESD.dmg
8) From the dock (or from Finder), click Applications -> Utilities -> Terminal
9) In Terminal, type cd "/Volumes/Mac OS X Install ESD", press enter, type open BaseSystem.dmg, and press enter.
10) In Disk Utility, click the LionInstaller partition and click Restore, drag Mac OS X Base System to the Source field, drag LionInstaller to the Destination field, click Restore, and click Erase, and Enter password and click OK. Close Disk Utility
11) Rename new Mac OS X Base System volume as LionInstaller and switch back to Terminal
12) Into Terminal, type cp kernelcache /Volumes/LionInstaller/kernelcache and press enter, type cp mach_kernel /Volumes/LionInstaller/ and press enter, and type sudo vi /Volumes/LionInstaller/Library/Preferences/SystemConfiguration/com.apple.Boot.plist and press enter and type your password and press enter.
13) In vi (a Terminal text-based text editor), press the down arrow then the right arrow until you reach the end of the line . Press a (to append or add text).
14) Press enter, press tab, type Kernel Cache and press enter, type \kernelcache and press enter. Press ESC, type :wq, and press enter (to exit vi)
15) In Terminal, type sudo rm /Volumes/LionInstaller/System/Installation/Packages and press enter. If required, type your password and press enter. Type sudo cp -R Packages /Volumes/LionInstaller/System/Installation/Packages and press enter. If required, type your password and press enter.Type cd /Volumes/LionInstaller/System/Library/CoreServices and press enter. Type sudo touch ServerVersion.plist and press enter. Type cd ~ and press enter. Type cp /Volumes/LionInstaller/System/Installation/Packages/OSInstall.mpkg . and press enter. Type pkgutil --expand OSInstall.mpkg OSInstall and press enter. Type vi OSInstall/Distribution and press enter. In vi (Terminal text-based text editor), press down arrow to the line function isVirtualMachine(){.
16) Use down arrow and type dd and delete lines between function isVirtualMachine(){ and return false;. Type dd and delete lines between return false; and the enclosing }. (so you should see three lines, isVirtualMachine(){ then return false; then })
17) Use down arrow and type dd and delete lines between function isSupportedPlatform(){ and return true;. Type dd and delete lines between return true; and the enclosing }. (so you should see three lines, isSupportedPlatform(){ then return true; then })
18) Press ESC, type :wq, and press enter.
19) Download KextBeast and MultiBeast from tonymacx86.com (to Snow Leopard and Empire EFI (or download iBoot, nawCom, or HackBoot on your host system) from prasys.info (find PlatformUUID.kext and download it to Snow Leopard if you did not use Empire EFI).
20) Shutdown. In VirtualBox, click Devices -> Choose a virtual CD/DVD file..., pick Empire EFI (or iBoot, nawCom, or HackBoot), and click Open. Click the Virtual Machine and click Settings. Click System and uncheck Enable EFI. Click OK. Start Snow Leopard and boot to the Snow Leopard disk.
21) Run MultiBeast.Click Continue, Continue, Continue, Agree, select EasyBeast Install and click Continue, click Change Install Location..., click Starter, and click Starter, select EasyBeast Install and click Continue, click Install, type password, and click Close.
22) Copy PlatformUUID.kext from Empire EFI from the within Preboot.dmg \Extra\Extensions
folder to Starter. Copy KextBeast to Starter. Shut down Snow Leopard.
23) In VirtualBox, select the VM and click Settings. Click System and check Enable EFI (for special OSes only) Remove the disks, click Add Hard Disk on the SATA Controller, click Create new disk..., click VDI (VirtualBox Disk Image) and click Next, click Dyamically allocated and click Next, OSX86-64Lion click Next and click Create. Add LionInstaller disk to IDE Controller (click Add Hard Disk, click Use existing disk, select LionInstaller and click Open). Click System, Change memory to 2048 MB. Click OK. Click Start.
24) It will boot to the LionInstaller and start the Lion installation process. Click Next. Click Utilities -> Disk Utility, select 21.47 GB VBOX HARDDISK Media, select Partition, select 1 Partition under Partition Layout and Name Macintosh HD and click Apply, click Partition, click Close. Click Continute, click Agree, select Macintosh HD and click Install. After the install, Shutdown.
25) Click the VM and click Settings. Click Storage, remove LionInstaller.vdi and replace it with Starter.vdi. Click System and uncheck Enable EFI (special OSes only). Click OK. Start the VM. It will boot to the Starter then to Lion, which will start the first boot Lion process.
26) Click Continue, click Continue, click Continue, click Continue, click Continue, click Continue, create your computer account and click Continue, select time zone and click Continue, click Start Using Lion.
27) Delete /System/Library/CoreServices/PlatformSupport.plist. Copy PlatformUUID.kext to the Desktop and run KextBeast. Shutdown.
28) Click the VM and click Settings. Click System and uncheck Enable EFI (special OSes only), click Storage and remove Starter. Click OK. Start VM
29) Download and install the 10.7.1 update from www.apple.com. The install will require a restart. Download and install the other updates from www.apple.com.

Friday, September 2, 2011

VirtualBox Mac OS X 10.6.8 EFI

I come to find a better way to virtualize Mac OS X 10.6.8 Snow Leopard on VirtualBox. Apparently, you don't need a boot CD (Empire EFI on the last VirtualBox Mac OS X post) to run before the installer and as a booter to boot into. I found elsewhere that Snow Leopard can be installed onto VirtualBox directly with Enable EFI checked and a change to the vbox settings file. Again, this source's instructions said to buy Snow Leopard on retail. AMD or Intel virtualization needs to be enabled on the host (VT-x or AMD-V).
1) Download and install VirtualBox from http://www.virtualbox.org. Open VirtualBox.
2) Click New, give it a name like OSX86-64, choose Maco OS X for Operating System and Mac OS X Server (64 bit) and click Next
3) Give it memory. 1 GB is sufficient for Snow Leopard but 2 GB is needed for Lion by default. Click Next.
4) With Startup Disk checked and Create new hard disk selected, click Next
5) With VDI (Virtual Box Image) selected, click Next.
6) Dynamically allocated may save space (only takes space as needed but doesn't automatically give it back). Fixed size may run faster but takes up all the space you specify. Dynamically allocated is sufficient.
7) Give it a name for location, like OSX86-64, default size 20 GB is ok, and click Next. Click Create, click Create.
8) Close VirtualBox
9) Edit the VirtualBox settings file, by default in %userprofile%\VirtualBox VMs\OSX86-64\OSX86-64.vbox. In the ExtraData section (in between and ), add . Save and close the file. Open VirtualBox. (If you want to see the Apple logo boot screen, add
10) Start the Virtual Machine. It starts to a first run wizard. Click OK, Next, pick the OS X Snow Leopard media, click Next, and click Start.
11) Run through the setup process:
(English, Continue. From the Utilities menu, click Disk Utility, click the 21.47 GB VBOX HARDDISK Media, and click Partition. From Volume scheme, select 1 Partition, name: Macintosh HD, click Apply and click Partition. When done, click Quit Disk Utility from the Disk Utility Menu. Click Continue, click Agree, select Macintosh HD and click Install. Restart when done.)
12) Run through the first setup steps.
13) Download and install the Mac OS X 10.6.8 Update Combo from Apple.com. Restart. Download and install the other updates.

I find it interesting that the Apple switch to Intel processors combined with the popularity of virtualization technology has opened this door. This would be more difficult to do were Apple still using only Power processors. It makes me wonder if Apple plans to port their ARM processor (Apple A4/5) "back to the Mac." I'm most familiar with Windows operating systems, and I'm interested in learning more about other operating systems. However, I am more interested in BSD (FreeBSD), which is used in Mac OS X. I'd also interested in Linux. It is said that Apple's iOS is a walled garden, and I kind of view Mac OS X in the same light.