"dd" command - how do I edit the MBR?

Discussion in 'macOS' started by 858672, Jun 12, 2016.

  1. 858672 macrumors newbie

    Dec 24, 2011
    There is a command entitled "dd" that you can run in linux that allows you to edit the MBR, what I require is to dump sector 0 and hex edit 55AA to 55AB then load it back on again for a USB stick.

    An app like HxD https://mh-nexus.de/en/hxd/ would be great or if I can do it via Terminal and manually hex editing that would also do.

    There is a windows app called UStealth (code here https://code.google.com/archive/p/u-stealth/) that does exactly what I need but it needs a machine running windows with a net framework due to how its coded, in a nutshell I need to change the MBR record on a flash drive I use with my Wii U.

    Any ideas?

  2. chown33 macrumors 604

    Aug 9, 2009
    'dd' works on OS X. Read the man page:

    Use the plain device to access MBR block 0.
    Example: /dev/disk2, not /dev/disk2s0, and not any rdisk devices.

    You'll need to write to the disk as root. Use the 'sudo' command for that:

    The disk will probably need to be unmounted when writing to block 0. Use the 'umount' Terminal cmd, or Disk Utility.app for that.

    Plan as if you're prepared to lose everything on the disk. If something goes wrong, you may need to start over.
  3. 858672 thread starter macrumors newbie

    Dec 24, 2011
    Thanks, I'm going to try it out with a spare stick to see how it kicks but wasn't aware that the commands for linux are the same. Will read that link first, thanks.

Share This Page