Create a bootable USB device on Linux

Create a bootable USB device which you can then use to install Red Hat Enterprise Linux on other machines. This procedure overwrites the existing data on the USB drive without any warning. Back up any data or use an empty flash drive. A bootable USB drive cannot be used for storing data.

Before you begin

  • You have downloaded the full installation DVD ISO or minimal installation Boot ISO image from the Product Downloads page.
  • You have a USB flash drive with enough capacity for the ISO image. The required size varies, but the minimum recommended USB size is 16 GB.

Procedure

  1. Connect the USB flash drive to the system.
  2. Log in as a root user:
    $ su -

    Enter your root password when prompted.

  3. Find the device node assigned to the drive in the log of recent events. Messages resulting from the attached USB flash drive are displayed at the bottom of the log. In this example, the drive name is sdd.
    # dmesg|tail
    [288954.686557] usb 2-1.8: New USB device strings: Mfr=0, Product=1, SerialNumber=2
    [288954.686559] usb 2-1.8: Product: USB Storage
    [288954.686562] usb 2-1.8: SerialNumber: 000000009225
    [288954.712590] usb-storage 2-1.8:1.0: USB Mass Storage device detected
    [288954.712687] scsi host6: usb-storage 2-1.8:1.0
    [288954.712809] usbcore: registered new interface driver usb-storage
    [288954.716682] usbcore: registered new interface driver uas
    [288955.717140] scsi 6:0:0:0: Direct-Access     Generic  STORAGE DEVICE   9228 PQ: 0 ANSI: 0
    [288955.717745] sd 6:0:0:0: Attached scsi generic sg4 type 0
    [288961.876382] sd 6:0:0:0: sdd Attached SCSI removable disk
  4. If the inserted USB device mounts automatically, unmount it before continuing with the next steps. For unmounting, use the umount command. For more information, see Unmounting a file system with umount.
  5. Write the ISO image directly to the USB device:
    # dd if=/image_directory/image.iso of=/dev/device
    • Replace /image_directory/image.iso with the full path to the ISO image file that you downloaded,
    • Replace device with the device name that you retrieved with the dmesg command.

      In this example, the full path to the ISO image is /home/testuser/Downloads/rhel-10-x86_64-boot.iso, and the device name is sdd:

      # dd if=/home/testuser/Downloads/rhel-10-x86_64-boot.iso of=/dev/sdd

      Partition names are usually device names with a numerical suffix. For example, sdd is a device name, and sdd1 is the name of a partition on the device sdd.

  6. Wait for the dd command to finish writing the image to the device. Run the sync command to synchronize cached writes to the device. The data transfer is complete when the # shell prompt appears. When you see the prompt, log out of the root account and unplug the USB drive. The USB drive is now ready to use as a boot device.