Archive for the 'OS' Category

Multiple partitions with Windows 7 and OS X side-by-side install

The Webmechs Editor on Nov 15th 2009


When installing Windows and OS X side by side using Apple’s recommended Boot Camp technique, you can only use one partition for Windows.  If, like me, you need multiple partitions for Windows, you have to do it another way.  The first thing to understand is that Boot Camp Assistant is not at all necessary for installing Windows 7.

The other thing to understand are that the interaction between GPT/MBR (the new and old style partition tables) and EFI/BIOS (the new/old style firmware) makes things very tricky if you don’t understand the issues.


Several issues to know:

1) Windows 7 (and Vista too I believe) WILL install on a GPT partitioned drive and can also be booted from EFI firmware.

2) When the Windows 7 install DVD boots on a Macbook though, it actually boots in BIOS mode(!), this is because the Macbook will switch to BIOS mode when it sees that a DVD has a BIOS-based bootloader, which a Windows 7 install DVD of course will have.

3) When booted in BIOS mode, Windows 7 refuses to install on a GPT partitioned drive (this is what leads people to mistakenly think that Windows 7 does not support GPT installation)

4) However, and this is the kicker, even if you get the Macbook to boot Windows 7 (whether the installer DVD or the OS itself) in EFI mode, things will not work properly because the EFI version on Macbooks is the older version which Windows does not want to work with!  #$%@#$#@^@@….!!!!!  Windows 7, etc… *need* UEFI 2.0 to properly work with GPT partitions.

These 2 pages have more to say on the issue:

http://darobins.spaces.live.com/blog/cns!C188BEF79F825945!529.entry

http://www.insanelymac.com/forum/index.php?showtopic=186440

So how then do we install the 2 OSes side-by-side?  We’re left with two ways:

1) Hybrid GPT-MBR partitioned disk

or

2) MBR partitioned disk

From a Windows-centric viewpoint, method 2 is probably the cleanest and lets you deal with your partitions with standard tools like Partition Manager.  In this case, you will need to hack your OS X install DVD to install on an MBR disk.  The two links below explain how:

http://blog.netnerds.net/2009/10/easily-install-mac-os-x-leopard-on-an-mbr-formatted-disk/

http://www.insanelymac.com/forum/index.php?showtopic=181287

But because they involve extensive tweaking on the Mac command line which I don’t currently wish to involve myself in, I will go with method 1 instead which this blog article will explain further.

Firstly, a hybrid GPT-MBR disk is one looks like an MBR drive to older non-GPT supporting OSes but which GPT-supporting OSes sees as GPT.  As far as I understand, only the Disk Utility that comes with the OS X install DVD to create a hybrid GPT-MBR table correctly (if gParted can do this, drop me a comment…)

In my case, I needed 4 partitions, 3 for Windows and one for OS X.  In Disk Utility, I did the following steps:

1) Create 4 partitions in the partition editor, 3 as FAT and 1 as an OS X filesystem.  IMPORTANT: Make the OS X partition the last one.

2) (VERY IMPORTANT) Select GUID Partition table instead of MBR type using the Options button.

3) Apply changes and then reboot into the Windows 7 install DVD.

4) When the Windows 7 installer shows the available partitions you will see one extra 200MB partition at the beginning.  DO NOT DELETE THIS!  This is the GPT protective partition, deleting it will prevent Windows 7 from booting correctly afterwards.

5) The free space you allocated for OS X will show up as “unallocated free space”.  Do not panic.  This is because MBR only allows 4 primary partitions and they will already have been taken up by the GPT protective partition and the 3 primary FAT 32 partitions.  OS X uses GPT aand will see this last partition correctly, however, MBR cannot show it.

6) A side effect of pre-partitioning this way is that the 200MB (for Win7 RC) and 100MB (for Win7 RTM) “System Reserved Partition” will no longer get created.  Some people consider this an annoyance so this would be a good thing for them.

7) You can now proceed to format one or all 3 partitions via the Windows 7 installer.  This will turn them into NTFS, and allow install of Windows 7 on them.

8 ) NOTE: If you had installed OS X in Step 3, before booting into the Windows 7 Install DVD, the machine will default to booting in OS X, so you should hold down the Alt/Option key to see the Windows partition and boot from it instead.


Filed in Modbook, OS, OS X, Windows | No responses yet

DLL handling in Windows x64: The Big Gotcha

The Webmechs Editor on Nov 7th 2009


