© 2009 admin

How to format a drive to Ext2/Ext3 from a Mac (or Windows)

Why am I doing this?

With the prices of external drives falling faster than the stock market, I decided to invest in a Seagate FreeAgent Desk USB hard drive. I wanted to use my old, trusted 160GB hard drive as a shared storage resource that I can access anywhere from within my home network. In network lingo, it is called a NAS (Network Attached Storage).

A commercial grade NAS is pretty expensive, but the Asus 520gu router comes with a USB port (most routers only have ethernet ports), which opens it up to a number of devices. Converting a USB printer to a shared printer, converting your USB external hard drive to a network drive or both. (BTW, never, ever buy a Belkin hub).

So I bought the Asus 520gu, installed Tomato and everything was hunky-dory!  But, the spare 160GB hard drive was formatted for taking backups from my MacBook (HFS+) and Tomato runs Linux.  Linux can recognize drives formatted either using FAT or its native format Ext2/Ext3, not Mac filesystem, HFS+.

I wanted to partition my hard drive to use both FAT32 and Ext3. FAT32 isn’t a very efficient filesystem. It has a file size limitation of 4GB and more importantly it is from Microsoft.  Linux’s choice, Ext2/Ext3 has no such limitation.  The only difference between Ext2 and Ext3 is Ext3 is a journaling filesystem.  What this means is it has additional safeguards to protect against data corruption, like if you pull out your external drive without unmounting first.

So how do you format a drive to Ext2 or Ext3? Mac (or Windows for that matter) does not have any native tools like Disk Utility, to format a drive to the Linux format.  Enter gparted.

GParted “Live” CD

GParted is a cool free utility to partition and format drives to a variety of filesystem. GParted is a ‘live’ CD. What that means is, you boot into gparted from either a PC or a Mac and gparted would run entirely off your cdrom drive without touching your hard drive. Nothing changes once you boot back to Windows or OS X. Best of all, gparted is Macbook friendly.

What you’ll need:

  1. Mac or Windows PC that can burn CDs
  2. Blank CD
  3. Patience!

Getting started:

  1. Download latest version of gparted
  2. Using Disk Utility on a Mac burn gparted iso into a blank CD
  3. With the CD inside, reboot your Mac
  4. While rebooting keep the option key on the Mac pressed, this will prompt you to choose where to boot from
  5. Choose gparted. Don’t worry nothing is touched on your Mac

1-2

My external drive (/dev/sdc)was formatted for HFS and had two partitions – Mirror and Backup. (There is an additional partition created by Seagate with some Seagate specific firmware – /dev/sdc1)

2

I’m deleting /dev/sdc1, which contained some Seagate specific firmware.

3

I’m deleting the old partitions and  creating two new partitions – one Ext2  and one Fat32

4

6

7

All done! Now remove the cd and boot your mac. When booting press the option key to select OS X.

Your external hard drive is now has two partitions. One formatted to Ext2 and one to Fat32.  If you directly connect your hard drive to windows or Mac, you’ll be able to see the Fat32 partition, but not the Ext partition as Macs and Windows can’t recognize Linux filesystems.

A word of caution: In gparted, when you pick a device to format, be very careful.  You don’t want to pick your PC or Mac’s internal hard drive to partition, pick the external drive.  I don’t have to tell you this, but once formatted, all your existing data is gone forever, so make sure you take adequate backups.

  1. Setting Up A Low Cost NAS Using Tomato

5 Responses to “How to format a drive to Ext2/Ext3 from a Mac (or Windows)”

  1. eric says:

    I’ve only been running my wl-520gu NAS for a week now, but I love it w/tomato.

    I use the NAS for small file transfers; it’s nice not to have to run back and forth to make sure my 2nd computer is setup for ftping. I also use it great instant backup of files before I get a chance to do a more secure backup. If I ever need to move more than a gig or so, I just directly connect the laptops so I get gigabit speed.

    I’m currently using an 8gb flash drive rather than a USB hard drive. I like the low energy consumption.

    Thanks for your continuing articles about the router, Tomato, NAS. This router has been the best $30 I’ve ever spent and your site has saved me a few hours.

  2. eric says:

    I’d be interested in reading about your take/strategy on setting up QoS.

  3. admin says:

    Thanks Eric for your kind words.

    On QoS, I setup a surveillance system that starts recording anytime motion is detected and saves the clip in the NAS I setup. Thinking of changing this to a remote FTP site. I’m still studying how this affects the network. If I find anythng I’ll certainly post.

    I agree on the Asus 520gu. Best value for money.

  4. Stephen says:

    Does the gparted iso work on a PPC Mac?

  5. Tim says:

    HI, thanks for your excellent instructions. I’ve tried just what you said with a 1TB drive. It seemed to go OK. But every time I try the drive hooked up to my Sat recorder as an external storage device it says that the drive is formatted as ext3 (which is what I want) and as FAT16/32 and that it must be reformatted as only one type.
    I’ve tried it several times and it only appears to be formatted with no partitions in ext3 (although for some reason it always says that 23 gig is being used, but Ive no idea what for).
    Does anyone have any clues.
    Ive used GParted latest version, booted live from CD and the external hardrive is a Iomega LDHD-UP.
    Thanks

Leave a Reply

CAPTCHA image