Home Projects Photography Music Flying

Project Notes

Installed Arch Linux (Without AI Help)

Manual install notes from setting up Arch Linux on a Dell XPS with GRUB, NetworkManager, UEFI boot, and a dual-boot arrangement alongside Windows.

← Back to Projects

These are intentionally preserved exactly as working notes.

# Install Arch Linux ah jeez

1. **Create a live boot USB with the image. Easy.**
	* create space for everything w/ disk utility
2. **Find a way to boot Dell XPS to USB**
3. **To verify that boot mode is UEFI mode:**
	```bash
	# ls /sys/firmware/efi/efivars
	```
4. **Establish a network connection**
	a. test that Arch sees my network interface
		```bash
		# ip link
		```
	b. package 'netctl' with command 'wifi-menu'
		1. dependent on 'dialog'
		2. do not need to install?
		3. command is just 'wifi-menu'
	c. ping a website
		```bash
		# ping archlinux.org
		```

	**secondary wayish?**
	```bash
	# ifconfig
	# wifi-menu
	```
	> when booting from live USB, don't need to install wifi until you have chrooted into the system

5. **Update the system clock**
	```bash
	# timedatectl set-ntp true
	# timedatectl status
	```
6. **Partition the disks**
	a. You'll need two partitions, but need to only create one:
		1. an EFI system partition to boot linux
			- sd(x1), 260-512 MiB
			- mount point: /mnt/boot or /mnt/efi
		2. A partition for the root directory /
			- remainder of device
			- mount point: /mnt
	b. to identify disks:
		1. commands:
			```bash
			# fdisk -l
			# lsblk (lists disks)
			```
	c. in order to create the partition:
		```bash
		# cfdisk /dev/sda 
		```
	d. format the partitions with filesystem
		1. filesystem may differ depending on what its for
		2. command for big partition:
			```bash
			# mkfs.ext4 /dev/sdX1
			```
	e. mount the file systems (JUST THE BIG ONE) where they need to go
		```bash
		# mount /dev/sdX1 /mnt
		# df (to look at stuff!)
		```

	**NEXT WE'LL MOUNT THE EFI DRIVE TO A /mnt/boot DIRECTORY**

	We need to create the boot directory
	```bash
	# mkdir /mnt/boot
	```

	Now we can mount EFI to the boot directory
	```bash
	# mount /dev/sdX2 /mnt/boot
	```

	**For mounting windows10 disk partition as well:**
	Create a directory for the disk:
	```bash
	# mkdir /mnt/Windows10
	```

	Mount the disk
	```bash
	# mount /dev/sdX3 /mnt/Windows10
	```

7. **Installation**
	a. We're gonna want to organize the mirrors by location
		```bash
		# pacman -Syyy (synchronizes package databases)
		# pacman -S reflector
		# reflector --help
		# reflector --country 'United States' --age 12  --sort rate --save /etc/pacman.d/mirrorlist
		```
	b. install essential packages
		```bash
		# pacstrap /mnt base linux linux-firmware nano intel-ucode 
		```

8. **Configuring System**
	a. Generate an fstab file (defines disk partitions)
	```bash
	# genfstab -U /mnt >> /mnt/etc/fstab
	```
		- To check fstab file: just look inside bro
			```bash
			# cat /mnt/etc/fstab
			```
	b. Change root into new system bro!
		```bash
		# arch-chroot /mnt
		```
	c. Set the time zone
		Search for region and city:
			```bash
			# timedatectl list-timezones | grep 'America"
			# ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
			# hwclock --systohc
			```
	d. Localization
		1. edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8
		```bash
		# locale-gen (to generate locales)
		# nano /etc/locale.conf
		```
		2. first line should be: LANG=en_US.UTF-8
	e. Hostname
		1. Create hostname file:
		```bash
		# nano /etc/hostname
		```
		first line should be: whateverhostnameyuh
	
		2. add matching entries to hosts in /etc/hosts
		```text
		127.0.0.1	localhost
		::1		localhost
		127.0.1.1	myhostname.localdomain	myhostname
		```
	f. Set root user password
		```bash
		# passwd
		```

9. **Let's configure wifi before GRUB.** (First see if networkmanager is installed)
	if not: `# pacman -S NetworkManager`
	a. First, we need to disable existing network interfaces
		To see network interfaces:
		```bash
		# ip link
		```
		To enable NetworkManager:
		```bash
		# (sudo?) systemctl enable NetworkManager.service
		```
		To disable existing interfaces:
		```bash
		# (sudo?) systemctl disable netctl-auto@wl(whatever).service
		```

	b. Use NetworkManager:
		```bash
		# nmcli device wifi list
		# nmcli device wifi connect SSID password password
		```

	(
	could be useful?
	Connect to a wifi on the wlan1 wifi interface:
	
	`$ nmcli device wifi connect SSID password password ifname wlan1 profile_name`
	)

	c. install a front-end later

10. **NOW install GRUB!!!!**

	```bash
	# pacman -S grub efibootmgr os-prober ntfs-3g 
	```

	For installing GRUB, you need to be inside the chroot. command is this:

	```bash
	# grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB
	```
	where esp = mount point (/boot)

	Then you need to generate the main config file. Command:
	```bash
	# grub-mkconfig -o /boot/grub/grub.cfg
	```

	In order for grub-mkconfic to search for other installed systems:
	INSTALL os-prober package and mount the partitions containing other systems (DONE BY MOUNTING REGULAR EFI)

11. **REBOOT!**
	```bash
	# exit
	# umount -R /mnt
	# reboot
	```

remove the usb, sign in w/root account

also bud dont forget to install sudo sometime in there