I had a nasty time trying to get the PHP module to run under Apache 2.2 in Windows 7 x64.  Specifically, I kept getting a “php_mysql.dll could not be loaded” error. After some sleuthing, decided to use Dependency Walker to help figure out what was wrong.  It turns out that I had installed the 64-bit version of MySQL and so it was trying to load the 64-bit version of libmysql.dll.  So instead, I must use the 32-bit version of libmysql.dll.  Traditionally, the way to do this is to manually copy libmysql.dll over to the \Windows\System32 directory, and after reading the entry below, I realized I was going to save myself countless hours because I saw this before I was going to attempt the copy:

http://blogs.msdn.com/ashishme/archive/2009/04/01/32-bit-vs-64-bit.aspx

In a nutshell, what this means is that on 64-bit Windoze, you should copy your 32-bit dlls into \Windows\SysWOW64 rather than \Windows\System32 otherwise, your 32-bit programs will never find them.  Why?  This is because all 32-bit programs running on Windows x64 are handled by the WOW64 emulator which transparently maps all access to \Windows\System32 to \Windows\SysWOW64\Windows\System32 on Windows x64 is, ironically, reserved for 64-bit dlls.  MS claims this had to be done for compatibility reasons.



Filed in OS, Windows | No responses yet

Installing Windows 7 on a Modbook / Macbook

The Webmechs Editor on Jun 21st 2009


My Modbook from OCW took less than five days to arrive.  Less than five days after receiving it, it also saw a ~USD100 price drop.  Lol!  Can’t win ‘em all.

So anyway, one of the priorities was to get Windows working on this machine.  Since the Modbook has 4GB on it, I elected to install a 64-bit Windows OS on it to make full use of the RAM.  Even though some of the info out there may lead you to think that only 64-bit Vista is supported, it turns out that Windows 7 x64 RC installs and works great on the Modbook (and of course on the Macbook as well).

Just so we’re clear on the hardware environment, the Macbook base for this machine I have is the 2Ghz Core 2 Duo with the Nvidia 9400M graphics chipset and it comes with the Leopard OS X 10.5.6 DVD.  Following are the steps I took to get things working.  Steps 1-3 are covered in the Boot Camp Setup and Install Guide although Step 3 will be a bit different.

Step 1. Use Boot Camp Assistant to create the partition for Windows 7

Step 2. Boot from the Windows 7 DVD and install Windows 7 in the usual manner

At this point, after the stock Windows 7 install, the modbook’s digitizer and WiFi actually work without worrying about drivers, a very pleasant surprise!  However, there are certain glitches you may encounter.  The optical out on the left side of the modbook will turn on which may be a battery drain.  No sound even if sound drivers seem to be installed already.  These two are easily fixed it turns out by installing the drivers from the Mac OS X Install DVD - Step 3.

Step 3. At this point, if you were installing one of the “supported” OSes (e.g. Vista or XP), you just have to click on Boot Camp\setup.exe in the Install DVD.  Under Windows 7 however, the setup.exe refuses to run complaining about incompatibility.  You can be sneaky about it and just directly run \Boot Camp\Drivers\Apple\BootCamp64.msi which will work.

Step 4. For my particular Modbook model, I also had to separately run \Boot Camp\Drivers\NVidia\NvidiaMobileSetup64.exe and \Boot Camp\Drivers\NVidia\NvidiaChipset64.exe to get the graphics and chipset drivers installed.  If you want even newer graphics drivers, you can download the latest Nvidia mobile drivers from nvidia.com itself.

At this stage, everything should be pretty much working except in my case, I had one additional important hurdle to overcome.  By clicking on the Boot Camp icon in the notification tray, you will be able to boot back to OS X from Windows 7.  The reverse was, however,  sadly not possible.

You are supposed to boot back to Windows 7 from OS X by clicking on System Preferences | Startup Disk, but in this case, the Windows partition wouldn’t show up there.  You can still choose which OS to boot by plugging in a USB keyboard and holding down the Option key (equivalent to Alt on a PC keyboard) or using rEFIt, but these are very suboptimal solutions for a keyboard-less tablet.  It turns out the way to get around this and have essentially the same function as Startup Disk is to manually bless the Windows partition instead via the command line:

sudo bless --mount /Volumes/NameOfWindowsHD --setBoot --legacy

You should be able to put this in a clickable script (haven’t figured out how to do that in OS X yet).  Now we are in computing nirvana.


Gout Herbal Treatment


Filed in Hardware, Modbook, OS, OS X | 2 responses so far

Setting up Slackware on a VPS (Part 2, using installpkg and getting packages)

The Webmechs Editor on Jun 1st 2009


The most basic thing one needs to learn when setting up Slackware (on a VPS, especially) is how to get various packages and install them.  This is most easily done via the wget and installpkg commands.

