Uncategorized

Easiest Arch Linux Manual

0

How to create bootable USB drive for Arch Linux

We will create a bootable installation media of Arch Linux that will be used for installing Arch on our machines. We need a working machine running macOS, Linux or Windows to create the bootable USB drive of Arch Linux.

First, download the latest ISO of Arch Linux.

Then insert the USB drive that you want to use as installation media into your system. Depending on the operating system, there are different ways to create the bootable USB drive of Linux.

Create Arch Linux bootable USB drive using Linux

If you are running Linux based distribution on your system, then we will do it command line way.

Find the block device name of the USB drive with the ‘lsblk’ command.

lsblk

[Tip: In the output you can easily identify the USB drive by looking at the storage capacity. If you still can’t figure out which one is it, unplug the drive and run the ‘lsblk’ command. Now plug the drive and run the command again. Compare the output of the commands, with and without USB drive plugged in, the new device that popped up after plugging in the USB drive is your device ;-)]

Now we will write the Arch Linux iso image to the USB drive using the DD command:

sudo dd if=/arch_.iso of=/usb_drive bs=1M

Replace ‘arch_.iso’ with the actual path of the downloaded Arch Linux iso file and ‘usb_drive’ with the block device name.

Example:

sudo dd if=/home/swapnil/Download/archlinux-2016.12.01-dual.iso of=/dev/sde bs=1M

Create Arch Linux bootable USB drive using macOS

macOS is pure UNIX, so you can use the Terminal to create the bootable drive of Arch Linux. Plug in the USB drive, open the Terminal app and use ‘diskutil’ command to find the USB drive:

diskutil list

As I explained earlier, you can easily identify the the USB drive by looking at the storage capacity in the output of the above command. If you still can’t figure out which one is it, unplug the drive and run the ‘diskutil list’ command. Now plug the drive and run the command again. Compare the output of the commands, with and without USB drive plugged in, the new device that popped up after plugging in the USB drive is your device 😉

On macOS, a 4GB USB Flash drive will look like this:


/dev/disk3 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: Apple_partition_scheme *4.0 GB disk3
1: Apple_partition_map 4.1 KB disk3s1
2: Apple_HFS 2.5 MB disk3s2

Now unmount the drive:

diskutil umountDisk /dev/disk3

Then use the ‘dd’ command to write the Arch Linux iso to the drive:
sudo dd if=/arch-dual.iso of=USB_drive bs=1m

Example:

sudo dd if=/Users/swapnil/Downloads/arch-dual.iso of=/dev/disk3 bs=1m

[Note: If you are running Windows 10, you can use Win32 Disk Imager or any such tool to create the bootble drive of Arch Linux.]

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. Arch Linux supports for UEFI and legacy BIOS mode. In this tutorial I will cover booting from both UEFI and legacy BIOS.

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.