Skip to content

Instantly share code, notes, and snippets.

@sv99
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sv99/108eb3b34c7f231d81bc to your computer and use it in GitHub Desktop.
Save sv99/108eb3b34c7f231d81bc to your computer and use it in GitHub Desktop.

dosfstools on OSX

OSX 10.9 Maveric not exist mkfs.vfat.

dosfstools - now orphaned Linux version utilities for making and checking MS-DOS FAT filesystems.

OSX users using diskfstool? hdutil and hdiutil.

Problems

  1. Not worked ioctl(dev, HDIO_GETGEO, &geometry) unable to get drive geometry
  2. geometry.sectors and geometry.heads you may get from nondirect calculation (sample in the [diskdev-cmds] (http://www.opensource.apple.com/source/diskdev_cmds/diskdev_cmds-557.3.1/)), but geometry.start needed for set hidden_sectros not available

Porting

  1. Based on last version dosfstools 3.0.26
  2. Add some linux headers
  3. Remove atari support
  4. Remove fatlabel utility
  5. mkfs.fat not worked on real drives - only with images -C option and loop devices

Install with homebrew

$brew creat https://github.com/sv99/dosfstools-osx.git
require "formula"

class Dosfstools < Formula
  homepage "https://github.com/sv99/dosfstools-osx"
  url "https://github.com/sv99/dosfstools-osx.git"
  sha1 ""

  def install
    system "make", "install"   
  end

end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment