MemTest86 Technical Information

Creating a MemTest86 bootable USB Flash drive in Linux/Mac

  1. Download the current Memtest86 package as a Zip file from this page.

  2. Unzip the file. Inside the Zip there is a "disk image" file. For the free edition of MemTest86, this file is called, memtest86-usb.img

  3. Insert a USB flash drive into a USB slot. It needs to be at least 512MB in size.
    Warning: The contents will be overwritten in the next steps.

  4. Determine which device the USB drive is assigned as by opening the Terminal and typing the following command. Don't get this wrong as you don't want to overwrite the wrong drive.

    diskutil list

    diskutil list

  5. Unmount all volumes on the USB drive by typing the following command:

    diskutil unmountDisk <device_name>

    In the example above the device name is /dev/disk2

  6. As the root user, use the 'dd' command to write the image to the USB drive. For example,

    sudo dd if=<input_file> of=<device_name> bs=4m

    Note: For Ubuntu, the bs=4M must be capitalised.


    <device_name> is the device the USB key is assigned to. Use the base device (ie. /dev/disk2) not a partition designation (ie. /dev/disk2s1). bs= block size of data transfer. Larger block sizes are faster.

    <input_file> is the file path for the input image file. (E.g: ~/Downloads/memtest86-usb.img)

    Warning: all data on the USB key will be lost.
    3rd warning! Make sure that the device used in the dd command above is correct. The consequence of picking the wrong drive are potentially disastrous. Total and compete data loss from your hard drive, if you overwrite the wrong drive.

  7. When finished, Reboot your On a Mac, you need to hold down the ALT / Option key on the Mac keyboard while powering on the machine to boot from USB.

    On newer Macs from 2019(*) with the Apple T2 Security Chip, you may need to change the SecureBoot settings for MemTest86 to boot. Please see the following page for instructions:

    (*) These Mac computers have the Apple T2 Security Chip:

    Allow booting from external drives and allow booting from non-apple software:

    allow booting