User:Rahulsandhu/Handbook

From Gentoo Wiki
Jump to:navigation Jump to:search

Introduction

Hello and welcome! You have stumbled across Rahul Sandhu’s Personal Less Well Written Handbook. These are my personal notes for installing, maintaining a gentoo system, with some other random things thrown in. Now for the unfun bit:

Warning
Disclaimer: When following any tutorials or running/executing any commands or scripts mentioned in this handbook, you (the reader) accept full responsibility for any damage done to your computer. The things mentioned in here have only been tested for my use case and my systems, so I cannot guarantee they will work for yours.

Now that that is over, feel free to look through my handbook!

Installing Gentoo

First up, installing Gentoo. This installation will be for amd64 UEFI systems. I will use systemd as the init system, systemdboot as the bootloader and btrfs with full luks encryption for the root partition

Obtaining the Gentoo Live ISO

Now we need to obtain the iso for the live media we will use to install Gentoo. This can be found on the downloads page here. I use the admin cd myself.

Creating a bootable usb drive

Now we need to create a usb drive to boot off. If you have a unix or unix-like box (Any linux distro, macOS, *BSD) you can use dd:

root #dd if=/home/rahulsandhu/admincd.iso of=/dev/sdb bs=1M status=progress
Warning
Don’t forget to substitute ‘if=‘ with the path to the iso you downloaded and ‘of=‘ with the path to your usb drive!

Now, boot off the drive from your UEFI’s boot loader and plug in an ethernet cable/setup wifi. For instructions on how to setup wifi, have a look at this page. You can test that you have internet access with ping:

root #ping gentoo.org

Setting up SSH access

Now we need to setup ssh access to the live media. After booting it, set the root password:

root #passwd

Then, ssh into the computer from another box (replace 10.0.0.103 with your ip):

root #ssh root@10.0.0.103

Now, you should have access to a gui where you can copy and paste commands to make your life easier.

Partitioning the drives

Next, we need to partition the drives. As stated earlier, our root filesystem will be btrfs. Our layout will look something like this:

Partition Filesystem Size Description
/dev/nvme0n1p1 vfat32 550M EFI system partition
/dev/nvme0n1p2 (swap) RAM size * 2 Swap partition
/dev/nvme0n1p3 btrfs Rest of the disk Root partition
Warning
/dev/nvme0n1 is for my system. Make sure to replace it with your drive or else you will loose all data on that drive!