A guide and configuration files for setting up an operating system for Grandma.
Find a file
2024-01-22 16:26:34 -06:00
Assests/Images Instructions for UEFI installation 2024-01-21 18:39:18 -06:00
LICENSE Initial commit 2024-01-15 04:58:56 +00:00
README.md Update overview again. 2024-01-22 16:26:34 -06:00

Grandma

A guide and configuration files for setting up an operating system for Grandma.

Prerequisits

A USB or CD drive with Void Linux Glibc x86_64 written to it. The ISO image can be found here: https://voidlinux.org/download/

The computer that the OS is being installed needs to have a CPU architacture of x86_64. If it is not, you are on your own.

A resonable amount of skill and experience relivent to this guide.

Overview

The operating system that will be set up, is intended to be minimal, and strieghtfowerward for Grandma to use. It will hopefully be stable and reliable. If you have issues, please file an issue. Here is a list of features/specifications that the system will have:

  • distro - Void Linux Glibc
    • I chose Void Linux, because it is a minimal, lightweight, stable, rolling-release disto. The rollig release cycle is prefered because this system will be using newer packages.
  • window manager/compositor - LabWC
    • I chose Wayland as the display server protocal because it generally preforms better that Xorg. LabWC is the window manager because it is floating, lightweight, and minimal. It would be rediculous to expect Grandma to use a tiling window manager.
  • application launcher/status bar - SFWBar and Lavalaunchers
    • I chose these bar options because they are designed to do exactly what I need them to do. These two bars will provide an XFCE-like interface, which is the easiest to operate with.
  • login manager - GreetD and TUIgreet
    • I chose a terminal solution so that all Grandma has to do is type in her username and password. She does not have to deal with the mouse.
  • search engine - https://paulgo.io
    • I use this search engine daily. It is fast, and gets me good results. It is private, and open source.
  • www client - Floorp
    • I have never tried this browser, but I assume that it is an improved version of FF.
  • File manager - Dolphin
    • Easiest to use file manager.
  • Office - Libre Office
    • Best office application. The other option is Only Office. IDK.
  • Crond - Scron
    • A simple version of cron
  • Notifications - Wayherb/tiramisu Sway Notification Center
    • A simple notification solution. You can use the sway one if your Grandma needs that.
    • Sway Notification Center has more features, and a better interface. Personally, I prefer a more minimal approach.
  • Media Player - Haruna
    • Haruna is easy to use, and looks good. It's UI, and features are very user-friendly.
  • Image Viewer - Probably Gwenview
    • For consistency purposes, mainly. It should be easy to use, and have easy fullscreen/slideshow mode. For a lighter-weight alternative, check out Ristretto.
  • Wallpaper selector - SWWW and Waypaper
    • Waypaper is a GUI frontend for SWWW or SwayBG. SWWW has smoth animations.
  • Bluetooth manager - Blueman
    • Blueman is an actively maintained GUI for bluetooth.
  • Audio Daemon - Pipewire
    • Pipewire works well, and is actively maintained.
  • Screenshot utility - Flameshot
    • Smooth selection + easy to use GUI.
  • Screen lock - Swaylock
    • Swaylock is easy to use and simple.
  • Caulculator - Kcalc
    • Picked for ease of use and consistency with the rest of the system.
  • Unit Conversion - Convertall version >=1
    • Simple GUI for unit conversion.

Installation

Login

When prompted, log in as root. If you get stuck, press Ctrl + d to get a new prompt.

void-live login: root
Password: voidlinux

You will now be greated with a # root prompt.

Gathering Important Information

Determining the Proper Disk to Install to

First, it is crutial to determine the proper device to install to. Run lsblk.

lsblk

Determine the proper drive to install to based on the size, type, and name. The drive should be one of the largest in size, the type disk, and named /dev/sdX or /dev/nvmeX, where X is a wildcard for additional numbers and letters. Keep in mind that drives may have partitions within them. To get a visual representation of that, run:

lsblk -T

The disk name will be important later on.

Determining If the System is UEFI or Legacy BIOS

If you are not familiar with manual partitioning, then you are in for a real treat. The first step is to determine whether your machine is UEFI or Legacy BIOS.

The easiest way to check that is to run:

ls -d /sys/firmware/efi

If directory exists (the output will not be an error), then your system is UEFI. If it does not exist, then your system is Legacy BIOS. Make sure that you typed it correctly.

You will need to know this for disk partitioning later on.

Running the installer

Running the installer is simple.

void-installer

image of void-installer

Now select Keyboard.
image of "select Keyboard"

