Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

2008-03-07

Formatting Large Volumes Using FAT32

First, some background (Executive Summary below)

During this weekend I purchased a Western Digital My Book Home Edition 500GB. This is the triple-interface model that includes FireWire 400 and eSATA in addition to USB 2.0.
I wanted the FireWire model since it's faster than USB 2.0, and connecting a FireWire drive in a Mac is the same as connecting a USB one. Just perform these two easy steps - connect cable, wait 3 seconds.
Anyway, this is just a prelude to the story, since this drive came pre-formatted with FAT32 to suit both Mac and Windows computers, so I didn't have to format it. Western Digital also sells some drives pre-formatted with HFS+ and some with NTFS, by the way.

The next thing I wanted to do after setting up the My Book was to format my old 60GB NTFS external drive using FAT32, so that I could use it with both computers.
I copied it's contents over to the 500GB drive (OS X has read-only access to mounted NTFS volumes) and plugged it into a Vista machine to format it as one big FAT32 volume.
This is when I found out that Windows Disk Management allows you to format drives larger than 32GB using only NTFS.
So I can use a 500GB FAT32 drive in Windows, but I can't format a 60GB one. This also means by the way, that if you re-partition a 500GB drive you bought, and you don't know how to bypass this limitation, you're basically doomed to creating ~15 32GB partitions to use your drive, unless of course you use NTFS.

I've done my research+trial+error and eventually used my Macintosh to format the drive for Windows. Sort of poetic justice.
The 500GB monster eventually got converted to HFS+ since it's about 2 times faster in writes compared to FAT32. This is no official benchmark: I just monitored the HD read/write sustained speeds while copying files during setup.

Executive Summary

Windows XP/2000/Vista don't allow creating FAT32 partitions larger than 32GB. This is to promote NTFS, and because FAT32 becomes slower as volume size increases. Reading/Writing of any volume size is possible.

If you want to format a drive larger than 32GB with FAT32, you have the following choices:

  1. Run the Windows XP installer from the CD - just make sure you quit it in time just after "preparing" the drive for installation.
  2. Use any Linux bootable CD - fdisk can do it. If you can boot into Linux, you can also Google for instructions about using fdisk so I'll stop here.
  3. Use the free FAT32 Formatter. Small windows utility that does what its name implies. I didn't use it myself, but it should do the trick.
  4. Use your Mac. The Mac "Disk Utility" can format FAT32 of any size.
    Open Disk Utility, select the volume, click erase, and select "MS-DOS (FAT)" as the file system.
    Leopard also includes the fdisk utility so you can use that one if you are some kind of a masochist.
I didn't want to include detailed instructions, since I assume people should know how to use Google and common sense, but if someone has questions about anything, the comments are open as always.

P.S. I published the previous post by a clicking mistake, deleted it right away, checked that it wasn't there - only to find out that blogger entered 3 identical posts, marked 2 as drafts and one got published anyway.

2008-03-06

Misleading Error Message When Running 32bit Applications on 64bit Ubuntu/Linux

Short version (aka, Executive Summary)

If you try to run a 32bit program under 64bit Ubuntu, there is a chance you might see this misleading error message:

-bash: ./executable_filename: No such file or directory

What the shell is actually trying to say is "You can't run 32 bit applications here without installing support for 32 applications!".

Longer version

We purchased the Webyog's MONyog MySQL monitoring tool, after some trial version testing in a Windows environment. When trying to run it on one of our Ubuntu servers, I got this:

myuser@myserver:~/MONyog/bin$ ./MONyog-bin
-bash: ./MONyog-bin: No such file or directory

I checked again: the file was there, permissions were okay. Hmm. Why was bash saying the file wasn't there? Here it is! It's not like the error came from the application, it was bash itself saying that it's not found.
I googled for a while till I opened a support ticket at Webyog, and this is how I found out the real reason. The solution is to install support for 32 bit applications which is package called ia32-libs-sdl (which also installs a number of prerequisites). Once it's installed, the program works.

I'll use this opportunity to praise Webyog's support, which was fast and to the point. I got my initial reply with an explanation after few hours, and the solution the next day - without having to chase them for it.