How To Dual-Boot Archlinux

for windows
back?

Click on the boxes to copy

This will serve as a guide to installing archlinux if you are a windows user. First of all, lets start with some prereqs. Most of these need to be checked out or else it just won't work. (it's okay to have lower ram or storage, it just will be a bit laggier)

Now that that is out of the way. Lets go!

Step 1

Download balena etcher or rufus. In my personal experience, I did not have a good time with balena etcher and so I used rufus. But please pick whichever works for you.

Step 2

Download the archlinux .iso file. The second one would be the one you would download, 'archlinux-2024.11.01-x86_64.iso' or this one 'archlinux-x86_64.iso'.

Step 3

Move the iso file into your usb and use balena etcher or rufus on that usb and configure your settings there depending on whether your system is BIOS, or UEFI. You are basically making a bootable usb. After doing, you should get some other files other than your iso file inside your usb.

Step 4

Make sure to have disabled secure boot for your computer. You have to figure out how to get into your BIOS or UEFI menu for your specific computer. After that, just find the secure boot option and make sure that it is disabled. If your computer says that this is dangerous, don't worry about it. All that secure boot does, is that it makes it so that when your computer starts, there are no virus or things that run when your computer starts, basically. Disabling secure boot is very IMPORTANT. Archlinux WILL NOT run if it is enabled. During this time, you might also want to change the boot order, and make your usb be the primary boot. That way, if your usb is in, then it will always boot from the usb first, and not from windows. (Optional). You probably won't have to do step 6 if you do this, and it successfully boots. Just restart your computer after step 5

Step 5

Open disk management. Find your disk. Right click on it, then click on shrink volume. Find "Enter amount of space to shrink in MB", and have at least 40 GiBs, or more, put in there. Then click shrink.

Step 6

Go to your boot menu, by either searching for it or pressing a designated key on your keyboard while windows is starting (This is usually the F8 key). Click on Use a Device, find your usb, and click it.

Step 7

If everything worked correctly, you should soon see an archlinux menu. Click the install medium. Then connect to the internet. Type in these following commands:

iwctl

Then

device list

to find your device that connects to the internet (usually is wlan0).

station wlan0 scan station wlan0 get-networks

Then connect to the desired network by using

station wlan0 connect ""

(put the name of the network in the ""). Ping a website to check if the internet is working. For example

ping google.com

Step 8

Next up, we have to partition the usb. The usb will be partitioned (divided) into three parts. The First is going to be for the bootloader and other important system things. The second will be for swap, which is like backup ram in case your system starts using up too much ram. Remember, it's not new/extra ram, it's still the ram in your system. The third and final one will be for the linux filesystem. This last one will have the most data allocated to it since it's where you're actual files will be located. Here's how much storage you should put in each one:

Here's how you would do it. Type in the command line

cfdisk

This will open a menu. Hopefully you will be able to see your usb partition. If you see something like NVMe, that is most likely your actual disk on your computer, usually the usb is sda, but it can also be NVMe. Press on delete. This should then turn into "free space". Afterward, press on new, then partition the amount recommended, press type, find EFI system, click on it. Then hover over "free space" once more, press new, allocate the amount recommended, press type, find linux swap. Finally, press new, allocate the recommended amount, press type, then linux filesystem. Press write, to write everything.

Use the following commands to finish up the process.

mkfs.ext4 /dev/sda3

/dev/sda1 should be whichever partition that you just partitioned with cfdisk that has the linux filesystem, this is also called the root partition. That command turns the filesystem to filesys-type ext4, which is a format for the files.

mkfs.fat -F32 /dev/sda1

This one is for your efi system or just your boot sector. It turns it into fat32, another file format. The last two are for the swap.

mkswap /dev/sda2 swapon /dev/sda2

Make sure to change the sda's with your corresponding ones.

Step 9

Make two directories (folders), using

mkdir /mnt

and

mkdir /mnt/boot

The /mnt is for your entire filesystem, while the boot is where you are going to put all of your boot related things, like grub.

Mount your root partition to /mnt and your boot sector to your /mnt/boot, using the following commands:

mount /dev/sda3 /mnt

and

mount /dev/sda1 /mnt/boot

Step 10

Install the base packages

pacstrap -K /mnt base linux linux-firmware vim

generate the fstab, which contains the uuids for things that are like usbs, root (/), and the boot sector. You can add modifiers to the things mentioned.

genfstab -U /mnt >> /mnt/etc/fstab

and chroot in there

arch-chroot /mnt.

Step 11

Configure the system. Set the timezone

ln -sf /usr/share/zoneinfo/theRegion/theCity /etc/localtime

Replace theRegion and theCity with yours. I kinda forgot how to see which cities and regions are available

hwclock --systohc

to sync the time. Now is the time to set the locale.

nano /etc/locale.conf

Do this command and find 'en_US.UTF-8 UTF-8', remove the '#' that is at the start of that line. Generate the locale

locale-gen

and then

echo "LANG=en_US.UTF-8" > /etc/locale.conf

if you're using English. Set the host name by

echo "thehostname" > /etc/hostname

replace thehostname with whatever hostname you want. Set the root's password.

passwd

Don't forget your password.

Step 12

Now time to install grub, the bootloader.

pacman -S grub efibootmgr nano

Then

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

Finally do,

grub-mkconfig -o /boot/grub/grub.cfg

Now you're basically done with the install. But you could always install a few packages and do some extra things before leaving...

Step 13

Here's a command to use

pacman -S networkmanager vim ntfs-3g dosfstools sudo wget curl xorg-server xorg-xinit os-prober base-devel git python python-pip perl clang lld btop sysstat gcc rsync zip unzip tar gzip zstd

You can also add a user to your system. Using root is often frowned upon, so it's best to use a user.

useradd -m -G wheel theusername

and then add a password to it

passwd theusername.

replace theusername with your own username that you want.

Do

nano /etc/sudoers

and remove the '#' from the start of the line

%wheel ALL=(ALL:ALL) ALL

Step 14

That should do it. Now you can exit chroot by using

exit

Afterward, you should restart and then you should get booted into archlinux once more. The recommended actions to take after logging in, is to install a window-manager or desktop environment, examples include hyprland dwm, i3 for window-managers, and kde plasma, gnome for desktop environment. To install them you need to type in

sudo pacman -S packages

replace packages with your desired packages.

Thanks for reading.