Now select the keyboard layout that you use (not the one that Grandma uses). There will be a lot of typing afterword. I will show you how to change the keyboard layout back afterword.
image of the layout you use

Now select Network. You can probably skip this step if you have issues.
image of "select Network"

Select your device, then enter the SSID, and passphrase if required.
image of your device

I would say "yes" to this.
image of DHCP

Now select Source.
image of "select Source"

Select either option. I'd pick Local if you couldn't get network working, or it is a slow connection.
image of selecting a source

Select Mirror.
image of "select Mirror"

Teir 1 mirrors are maintained by the Void Linux. Teir 2 mirrors are not managed by Void. Favor teir 1.
image of favoring tier 1

Select your region.
image of your region

Select the closest mirror. Favor tier 1. If Grandma lives near Chicago, then this would be a great mirror to use.
image of great mirror

Select Hostname.
image of "select Hostname"

Type in the name of Grandma's computer.
image of name of grandma's cumputer

Now select Locale.
image of "select Locale"

Select your locale.
image of your locale

Now select Timezone.
image of "select Timezone"

Select your country.
image of your country

Now select your timezone.
image of your country

Now select RootPassword.
image of "select Timezone"

Create a strong passphrase. Make sure that you write it down, put it in a password manager, or don't forget it. If you can't type this password, then you have to chroot into the system to fix it.
image of strong passphrase

Now enter the root password again.
image of root password again

Now select UserAccount.
image of "select UserAccount"

Type in the first name of Grandma in lowercase letters.
image of first-name

Next, type the first and last name of Grandma with capitol letters (where needed) and spaces.
image of display name

Enter the password that Grandma will be using to sign in. This should be short and easy to remember (like a 4-number PIN).
image of short password

Now enter the password again.
image of user password again

The default groups are good, for now.
image of groups

Now select BootLoader.
image of "select BootLoader"

You have two options. You can select the disk that you would like to install the operating system to if you want to install GRUB as the bootloader, or you can select none, and install a different bootloader. In this guide, I will give instructions on how to install a different bootloader. I recommend you choose to install a different bootloader. The guide covers how to install EFIstub for UEFI systems, and LILO on BIOS systems.
image of choosing a bootloader

It will ask you if you want to use a graphical terminal for the grub bootloader. This means it will display the void logo in the bootloader. It's a pretty nice feature. Disabling it might give you a slightly faster boot time. If you are not installing grub, then so "No."
image of graphical terminal

Now select Partition.
image of "select Partition"

Now select the disk that you want to partition. This is the disk that you are going to install to.
image of the disk to partition

Now select fdisk. This guide provides instructions on how to use fdisk. If you are familiar with partitioning, then you can use cfdisk.
image of the "select fdisk"

Partitioning the Disks

Here is additional information on partitioning: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks

From the rest of this section, follow the instructions for firmware type UEFI or Legacy BIOS.

UEFI

You should now be greeted with some information, and a prompt that looks like this: Command (m for help): .

Type p, and press Enter. This will print out the information about the disk that you are writing to:

Command (m for help): p
Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 21AAD8CF-DB67-0F43-9374-416C7A4E31EA

<!--T:194-->
Device        Start      End    Sectors  Size Type
/dev/sda1      2048   2099199   2097152     1G EFI System
/dev/sda2   2099200  10487807   8388608     4G Linux swap
/dev/sda3  10487808  60549119  50061311  23.9G Linux filesystem

Example outputs may be copied from the Gentoo wiki.

Run this periodically throughout the partitioning process, especially before writing changes.

If the GPT disklabel already exists (as seen in the example output of p), repeatedly run d to delete the existing partitions.

If the disklabel does not exist, run g to create the GPT disklabel. For Legacy BIOS you would create the MBR disklabel.

Created a new GPT disklabel (GUID: 87EA4497-2722-DF43-A954-368E46AE5C5F).

Create the ESP partition which stands for EFI System Partition. This is where the boot loader and other UEFI firmware is loaded during the bootstrapping process. The partition should be small (200 MiB - 1 GiB). I recommend 512 MiB, to be safe. Press n, Enter, Enter, Enter, +512M, Enter to create a new partition.

Command (m for help): n
Partition number (1-128, default 1): 1
First sector (2048-60549086, default 2048): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-60549086, default 60549086): +512M
 
Created a new partition 1 of type 'Linux filesystem' and of size 512 MiB.

Now would be a good time to run p, and print the changes. Keep in mind that the disk wont be touched until the changes are writen.

I have done testing and you do not have to set the partition type. It is not the end of the world if you do.

