docs: parabola-install-guide.md

This commit is contained in:
Filippo Ferrari 2024-02-10 14:39:06 +01:00
parent 120b54da82
commit bcd94eca56

View file

@ -1,7 +1,7 @@
+++
title = 'Parabola Install Guide'
title = 'Parabola Installation Guide'
date = 2024-02-07T21:34:34+01:00
draft = true
draft = false
+++
# Parabola Installation Guide
@ -12,18 +12,117 @@ Still, this is to be considered just a recap of what you will need to to if you
some info on [Parabola GNU/Linux-libre](https://www.parabola.nu/)
# MODS
ive done a small number of mods to my stock T400, here they are:
# Libreboot
TODO: guide will be done
# Quad-core mod
TODO: guide will be done
# bluetooth
the bluetooth of the T400 is 2.1, you can easily upgrade the bluetooth 4.0 easily by swapping the card located behind the LCD front bezel
# Ultra-bay mod
TODO: who the fuck knows if i will ever do this
# Express Card slot
The T400 Express Card slot allows you to slot in any compatibile Express Card 54, i think the most used card is the one that gives you one or two (depending on the model) USB 3.0 plugs, with up to (i think) 5Gbps transfert speed. Cool shit.
# Parabola GNU/Linux-libre
The distro i use on my librebooted T400 is Parabola GNU/Linux-libre, a community-driven, "labour-of-love" effort to maintain a 100% free (as in: freedom) operating system distribution that is lean, clean, and hackable.
A guide on installing parabola with a encrypted root partition using luks and open-rc could be created in the future.
I will assume that you already created a bootable drive of some kind with an image of Parabola CLI Edition: [download](https://wiki.parabola.nu/Get_Parabola)
I won't cover how to do so beacuse there are already hundreds of guides that perfectly teach you how to do it on every system with every image using every technique available.
# Check if you have a UEFI machine or not
Type the following command to check if you have a UEFI machine or not, and keep that in mind, we will use this information later
```
ls /sys/firmware/efi/efivars
```
# Format your drive
The choice of partitions and filesystems is a matter of preference, and beyond the scope of this install guide. You can look at the Parabola wiki to know more.
If you already know what do you want and how you want it, you can skip this part.
Proceed to format the drive you be installing Parabola on. I use fdisk, the most basic things you need to know about it are:
type **d** to delete a partition (will ask number), type **n** to create a partition (will ask usual info), type **w** to confirm the changes.
Lets target the drive:
```
fdisk /dev/sdX
```
Assuming you deleted any existing partition, the next is to create two partitions, the first one will be a 1Gb partition and the second one will be the rest of the disk (or anyhow how much space yo want on your system)
This is just the way i do it, you might find your needs are different.
```
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (1-4, default 1):
First sector (2048-30277631, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-30277631, default 30277631): +1G
Created a new partition 1 of type 'Linux' and of size 1 GiB.
```
Then we are gonna create the second partition, you can press enter and use the default values for every option, you will have something similar to this:
```
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (1-4, default 1):
First sector (2048-30277631, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-30277631, default 30277631):
Created a new partition 1 of type 'Linux' and of size X.XX GiB.
```
Modify the last sector if you need a specific amount of memory or leave it blank to take the entire free space of your drive.
It might ask you to remote an already present signature, in that case just remote it by pressing **Y** when asked to.
# Filesystem of boot partition
We are now gonna put a filesystem on the first parition, I use FAT partitioning beacuse it is versatile since it's compatibile with both legacy boot and UEFI.
```
mkfs.fat -F32 /dev/sdX1
```
# Encrypt the second partition
To encrypt out partition we run the command:
```
cryptsetup luksFormat /dev/sdX2
```
You be ask to confirm the choice by typing **YES** and you will be asked to insert the passphrase for the partition.
# Decrypt sdX2
```
cryptsetup open /dev/sdX2 partition-name
```
We now decrypt the partition and assign a name to it (the name can be a random string, it will change later anyhow)
If we now run ```lsblk``` we should see something like this:
``
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part
└─nvme0n1p2 259:2 0 475.9G 0 part
└─partition-name 254:0 0 475.9G 0 crypt
# Create filesystem for partition-name
Create a [btrfs](https://wiki.archlinux.org/title/btrfs) partition on the decrypted partition
```
mkfs.btrfs dev/mapper/partition-name
```
# Mount both partition
Mount the two partitions starting with partition-name:
```
mount /dev/mapper/partition-name /mnt
```
Then create a directory called **boot**:
```
mkdir /mnt/boot
```
And then mount the boot partition in the boot folder:
```
mount /dev/sdX1 /mnt/boot
```
If you now run ```lsblk``` again you should see the partition correctly mounted:
```
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part /mnt/boot
└─nvme0n1p2 259:2 0 475.9G 0 part
└─partition-name 254:0 0 475.9G 0 crypt /mnt
```