Partition scheme
/dev/<device>1 | /boot/efi | EFI System | FAT32 | - EFI partition |
/dev/<device>2 | / | Linux filesystem | LUKS+Ext4 | - Root partition |
$ gdisk /dev/<device>
Command (? for help): o This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): y Command (? for help): n Partition number (1-128, default 1): First sector (34-2097118, default = 2048) or {+-}size{KMGTP}: Last sector (2048-2097118, default = 2097118) or {+-}size{KMGTP}: +512M Current type is 8300 (Linux filesystem) Hex code or GUID (L to show codes, Enter = 8300): ef00 Changed type of partition to 'EFI system partition' Command (? for help): n Partition number (2-128, default 2): First sector (34-2097118, default = 1050624) or {+-}size{KMGTP}: Last sector (1050624-2097118, default = 2097118) or {+-}size{KMGTP}: Current type is 8300 (Linux filesystem) Hex code or GUID (L to show codes, Enter = 8300): 8309 Changed type of partition to 'Linux LUKS' Command (? for help): c Partition number (1-2): 1 Enter name: EFI system partition Command (? for help): c Partition number (1-2): 2 Enter name: GNU Guix Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y
Common partition types
Partition type | Mountpoint | gdisk’s code | Partition type GUID |
Linux filesystem | Any | 8300 | 0FC63DAF-8483-4772-8E79-3D69D8477DE4 |
EFI system partition | Any1 | ef00 | C12A7328-F81F-11D2-BA4B-00A0C93EC93B |
BIOS boot partition | None | ef02 | 21686148-6449-6E6F-744E-656564454649 |
Linux x86-64 root (/) | / | 8304 | 4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 |
Linux swap | [SWAP] | 8200 | 0657FD6D-A4AB-43C4-84E5-0933C84B4F4F |
Linux /home | /home | 8302 | 933AC7E1-2EB4-4F13-B844-0E14E2AEF915 |
Linux /srv | /srv | 8306 | 3B8F8425-20E0-4F3B-907F-1A25A76F98E8 |
Linux /var | /var1 | 8310 | 4D21B016-B534-45C2-A9FB-5C16E091FD2D |
Linux /var/tmp | /var/tmp1 | 8311 | 7EC6F557-3BC5-4ACA-B293-16EF5DF639D1 |
Linux LVM | Any | 8e00 | E6D6D379-F507-44C2-A23C-238F2A3DF928 |
Linux RAID | Any | fd00 | A19D880F-05FC-4D3B-A006-743F0F84911E |
Linux LUKS | Any | 8309 | CA7D7CCB-63ED-4C53-861C-1742536059CC |
Linux dm-crypt | Any | 8308 | 7FFEC5C9-2D00-49B7-8941-3EA10A5586B7 |
Format EFI partition:
mkfs.fat -F32 /dev/sda1
Format root partition:
cryptsetup luksFormat /dev/sda2
cryptsetup open /dev/sda2 cryptroot
mkfs.ext4 /dev/mapper/cryptroot
mount /dev/mapper/cryptroot /mnt
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
Getting started with swap in RHEL 8 manual:
Amount of RAM in the system | Recommended swap space | Recommended swap space if allowing for hibernation |
less than 2 GB | 2x amount of RAM | 3x the amount of RAM |
2 GB - 8 GB | 1x amount of RAM | 2x the amount of RAM |
8 GB - 64 GB | At least 4 GB | 1.5x times the amount of RAM |
more than 64 GB | At least 4 GB | Hibernation not recommended |
From ???
RAM | No hibernation | With Hibernation | Maximum |
256MB | 256MB | 512MB | 512MB |
512MB | 512MB | 1024MB | 1024MB |
1GB | 1GB | 2GB | 2GB |
2GB | 1GB | 3GB | 4GB |
3GB | 2GB | 5GB | 6GB |
4GB | 2GB | 6GB | 8GB |
5GB | 2GB | 7GB | 10GB |
6GB | 2GB | 8GB | 12GB |
8GB | 3GB | 11GB | 16GB |
12GB | 3GB | 15GB | 24GB |
16GB | 4GB | 20GB | 32GB |
24GB | 5GB | 29GB | 48GB |
32GB | 6GB | 38GB | 64GB |
64GB | 8GB | 72GB | 128GB |
128GB | 11GB | 139GB | 256GB |
256GB | 16GB | 272GB | 512GB |
512GB | 23GB | 535GB | 1TB |
1TB | 32GB | 1056GB | 2TB |
2TB | 46GB | 2094GB | 4TB |
4TB | 64GB | 4160GB | 8TB |
8TB | 91GB | 8283GB | 16TB |
dd if=/dev/zero of=/mnt/swapfile bs=1G count=8 status=progress
chmod 600 /mnt/swapfile
mkswap /mnt/swapfile
swapon /mnt/swapfile
dd bs=512 count=4 if=/dev/urandom of=private-files/keyfile iflag=fullblock
sudo cryptosetup luksAddKey /dev/sda2 private-files/keyfile
herd start cow-store /mnt
TODO: add nonguix channel
guix pull
TODO: set GUIX_PROFILE
and load $GUIX_PROFILE/etc/profile
guix shell git -- git clone https://github.com/rsauex/dotfiles.git
- lsblk -o ‘NAME,LABEL,RM,RO,SIZE,TYPE,FSTYPE,MOUNTPOINT,UUID’
- non-guix channel
- drives UUID??
guix system init -L /root/dotfiles ???.scm /mnt
- install bootstrap home
- pull