Next, create a SWAP partition. I recommend making it 4 GiB. Here is a chart explaining the amount of SWAP that should be added based on the amount of RAM that the system has. If you don't know how much RAM the system has, just guess. If the system is slow, you should probably do 8 GiB of SWAP.

Command (m for help): n
Partition number (2-128, default 2): 
First sector (526336-60549086, default 526336): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (526336-60549086, default 60549086): +4G
 
Created a new partition 2 of type 'Linux filesystem' and of size 4 GiB.

Finally, make a root partition. This will take up the rest of the disk.

Command (m for help): n
Partition number (3-128, default 3): 3
First sector (10487808-60549086, default 10487808):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (10487808-60549086, default 60549086):

Created a new partition 3 of type 'Linux filesystem' and of size 23.9 GiB.

Print the changes. It should look something like this (the sizes will not be exactly the same):

Command (m for help): p
Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 87EA4497-2722-DF43-A954-368E46AE5C5F
 
Device       Start      End  Sectors  Size Type
/dev/sda1     2048   526335   524288    1G Linux 
/dev/sda2   526336  8914943  8388608    4G Linux
/dev/sda3  8914944 60549086 51634143 24.6G Linux

When you are ready, write the changes.

Command (m for help): w

Once again, I recommend refering to the linked Gentoo Wiki page, if you want to well understand the partitioning process. If you followed this section, skip the Legacy BIOS section.

Legacy BIOS

You should now be greeted with some information, and a prompt that looks like this: Command (m for help): .

Type p, and press Enter. This will print out the information about the disk that you are writing to:

Command (m for help): p
Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 21AAD8CF-DB67-0F43-9374-416C7A4E31EA
 
Device        Start      End  Sectors  Size Type
/dev/sda1      2048   526335   524288    1G EFI System
/dev/sda2    526336  2623487  2097152    1G Linux 
/dev/sda3   2623488 19400703 16777216    8G Linux
/dev/sda4  19400704 60549086 41148383 19.6G Linux

Example outputs may be copied from the Gentoo wiki.

Run this periodically throughout the partitioning process, especially before writing changes.

If the MBR disklabel already exists (look at the Disklabel type: section of your last output), repeatedly run d to delete the existing partitions.

If it is not MBR, or does not yet exist, enter o to create the MBR (also known as DOS) disklabel. UEFI generally uses GPT.

Command (m for help): o
Created a new DOS disklabel with disk identifier 0xe04e67c4.
The device contains 'gpt' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.

We do not need to create a boot partition on BIOS MBR.

First, create a SWAP partition. I recommend making it 4 GiB. Here is a chart explaining the amount of SWAP that should be added based on the amount of RAM that the system has. If you don't know how much RAM the system has, just guess. If the system is slow, you should probably do 8 GiB of SWAP.

Press n, Enter, Enter, +4G:

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (0-60549119, default 0): 
Last sector, +/-sectors or +/-size{K,M,G,T,P} (0-60549119, default 60549119): +4G
 
Created a new partition 2 of type 'Linux' and of size 4 GiB.

Next, make a root partition. This will take up the rest of the disk.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (3-4, default 3): 3
First sector (10487808-60549086, default 10487808):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (10487808-60549086, default 60549086):

Created a new partition 3 of type 'Linux' and of size 23.9 GiB.

Print the changes. It should look something like this (the sizes will not be exactly the same):

Command (m for help): p
Disk /dev/sda: 28.89 GiB, 31001149440 bytes, 60549120 sectors
Disk model: DataTraveler 2.0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe04e67c4
 
Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda2          2048  8390654  8388606    4G 82 Linux
/dev/sda3       8390655 60549119 52158464 25.6G 83 Linux 

When you are ready, write the changes.

Command (m for help): w

Once again, I recommend refering to the linked Gentoo Wiki page, if you want to well understand the partitioning process. If you followed this section, skip the Legacy BIOS section.

Back to the GUI

Next step is to create the file systems.

Now select FileSystems.
image of "select FileSystems"

Now create the filesystems. Follow the directions dedicated to your firmware (UEFI/LegacyBIOS).

UEFI

For UEFI, the first partition, should be vfat, the second partition should be SWAP, and the third partition should be some sort of Linux file system.

Select the first partition.
image of the first partition

Select vfat.
image of vfat

Type /boot/efi as the mountpoint.
image of /boot/efi

Say "yes."
image of new filesystem

Now select the second partition.
image of the second partition

Now select swap.
image of swap

Now select the third partition.
image of the third partition