http://slackware.com/getslack has a list of mirrors where you can get slackware packages. Packages will be found within a directory named slackware-VV/slackware/X where VV is the Slackware distribution version and X specifies the package category.

The relevant package categories for VPS hosting are as follows:

a - base packages (VPS templates will already have installed most of the needed packages here)
ap - common applications
d - development (gcc, python, perl, ruby, etc…)
f - faqs and how-tos
l - libraries
n - networking (includes networking utilities and daemons such as Apache)

The file slackware-VV/Slackware-HOWTO will have more comprehensive info on this.  What I recommend doing is to create a directory downloaded-packages/ under /root where you store all your downloaded packages.  Once in there you can execute wget to fetch the packages you want.  For example, if you choose to download the mysql package from the pair.com mirror listed at http://www.slackware.com/getslack/list.php?country=USA, you can type:

wget http://slackware.mirrors.pair.com/slackware-12.2/slackware/ap/mysql-5.0.67-i486-1.tgz

Installing the package is as easy as:

installpkg mysql-5.0.67-i486-1.tgz

It just unpacks the .tgz file and puts the package’s files in the correct directory locations.  It doesn’t check for dependencies and generally doesn’t whine or try to be smarter about it than you.  Just the way the gods intended it to be.

Two additional files you should know about are slackware-VV/slackware/PACKAGES.TXT and slackware-VV/slackware/MANIFEST.bz2. PACKAGES.TXT contains a description of the each package you might be looking for together with the directory it is under.  MANIFEST.bz2 is a complete list of every single file in every single package.

Possibly the most important Slackware tip to know is: If you see an error message complaining that so-and-so file is missing or cannot be found, you can search for it in MANIFEST.bz2 to know which package you need to install. *This* is *the* most educational and satisfying way to learn about what packages depend on which other ones, and in practice it has yet to fail me. The catch here is that you should be able to know where such error messages may be found (which will be dealt with in a later post of this blog series).

A quick way to search inside MANIFEST.bz2 is to do: bzcat MANIFEST.bz2 | less or bzcat MANIFEST2.bz2 | grep xxx.   See this for a walkthrough on the process.


Filed in Hosting, Linux, OS, VPS | No responses yet

Setting up Slackware - Server OS Field Stripping (Part 1, intro)

The Webmechs Editor on Jun 1st 2009


On VPS hosting, using an administration panel (e.g. cPanel, Plesk, Interworx, DirectAdmin, etc…) together with a distro such as CentOS/Debian/Ubuntu is the popular choice.  This is the conservative decision, but sometimes this just hampers flexibility to an unacceptable degree.  You are often tightly constrained regarding the versions of software you can use.  In my present case, something as fundamental as using Python 2.5 was not really a viable option under such setups.  I could try to install a second instance of Python but this is a very unwise thing to do imo and runs the risk of major breakage.  For example, I really hate to think of the things that could happen when the panel tries to update itself.

For the ultimate in flexibility, nothing comes close to Slackware.  People often shy away from setting up a server with Slackware on it because it requires doing a lot of things from scratch and might seem to be too much work.  But the advantages *are* there.  For one thing, admin panels impose serious version constraints on the software installed on your OS.  Even if you do not use a panel however, the package dependency structure of all other distros - with the exception of Slackware - can still make mixing/matching different software versions an exercise in futility.

The one thing I realized is that while Slackware does require you to setup many things from scratch, once you get the hang of it, it is essentially like field-stripping, can be done very very quickly, and largely the same process even from one version to another.  The quote in the link reads “… people were impressed many years ago with how easy it is to tear down a Model 1911 Colt pistol, they are smitten with the elegant simplicity of the M1 Garand…” and the same feeling applies once you are familiar with the elegant simplicity of Slackware.

Outlined below are the basic skills you need to master.  Once you get the hang of them, you will come to know the bliss of not relying on the slow bloat of a panel like Plesk and the untrammeled freedom to deploy pretty much whatever technologies you like on your server.

Skill #1 Using installpkg

Skill #2 Info and download location of packages and files

Skill #3 Common packages and their dependencies (easier than you think with Slackware) (article to follow)

Skill #4 Location of error and status logs (article to follow)

Skill #5 Package specific knowledge (e.g. Apache, PHP, MySQL, Python) (article to follow)

Skill #6 Setting up networking (article to follow)



Filed in Hosting, Linux, OS, VPS | No responses yet

Microsoft’s 3-front War, Part 1: The Battle for the Operating System - Windows vs. OS X

