Update README.md

This commit is contained in:
Јован Ђокић-Шумарац 2020-12-13 10:33:38 +00:00
parent 686b336099
commit f434d4b762

View file

@ -10,7 +10,7 @@ Change localkeys to my keyboard layout
In my case I have a Danish keyboard layout. In my case I have a Danish keyboard layout.
```bash ```bash
loadkeys dk loadkeys
``` ```
You can find your keymap file by using localectl: You can find your keymap file by using localectl:
@ -37,28 +37,26 @@ Set up the partions, mount and use swap
Let us say you have a simple setup: Let us say you have a simple setup:
- /boot partition (ext2) - /boot/efi partition (vfat)
- / partition (ext4) - / partition (ext4)
- /home partition (ext4) - /home partition (ext4)
- /var partition (ext4) - /suckless partition (ext4)
- /tmp partition (ext4) - /storage partition (ntfs)
- swap partition [swap]
NOTE: `lsblk` is a very nice tool to doublecheck your partition(s) structure. NOTE: `lsblk` is a very nice tool to doublecheck your partition(s) structure.
First we format to the file systems we want: First we format to the file systems we want:
```bash ```bash
mkfs.ext2 /dev/sdaxY (/boot) mkfs.fat -F32 /dev/sdaxY (/boot/efi)
mkfs.ext4 /dev/sdaxY (/, /home, /var, /tmp) mkfs.ext4 /dev/sdaxY (/, /home, /suckless)
``` ```
Why do I use ext2 for the boot partition? No need to have a journal.
Create /mnt structure, one-liner: Create /mnt structure, one-liner:
```bash ```bash
mkdir -p /mnt/{boot,home,var,tmp} mkdir -p /mnt/{boot,home,suckless,storage}
``` ```
And then mount the file systems to /mnt: And then mount the file systems to /mnt:
@ -66,24 +64,18 @@ And then mount the file systems to /mnt:
```bash ```bash
# Mount / (root) # Mount / (root)
mount /dev/sdaxY /mnt mount /dev/sdaxY /mnt
# Mount /boot, /home, /var, /tmp # Mount /boot, /home, /suckless, /storage
mount /dev/sdaxY /mnt/<point> mount /dev/sdaxY /mnt/<point>
``` ```
Let us not forget to make ("format") our swap and mount it as well:
```bash Installing the actual base system and doas
mkswap /dev/sdaxY
swapon /dev/sdaxY
```
Installing the actual base system and sudo
------------------------------------------ ------------------------------------------
Install the base system, with sudo as well. Install the base system, with sudo as well.
```bash ```bash
pacstrap /mnt base base-devel sudo pacstrap /mnt base base-devel opendoas neovim networkmanager wpa_supplicant linux-zen linux-firmware
``` ```
Generate the fstab (so it knows how things are mounted) Generate the fstab (so it knows how things are mounted)
@ -109,7 +101,7 @@ Locale (system language)
Depending on what you want, you change the /etc/locale.gen file: Depending on what you want, you change the /etc/locale.gen file:
```bash ```bash
nano /etc/locale.gen nvim /etc/locale.gen
``` ```
NOTE: Use UTF-8 whenever possible. NOTE: Use UTF-8 whenever possible.
@ -128,8 +120,8 @@ locale-gen
Tell the system what we use: Tell the system what we use:
```bash ```bash
echo LANG=en_GB.UTF-8 > /etc/locale.conf echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_GB.UTF-8 export LANG=en_US.UTF-8
``` ```
Timezone Timezone
@ -138,7 +130,7 @@ Timezone
Symlink/Set your timezone: Symlink/Set your timezone:
```bash ```bash
ln -s /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime ln -s /usr/share/zoneinfo/Europe/Belgrade /etc/localtime
``` ```
Set system to the Hardware Clock Set system to the Hardware Clock
@ -157,18 +149,20 @@ Choose an awesome hostname:
echo myhostname > /etc/hostname echo myhostname > /etc/hostname
``` ```
Setting up DHCP for my Internet Card Edit /etc/vconsole.conf:
------------------------------------
systemd setup of your dhcp interface:
```bash ```bash
ip link KEYMAP=
systemctl enable dhcpcd@my-device.service ```
Add matching entries to hosts:
```bash
127.0.0.1 localhost
::1 localhost
127.0.1.1 myhostname.localdomain myhostname
``` ```
Just simply using `systemctl enable dhcpcdeth0.service` won't work anymore.
So I'm getting the correct device with ip link. (Usually the entry under the loop.)
Ramdisk Ramdisk
------- -------
@ -176,7 +170,7 @@ Ramdisk
Initial ramdisk environment. Initial ramdisk environment.
```bash ```bash
mkinitcpio -p linux mkinitcpio -P
``` ```
This actually ran under the pacstrap process, I just like to be safe. This actually ran under the pacstrap process, I just like to be safe.
@ -196,13 +190,11 @@ Grub (Bootloader)
Well, we need a bootloader: Well, we need a bootloader:
```bash ```bash
pacman -S grub pacman -S grub os-prober efibootmgr
``` ```
If I'm having **Windows** as well on another Partition, I'll also install ***os-prober***.
```bash ```bash
grub-install --target=i386-pc --recheck /dev/sda grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
``` ```
@ -231,20 +223,9 @@ Login as Root to Arch Linux and permantly set the keymap (keyboard)
Now we want to make our keyboard layout permanent: Now we want to make our keyboard layout permanent:
```bash ```bash
localectl set-keymap --no-convert dk localectl set-keymap --no-convert
``` ```
I obviously have "dk" for Danish layout. Substitute with your own layout.
NOTE: If you are a bloody American, you don't need to do this. US is default.
Check for updates, there's probably none
----------------------------------------
```bash
pacman -Syy
pacman -Syu
```
Add User and set Password Add User and set Password
------------------------- -------------------------
@ -254,11 +235,11 @@ useradd -m -g users -G lp,scanner,audio,video,optical,network,games,wheel -s /bi
passwd username passwd username
``` ```
Change sudoers file using nano Change sudoers file using nvim
------------------------------ ------------------------------
```bash ```bash
EDITOR=nano visudo EDITOR=nvim visudo
``` ```
Uncomment wheel group. Uncomment wheel group.