Main Menu

Search

LINUX: How to Write Linux ISO To USB Drive In Macbook Using "DD" Command?

Below are steps to write Linux ISO to USB Drive in Macbook/Mac OS

1) Plugin the USD Device to Macbook.

2) Run "diskutil list" command to list the attached USB disk volume

Below is sample command list the attached USB volume
/dev/disk4 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *31.0 GB    disk4
   1:                  Apple_HFS Untitled                31.0 GB    disk4s1

3) Unmount the target volume, in this example it is /dev/disk4s1

sudo diskutil unmount /dev/disk4s1
sudo diskutil unmount /dev/disk4s1
Below is console snippet.
# sudo diskutil unmount /dev/disk4s1

Volume Untitled on disk4s1 unmounted

4) Now run dd command to copy the DVD ISO content to the USB drive volume.

Below is the command to use.
# sudo dd if=Linux.iso of=/dev/disk4s1 conv=fsync oflag=direct status=progress

In above example we are copying Linux9.iso to USB volume /dev/disk4s1 with status bar of copy shown as well.

Below is console snippet.

# sudo dd if=Rocky-8.10-x86_64-dvd1.iso of=/dev/disk4s1 conv=fsync oflag=direct status=progress

  88080896 bytes (88 MB, 84 MiB) transferred 26.003s, 3387 kB/s 
  
When copy is done, you will see following snippet.
# sudo dd if=Linux9.iso of=/dev/disk4s1 conv=fsync oflag=direct status=progress

  14211072512 bytes (14 GB, 13 GiB) transferred 3620.013s, 3926 kB/s   
27761408+0 records in
27761408+0 records out
14213840896 bytes transferred in 3620.559391 secs (3925869 bytes/sec)


5) Eject the USB device once the dd command is completed. Console output in blue.
# diskutil eject /dev/disk4s1

Disk /dev/disk4s1 ejected

6) Unplug the USB drive from the macbook.



Keywords:

USB, drive, thumb, thumbdrive, ISO, copy, copying, image, images, ISOs, dd, commands, mac, mac book, macbook, apple, write, writing, external, device, devices

No comments:

Post a Comment