The Webmechs Editor on Mar 17th 2009


This is the first of a multi-part blog series where I discuss Microsoft’s battle on 3 fronts with 3 of its most important strategic competitors.  I believe everyone knows which 2 companies Microsoft are competing against on the first two fronts, but very few pundits seem to have caught on as to how important, strategic and exciting the the 3rd front is going to be and who Microsoft is competing against there.

I exclude Linux from this discussion, not because it hasn’t made important inroads, but because I’d like to focus on the competition between mega-corporations shepherding the development of technologies with the purpose of dominating market share for a particular niche, rather than “headless” guerilla movements which are more about individuals banding together for the sake of fun and art.

The first front has been with us for the longest time and is the most obvious of them all.  It is, of course, the battle for who gets to supply or control the operating sytem that the world uses.  Microsoft’s success and dominance in this area with Windows(tm) has arguably set a standard for which to measure complete victory for any kind of endeavour.

As of late though, Apple has been challenging that victory.  With OS X and Intel-based Macs, Apple has taken more market share in the operating system space from Microsoft than any company has ever done in history.  Still, that market share is a single digit one.

Its puerile ad campaigns notwithstanding, Apple does not really seem serious about so-called world domination.  Steve Ballmer made an interview comment about how “Apple has its niche, and we have ours”, and he seems to be implying here that Apple, with their appeal to elitism, will always be confined to a minority niche.  Looking at Apple’s outrageous pricing for their machines, I can’t help but agree with his observation, and if OS X market share even cracks 10% (figures which do not factor in Mac users dual booting into Microsoft Windows should be adjusted downwards, just to be wonkish), I will be extremely impressed.

Since all we read in the press as of late is about how Apple ads trounce Windows ads for being hipper, I would like to conclude here that the OS battle has obviously degenerated into boring and meaningless fanboy smearfest trivialities.  Until Apple halves the price of its machines and/or lets OS X run on commodity hardware, it will always be the case that Apple’s market share remains an elite niche garnered and maintained mainly through marketing smoke and mirrors.

To conclude, I just find it unimaginable that Apple or anyone else will ever really claim victory over Microsoft. In fact, it is quite plausible that the whole idea of fighting for OS market share will become irrelevant before anyone can “take over” from Microsoft, which is a key point I will be trying to make later on in this series.


Filed in OS | 2 responses so far

Solaris and OpenSolaris - do they still have a viable future?

The Webmechs Editor on May 30th 2008


The latest buzz around Solaris has whet my appetite for a Sun technology again. With the massive mind and market share that Linux - now virtually mainstream - enjoys, OpenSolaris’ seemingly hopeless position as being #3 behind an already distant second placer (BSD) on the open source OS front made me think that Sun might eventually just decide to throw in the towel. This is not to say that the ubercool technologies in Solaris like ZFS would vanish - heaven forbid - but that Solaris the OS would slowly be left to fade into oblivion. It seems however that Sun has a lot of fight left in them whether it be Java versus .NET or Solaris versus Linux/BSD.

In the “What’s New in OpenSolaris ?” podcast referred to above, I find Dan Roberts summary of exactly what is lacking in the way OpenSolaris is distributed and how it needs to improved to be by far the most amazingly honest and straightforward presentation I have yet heard coming from a corporate person. In the past, I have always found Sun’s marketing and positioning of its technologies (I have Java foremost in mind here) to be done rather halfheartedly and less than 100% forthright.

For example, many years ago, even while trumpeting Java as a write-once-run-anywhere technology, Sun was obviously wary of Linux cannibalizing Solaris sales and totally dragged their feet when it came to making Java (Swing in particular) run well on Linux (or Windows for that matter). Hence, Java-based client computing never really took off. Now that Eclipse, .NET, Mono, Flash and a host of other competitors have arisen, Sun has belatedly seen the light. But of course, they had essentially already shot themselves in the foot. Java never took hold of the desktop (still trying though, bravo…) and handed Microsoft a golden chance to catch up with .NET.

We have historical reasons for worrying that Sun might get cold feet again, but the uniquely cool features found in OpenSolaris are compelling enough, at least on paper, for me to invest time learning a Sun technology again. I’m looking forward to downloading OpenSolaris and trying it out on a spare machine soon. And finally, with the way they have been going at it lately, it seems that Sun’s marketing have finally started waking up and doing (or at least realizing and saying) the right things. Whether they can sustain this or fall back into their old habits of growing complacent after a taste of initial success remains to be seen.

Interesting Solaris related stuff:

Solaris engineers offer personal source-code tours




Filed in OS, Solaris | One response so far