Skip to content

Instantly share code, notes, and snippets.

@mahfuz10
Forked from abelcallejo/README.md
Created March 3, 2024 03:31
Show Gist options
  • Save mahfuz10/069e2fd92f2f5775d58197ef7fbbd90b to your computer and use it in GitHub Desktop.
Save mahfuz10/069e2fd92f2f5775d58197ef7fbbd90b to your computer and use it in GitHub Desktop.

Revisions

  1. @abelcallejo abelcallejo revised this gist May 8, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Create bootable Linux USB using Mac
    # Creating bootable Linux USB using Mac
    ![mac](https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_logo_black.svg "Mac")

    CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.
  2. @abelcallejo abelcallejo revised this gist May 8, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    # Create bootable Linux USB using Mac
    ![mac](https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_logo_black.svg "Mac")

    CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

  3. @abelcallejo abelcallejo revised this gist Apr 17, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@ CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a

    ## 1. Prepare the .iso file

    Download it, copy it, whatever it takes to prepare that Linux OS .iso file
    Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

    ## 2. Convert the .iso file into a .img.dmg
    ```bash
  4. @abelcallejo abelcallejo revised this gist Apr 17, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    # Create bootable Linux USB using Mac

    CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

    ## 1. Prepare the .iso file

    Download it, copy it, whatever it takes to prepare that Linux OS .iso file
  5. @abelcallejo abelcallejo revised this gist Apr 17, 2019. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -51,8 +51,23 @@ Make sure to note the device that identifies the flash drive. In this case it is
    ```bash
    diskutil unmountDisk /dev/disk2
    ```
    **Output**
    ```bash
    Unmount of all volumes on disk2 was successful
    ```

    ## 5. Copy the .img.dmg to the flash drive
    ```bash
    time sudo dd if=linux.img.dmg of=/dev/disk2 bs=1m
    ```
    **Output**
    ```bash
    Password:
    4375+1 records in
    4375+1 records out
    4588007424 bytes transferred in 1720.352991 secs (2666899 bytes/sec)

    real 28m54.116s
    user 0m0.059s
    sys 1m0.412s
    ```
  6. @abelcallejo abelcallejo revised this gist Apr 17, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -46,6 +46,7 @@ diskutil list
    0: FDisk_partition_scheme *31.4 GB disk2
    1: Windows_FAT_32 NO NAME 31.4 GB disk2s1
    ```
    Make sure to note the device that identifies the flash drive. In this case it is `/dev/disk2`
    ## 4. Unmount the flash drive
    ```bash
    diskutil unmountDisk /dev/disk2
  7. @abelcallejo abelcallejo revised this gist Apr 17, 2019. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,6 @@
    Download it, copy it, whatever it takes to prepare that Linux OS .iso file

    ## 2. Convert the .iso file into a .img.dmg
    **Command**
    ```bash
    hdiutil convert -format UDRW -o linux.img linux.iso
    ```
    @@ -22,7 +21,6 @@ Savings: 0.0%
    created: /tmp/linux.img.dmg
    ```
    ## 3. List the drives of the Mac
    **Command**
    ```bash
    diskutil list
    ```
  8. @abelcallejo abelcallejo revised this gist Apr 17, 2019. 1 changed file with 22 additions and 0 deletions.
    22 changes: 22 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -22,10 +22,32 @@ Savings: 0.0%
    created: /tmp/linux.img.dmg
    ```
    ## 3. List the drives of the Mac
    **Command**
    ```bash
    diskutil list
    ```
    **Output**
    ```bash
    /dev/disk0 (internal, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *500.3 GB disk0
    1: EFI EFI 209.7 MB disk0s1
    2: Apple_APFS Container disk1 500.1 GB disk0s2

    /dev/disk1 (synthesized):
    #: TYPE NAME SIZE IDENTIFIER
    0: APFS Container Scheme - +500.1 GB disk1
    Physical Store disk0s2
    1: APFS Volume Macintosh HD 446.8 GB disk1s1
    2: APFS Volume Preboot 37.9 MB disk1s2
    3: APFS Volume Recovery 519.0 MB disk1s3
    4: APFS Volume VM 3.2 GB disk1s4

    /dev/disk2 (external, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: FDisk_partition_scheme *31.4 GB disk2
    1: Windows_FAT_32 NO NAME 31.4 GB disk2s1
    ```
    ## 4. Unmount the flash drive
    ```bash
    diskutil unmountDisk /dev/disk2
  9. @abelcallejo abelcallejo revised this gist Apr 17, 2019. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,17 @@ Download it, copy it, whatever it takes to prepare that Linux OS .iso file
    hdiutil convert -format UDRW -o linux.img linux.iso
    ```
    **Output**

    ```bash
    Reading Master Boot Record (MBR : 0)…
    Reading CentOS 7 x86_64 (Apple_ISO : 1)…
    Reading (Type EF : 2)…
    Reading CentOS 7 x86_64 (Apple_ISO : 3)…
    .........................................................
    Elapsed Time: 30.450s
    Speed: 143.7Mbytes/sec
    Savings: 0.0%
    created: /tmp/linux.img.dmg
    ```
    ## 3. List the drives of the Mac
    ```bash
    diskutil list
  10. @abelcallejo abelcallejo revised this gist Apr 17, 2019. 1 changed file with 9 additions and 5 deletions.
    14 changes: 9 additions & 5 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,27 @@
    # Create bootable Linux USB using Mac

    ## Prepare the .iso file
    ## 1. Prepare the .iso file

    ## Convert the .iso file into a .img.dmg
    Download it, copy it, whatever it takes to prepare that Linux OS .iso file

    ## 2. Convert the .iso file into a .img.dmg
    **Command**
    ```bash
    hdiutil convert -format UDRW -o linux.img linux.iso
    ```
    **Output**

    ## List the drives of the Mac
    ## 3. List the drives of the Mac
    ```bash
    diskutil list
    ```

    ## Unmount the flash drive
    ## 4. Unmount the flash drive
    ```bash
    diskutil unmountDisk /dev/disk2
    ```

    ## Copy the .img.dmg to the flash drive
    ## 5. Copy the .img.dmg to the flash drive
    ```bash
    time sudo dd if=linux.img.dmg of=/dev/disk2 bs=1m
    ```
  11. @abelcallejo abelcallejo created this gist Apr 17, 2019.
    23 changes: 23 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # Create bootable Linux USB using Mac

    ## Prepare the .iso file

    ## Convert the .iso file into a .img.dmg
    ```bash
    hdiutil convert -format UDRW -o linux.img linux.iso
    ```

    ## List the drives of the Mac
    ```bash
    diskutil list
    ```

    ## Unmount the flash drive
    ```bash
    diskutil unmountDisk /dev/disk2
    ```

    ## Copy the .img.dmg to the flash drive
    ```bash
    time sudo dd if=linux.img.dmg of=/dev/disk2 bs=1m
    ```