38

How can I format a USB disk as ext3 using OS X Yosemite?

I want to use it on another system that is linux based but I wish to format it first before connecting to the linux system.

54

I needed to format a partition to ext3 on my USB flash drive. The drive was already formatted, and had 3 partitions, and I wanted to convert partition 1 from FAT32 to ext3.

  1. install brew, visit http://brew.sh/
  2. install e2fsprogs using brew install e2fsprogs
  3. figure out the name of your partition or drive using diskutil list -- in my case, my partition had was on disk2 and had the identifier of disk2s1
  4. sudo $(brew --prefix e2fsprogs)/sbin/mkfs.ext3 /dev/disk2s1 but you may need to change the drive from disk2s1 to the partition or drive that you want to format. This command will ask you to verify the name of the partition, just to be sure :)

Note, if you're able to ssh/telnet into your router running dd-wrt or tomato, you can already directly run mkfs.ext3 directly in the router, and don't need to do anything on your mac at all

  • THANK YOU! This info was super useful, and I haven't seen it anywhere else in all my googling. BTW, my OpenWRT on WRT1900acs does not find e2fsprogs so I was struggling to get my USB formatted. – MikeSchinkel May 28 '16 at 0:56
  • 15
    I got stuck on this getting this error: '/dev/disk2: Resource busy while setting up superblock', until I tried 'diskutil unmountDisk disk2' then the following command worked 'sudo $(brew --prefix e2fsprogs)/sbin/mkfs.ext3 /dev/disk2' – jackkav Jun 1 '16 at 14:25
  • Especially appreciated the DD-WRT note as it saved me the step of fetching the drive from the router to partition and format on my OpenWRT. – Crates May 9 '17 at 3:29
  • The last line(about telnet into the router) actually can be more helpful if mentioned at beginning:) – Lei Zhang Mar 28 at 5:37
6

One totally free way of doing things would be to install VirtualBox and create a virtual machine which will run your favourite Linux distro. You should be able to do this with minimal impact on disk space.

I'd personally just use a common file format such as the universal FAT file system but obviously this isn't the answer you're looking for.

  • 6
    This falls short if you're trying to format an SD Card, as it runs on the PCI-E bus and can't be passed through to virtual machines. – ashgromnies Jun 6 '15 at 7:16
3

There is the commercial product Paragon ExtFS for Mac with which you can format even ext4 - I use it from time to time to access ext3 external hdd and it works quite well.

From their website:

Full read/write access to Ext2 / Ext3 / Ext4 partitions under Mac® OS X
Transfer rate is similar to the native Mac® OS Extended file system performance
Auto-mounting of Ext2 / Ext3 / Ext4 volumes
Full support of OS X 10.10 Yosemite!

No affiliation or whatsoever.

There is also OSXFuse as described in this artticle, but I do not think you can format a hdd with it.

Otherwise I agree with ScunnerDarkly - install linux in a virtual machine - or run a live disk (e.g. ubuntu) in a Virtual Machine, which might be the easiest.

0

If you acquire Paragon ExtFS, you get a series of osxfuse file systems.

It will add the following filesystems to your system can be seen by Disk Utility to /System/Library/Filesystems:

UFSD_EXTFS                      Extended Filesystem 2
UFSD_EXTFS3                     Extended Filesystem 3
UFSD_EXTFS4                     Extended Filesystem 4

Run diskutil Listfilesystems to view all supported systems installed on your machine.

Find your drive device:

diskutil list

Assuming it is /dev/disk2 You can just type: diskutil eraseDisk for the expected input:

Usage:  diskutil eraseDisk format name [APM[Format]|MBR[Format]|GPT[Format]]
        MountPoint|DiskIdentifier|DeviceNode

I would run:

diskutil eraseDisk UFSD_EXTFS4 BananaPi /dev/disk2

When you are done you should see something like this diskutil list

/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 GB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:           Linux Filesystem                         3.6 GB     disk2s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk2s3

You can then (supposedly--according to the Paragon manual) mount it (unfortunately only with paragon tools):

/usr/local/sbin/mount_ufsd_ExtFS /dev/disk2s2 /Volumes/mountPoint 

Addendum

Read-Only Solution

https://github.com/gerard/ext4fuse

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .