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

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

  1. 858672 macrumors newbie

    Joined:
    Dec 24, 2011
    #1
    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?

    Thanks
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    'dd' works on OS X. Read the man page:
    https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/dd.1.html

    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:
    https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/sudo.8.html

    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

    Joined:
    Dec 24, 2011
    #3
    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