wiki/Archguide.md

101 lines
2.5 KiB
Markdown
Raw Normal View History

2019-04-23 02:14:47 +00:00
---
title: Arch Linux Install guide
description:
published: true
2019-11-05 23:07:40 +00:00
date: 2019-11-05T23:07:39.276Z
2019-04-23 02:14:47 +00:00
tags:
---
2019-11-05 23:03:28 +00:00
# btw I install arch
2019-04-23 02:14:47 +00:00
2019-11-05 23:03:28 +00:00
> This **turbo install guide** makes a lot of assumptions on what you want and doesn't cover many real world setups. Always follow the [official wiki](https://wiki.archlinux.org/index.php/Installation_guide) if in doubt.
{.is-info}
2019-04-23 02:14:47 +00:00
2019-11-05 23:03:28 +00:00
Alternatively, check out [our installer](https://git.fosc.space/fosc/fosc-arch-installer) when it's ready.
2019-06-01 21:39:25 +00:00
2019-04-23 02:14:47 +00:00
## Partitioning
2019-11-05 23:03:28 +00:00
To partition disks, always use `cgdisk` unless you have a good reason not to. It's just the best, like a 🦈.
> Find the names of your disks using `lsblk`
{.is-info}
2019-04-23 02:14:47 +00:00
2019-11-05 23:03:28 +00:00
In this guide, the first SATA disk (`sda`) is used. On a modern computer, you may use `nvme0n1` or even `mmcblk0` on embedded systems.
2019-04-23 02:14:47 +00:00
2019-11-05 23:03:28 +00:00
`cgdisk /dev/sda`
Try to make it look something like:
```
2019-04-23 02:14:47 +00:00
/dev/sda1 200M (ef00) /boot
/dev/sda2 $REST_OF_HDD (8300) /
2019-11-05 23:03:28 +00:00
```
The first partition will store the bootloader and the kernel, and will be read by the UEFI to boot. The second one will contain Arch.
Format the partitions and mount them.
> On an SSD, `f2fs` is recommended instead of `ext4` for unparalled speed.
{.is-info}
2019-04-23 02:14:47 +00:00
2019-06-01 21:39:25 +00:00
```
mkfs.vfat -F 32 /dev/sda1
mkfs.ext4 /dev/sda2
2019-04-23 02:14:47 +00:00
2019-06-01 21:39:25 +00:00
mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot
```
2019-04-23 02:14:47 +00:00
2019-11-05 23:07:40 +00:00
## Internet access
If Ethernet was plugged in during boot, it will be ready.
When plugging it after the fact, it's best to just reboot. Alternatively, run `dhcpcd`, `killall dhpcd` and run `dhcpcd` again to get an IP address.
No, that didn't make sense, but it works way too well.
> If a WiFi install is absolutely necessary, run the Arch installer-exclusive `wifi-menu` tool.
{.is-warning}
Check your internet connectivity with `ping` before continuing.
2019-04-23 02:14:47 +00:00
## Actual install
2019-11-05 23:07:40 +00:00
To install packages to a folder instead of normally, `pacstrap` is used. Here a good set of packages to get a running system is provided.
2019-04-23 02:14:47 +00:00
2019-11-05 23:07:40 +00:00
`pacstrap /mnt base base-devel linux linux-firmware f2fs-tools xorg-server gnome gnome-extra firefox networkmanager htop zsh grml-zsh-config`
2019-04-23 02:14:47 +00:00
2019-11-05 23:07:40 +00:00
## Chrooting
2019-04-23 02:14:47 +00:00
2019-06-01 21:39:37 +00:00
`arch-chroot /mnt /bin/zsh`
2019-04-23 02:14:47 +00:00
2019-06-01 21:39:25 +00:00
```
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
2019-04-23 02:14:47 +00:00
locale-gen
2019-06-01 21:39:25 +00:00
```
2019-04-23 02:14:47 +00:00
## Users
2019-06-01 21:39:25 +00:00
```
2019-04-23 02:14:47 +00:00
passwd
chsh root -s /bin/zsh
useradd -m -G wheel -s /bin/zsh user
passwd user
2019-06-01 21:39:25 +00:00
```
2019-04-23 02:14:47 +00:00
## Enable services
2019-06-01 21:39:25 +00:00
```systemctl enable NetworkManager gdm```
2019-04-23 02:14:47 +00:00
## Bootloader
2019-06-01 21:39:25 +00:00
`refind-install`
2019-04-23 02:14:47 +00:00
## Kernel cmdline
Basically edit your boot options to be 'rw root=/dev/sda2', as sometimes rEFInd doesn't make this automatically
2019-06-01 21:39:25 +00:00
`nano /boot/refind_linux.conf`
2019-04-23 02:14:47 +00:00
## Git out
2019-06-01 21:39:25 +00:00
`exit`
`reboot`