Here is the full instruction to create a bootable Arch Linux USB drive using the cat command:
Step 1: Find the name of your USB drive
Open a terminal and run the following command to find the name of your USB drive:
ls -l /dev/disk/by-id/usb-*
This will list all USB drives connected to your system. Note down the name of your USB drive, e.g. /dev/disk/by-id/usb-Kingston_DataTraveler_2.0_408D5C1654FDB471E98BED5C-0:0.
Step 2: Check if the USB drive is mounted
Run the following command to check if the USB drive is mounted:
lsblk
If the USB drive is mounted, you will see a mount point listed. If it is mounted, unmount it first using the following command:
sudo umount /dev/disk/by-id/usb-My_flash_drive
Replace /dev/disk/by-id/usb-My_flash_drive with the actual name of your USB drive.
Step 3: Create the bootable USB drive using cat
Run the following command to create the bootable USB drive:
sudo cat path/to/archlinux-version-x86_64.iso > /dev/disk/by-id/usb-My_flash_drive
Replace path/to/archlinux-version-x86_64.iso with the actual path to the Arch Linux ISO file you downloaded, and replace /dev/disk/by-id/usb-My_flash_drive with the actual name of your USB drive.
Step 4: Ensure buffers are fully written to the device
After the cat command completes, run the following command to ensure buffers are fully written to the device:
sudo sync
This will ensure that all data is written to the USB drive before you remove it.
Step 5: Verify the USB drive
Your USB drive is now ready to use as a bootable Arch Linux installation media. You can verify that the USB drive is bootable by restarting your computer and setting the USB drive as the first boot device in your BIOS settings.
Note: To restore the USB drive as an empty, usable storage device after using the Arch ISO image, you will need to remove the ISO 9660 filesystem signature by running the following command as root:
sudo wipefs --all /dev/disk/by-id/usb-My_flash_drive
Then, you can repartition and reformat the USB drive as needed.