How to create bootable USB drive for Arch Linux
We will create a bootable installation media of Arch Linux that we will use to install Arch on our machine.
Plug in a USB drive into your system. Find the block device name of the drive with ‘lsblk’ command.
Look at the storage capacity of each device to identify the USB drive you want to use as installation media. If you can’t identify it, unplug the drive and run the ‘lsblk’ command. Now plug the drive and run the command again. Compare the output of the command, with and without USB drive plugged in, to see identify the new block device that showed up after plugging the USB flash. That’s your device.
Use the ‘dd’ command to write the image to the USB flash drive:
sudo dd if=/path_to_arch_.iso of=/dev/sdX bs=1M
Replace ‘sdX’ with your block device, in my example it’s ‘sde’.
sudo dd if=/home/swapnil/Download/archlinux-2016.12.01-dual.iso of=/dev/sde bs=1M
Once the ISO has been successfully written to the USB Flash drive, edit the BIOS settings of the target computer (where you will be installing Arch Linux) and configure it to boot from the removable drive. If your system has secure boot, please disable it.
Plug your bootable Arch Linux USB Flash drive into the target PC and boot it. If everything does well, you should boot into Arch Linux boot screen. Choose ‘Boot Arch Linux (x86_64)’ from the list. It will open a command line interface.
We will be downloading all packages from the Internet to install our system. We need working network so we can connect to the Internet. If you have Ethernet cable, I will recommend using it to eliminate the complexity of setting up the wireless network. If you don’t have a wired connection, read up. Just one caveat: I am assuming that your system has well supported wireless card; otherwise you will have to install drivers manually and covering all of those is beyond the scope of this article.
Let’s run ‘ifconfig’ or ‘ip link’ command that will list all network devices.
# ip link
Note down the name of the device you want to use. Wired devices will start with something like ‘en’ whereas wireless devices will start with ‘wl’. In my case wired device was ‘enp0s3’ and wireless devices was ‘wlp2s0’.
Run the following command to set-up the wireless device (replace wlp2s0 with the name of your wireless devices)
# wifi-menu -o wlp2s0
Use arrow keys on your keyboard to select the wireless network you want to connect to and click OK (tip: mouse won’t work in the command line, hit enter or use the ‘Tab’ key to highlight the ‘Ok’ button and hit enter).
The next window will give you the option to change the name, leave it as it is. Enter the wireless password in the third window. You should be connected. Let’s ping Google to see if we are connected:
# ping -c 3 www.google.com
If you get output, congrats you are connected. It’s time to proceed.