Now select any Linux filesystem. This could be Ext4, BTRFS, or XFS. It doesn't really matter which one you pick.
image of Linux filesystem

Type / as the mountpoint.
image of /

UEFI and BIOS

Select Install.
image of "select Install"

While the process is running check tty8 to see a verbose output (Ctrl + Alt + 8). To return to the GUI, press (Ctrl + Alt + 1) to go back to tty1.

Do not reboot, unless you chose the grub bootloader. If you chose the grub bootloader, reboot, and skip the next section.
image of reboot

Installing a Different Bootloader

If you are installing a different bootloader, say "no" to the reboot prompt.
image of don't reboot

Now select Exit.
image of Exit

Mont the filesystem.

for dir in dev proc sys run; do mkdir -p /mnt/$dir; mount --rbind /$dir /mnt/$dir; mount --make-rslave /mnt/$dir; done
mkdir -p /mnt/boot
mount /dev/<disk name, boot partition number> /mnt/boot

Replace <disk name, boot partition number>, with the actual disk name, and boot partition number (ie. /dev/sda1).

You are going to need to set up the network if you haven't already.

Update the package manager.

xbps-install -u xbps

Now install efibootmgr.

xbps-install -S efibootmgr

Chroot into the installed system.

Reconfigure the kernel.

echo xbps-reconfigure linux$(uname -r | awk -F. 'OFS="." {print $1,$2}')

Logging in

Login as root with the root password.

Installing the Package Manager

To install the package manager, run:

xbps-install -S xbps

The -S flag updates the repositories.

Installing a Terminal Text Editor

Install a terminal text editor of choice

xbps-install -S vis

Configuring/Installing sudo/opendoas

sudo is the default tool that runs commands as other users. doas (opendoas) is another option, that I prefer because it is more minimal.

sudo

sudo is already installed.

Edit the sudoers file:

EDITOR=vis visudo 

Replace vis with your prefered text editor.

Locate the line that says

# %wheel ALL=(ALL:ALL) ALL

Remove the # from the beginning of the line.

After this snippet:

## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL:ALL) ALL 

Add this snippet:

## Uncomment to allow user _greeter to execute poweroff and reboot commands without a password
_greeter ALL=NOPASSWD: /usr/bin/poweroff, /usr/bin/reboot

Now remove /etc/sudoers.d/wheel:

rm /etc/sudoers.d/wheel

doas

Installing a Window Manager

To install LabWC, run:

xbps-install -S dbus libudev pam_rundir seatd xorg-server-xwayland xorg-fonts labwc

Now edit /etc/pam.d/system-login:

vis /etc/pam.d/system-login

Add -session optional pam_rundir.so to the end of the file.

Enable the seatd service

ln -s /etc/sv/seatd /var/service/

Check that the service is running

sv status seatd

If it is not running, start it

sv start seatd

Enable the dbus service

ln -s /etc/sv/dbus /var/service/

Add the user to the _seatd group

usermod -aG _seatd <username>

Remember to replace <username> with the regular user's username.

Installing a Terminal

To install Foot, run:

xbps-install -S foot

Testing the GUI

Log out of root with Ctrl + d, and log back in with the username for the regular user.

To start LabWC, run:

labwc -s foot

Setting Up the Display Manager

Logout of the regular user, and log back in as root.

Install greetd and tuigreet:

xbps-install -S greetd tuigreet

Now enable the service

ln -s /etc/sv/greetd /var/service/

Configure greetd to use tuigreet, and start labwc

vis /etc/greetd/config.toml 

The login manager, and desktop will be started in tty7. to change tty(s), press Ctrl + Alt + n, where n is the number of the tty.

The login manager will start LabWC with dbus-run-session labwc.

If you mess it up that command, and the display manager cannot start a GUI, then remember the tty keybind to change to a tty CLI.

Here is what the file should look like after changing it:

[terminal]
# The VT to run the greeter on. Can be "next", "current", or a number
# designating the VT
vt = 7

# The default session, also known as the greeter.
[defaut_session]

# `agetty` is the bundled agetty/login-lookalike. You can replace `/bin/sh`
# with whatever you want such as `sway`.
command = "tuigreet --power-shutdown 'sudo poweroff' --power-reboot 'sudo reboot'"

# The user to run the command as. The privlages this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
# in the `video` group.
user = "_greeter" 

The only line you should have had to change was this one:

command = "tuigreet --power-shutdown 'sudo shutdown now' --power-reboot 'sudo reboot'"

Ignore the lines starting with #. Those are comments.

Reboot the system to test it out.

reboot

Log in as your regular user at the prompt.