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.
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.
brew install e2fsprogs
diskutil list -- in my case, my partition had was on disk2 and had the identifier of
diskutil unmountDisk disk2. Note that this is the drive in the listing above, not the partition.
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
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.
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.
With VMWare Fusion 11.1.1 and Ubuntu 18.04 LTS I was able to successfully format a Seagate 4TB Disk connected via USB 3.0 on my Mac OSX 10.13.6 Laptop using gparted to the ext3 fileformat which then later can be read using Fuse ext2 solutions.
Today (2021-01-17) I repeated the procedure and it only took a few seconds on a 4 TB SSD disk
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
UFSD_EXTFS Extended Filesystem 2
UFSD_EXTFS3 Extended Filesystem 3
UFSD_EXTFS4 Extended Filesystem 4
diskutil Listfilesystems to view all supported systems installed on your machine.
Find your drive device:
Assuming it is
You can just type:
diskutil eraseDisk for the expected input:
Usage: diskutil eraseDisk format name [APM[Format]|MBR[Format]|GPT[Format]]
I would run:
diskutil eraseDisk UFSD_EXTFS4 BananaPi /dev/disk2
When you are done you should see something like this
/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