gabrielgio.me @ 202b9d01187066a43f14d35d62bc04f2eef6db0b

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