gabrielgio.me @ cf7c6a797a5e7aad65583419fb23705a137c46b9

  1---
  2title: "Alpine set up for daily driver"
  3date: 2022-12-10
  4tags: ['alpine', 'linux']
  5---
  6
  7# Installation Process
  8
  9
 10## Disable secure boot
 11
 12First, always check for secure book. If it is enabled you won't be able to boot
 13your thumbdrive.
 14
 15## setup-alpine
 16On the official wiki[^1] there a more complete guide on how to setup, and will
 17probably be more accurate than this one, so always refer to that wiki first.
 18This is more a log of how I setup. 
 19
 20Once you boot your live installation run `setup-alpine` and follow the steps:
 21
 22* _Select keyboard layout_: **us**
 23
 24* _Select keyboard variant_: **us**
 25
 26* _Enter system hostname_: **gridx.local** [This is my choice, if you don't know
 27  what exactly is this go for the default **localhost**]
 28
 29* _Which one do you want to initialize?_: **wlan0** [I chose wlan0, since it is
 30  a laptop I don't have it connected to cable]
 31
 32* _Type the wireless network name to connect to_: **\<NAME\>**
 33
 34* _Type network key_: ******
 35
 36* _Ip address for wlan0_? **dhcp** [and for the following device I have chose
 37  none since I won't use them anyways]
 38
 39* _Do you want to do any manual network configuration_? **n** 
 40
 41* _Changing password for root_: ******
 42
 43* _Which timezone are you in?_ **Europe/Berlin**
 44
 45* _HTTP/FTP proxy URL?_ **none**
 46* _Which NTP client to run?_ chrony
 47* _Enter mirro number?_ **f** [I pick this one to speed up things a bit, default
 48  one is fine as well]
 49
 50* _Set an user?_ **\<NAME\>** [Since we aiming to be a desktop create your user here]
 51
 52* _Full name for user \<NAME\>:_ **\<FULLNAME\>**
 53* _Type password_: ******
 54
 55* _Enter ssh key or URL for \<NAME\>?_ **none** [this is a public key so you can
 56  ssh into this machine]
 57
 58* _Which ssh server?_ **openssh**
 59
 60* _Which disks would like to use?_ **\<DISK\>** [now you are going to set up the
 61  disk for installation]
 62
 63* _How would you like to use it?_ **crypt** [I like to use encrypted disks, I
 64  strongly advice for it, but in case you don't want, go for sys directly]
 65
 66* _How would you like to use it?_ **lvm**
 67
 68* _How would you like to use it?_ **sys** [more info[^2]]
 69
 70* _WARNING: Erase the above disks and continue?_ **y**
 71
 72* Enter passphrase for \<DISK\>: ******
 73
 74Once you have finish the step run `reboot`.
 75
 76## Desktop environment
 77
 78Now comes the "hard" part, where we need to configure the desktop. For me, I'm
 79going for i3wm with lightdm.
 80
 81To be able to install all the necessary packages we will need to enable the
 82community repository[^3]. To edit it I use vim
 83
 84```bash
 85apk add vim
 86# then
 87vim /etc/apk/repositories
 88```
 89and uncomment the `.../community`
 90
 91```bash
 92#/media/cdrom/apks
 93http://dl-cdn.alpinelinux.org/alpine/v3.16/main
 94http://dl-cdn.alpinelinux.org/alpine/v3.16/community
 95#http://dl-cdn.alpinelinux.org/alpine/edge/main
 96#http://dl-cdn.alpinelinux.org/alpine/edge/community
 97#http://dl-cdn.alpinelinux.org/alpine/edge/testing
 98```
 99
100Then run  `apk update` and you will see the both repositories printed out.
101
102Now we will install the necessary drivers for `xorg` to run properly. Firs
103search for all  video drivers `apk search xf86-video*` and install whatever you
104have for you computer (in my case `apk add apk add xf86-video-amdgpu`)
105
106* `apk add mesa-dri-gallium mesa-va-gallium mesa-egl`
107* `setup-xorg-base`
108* `apk add lightdm-gtk-greeter`
109* `setup-devd udev`
110* `rc-update add dbus`
111* `rc-update add lightdm`
112
113* `apk add terminus-font`
114*  `dbus-uuidgen > /var/lib/dbus/machine-id`
115* `rc-update add dbus`
116* `apk add i3wm i3status xterm i3lock`
117* `add user <NAME> input`
118* `add user <NAME> video`
119* `reboot`
120
121[^1]: https://wiki.alpinelinux.org/wiki/Installation#Questions_asked_by_setup-alpine
122[^2]: https://wiki.alpinelinux.org/wiki/Installation#The_general_course_of_action
123[^3]: https://wiki.alpinelinux.org/wiki/Repositories#Enabling_the_community_repository