Skip to content

Latest commit

 

History

History
162 lines (134 loc) · 6.06 KB

INSTALL.org

File metadata and controls

162 lines (134 loc) · 6.06 KB

Partition Disk

Partition scheme

/dev/<device>1/boot/efiEFI SystemFAT32- EFI partition
/dev/<device>2/Linux filesystemLUKS+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 typeMountpointgdisk’s codePartition type GUID
Linux filesystemAny83000FC63DAF-8483-4772-8E79-3D69D8477DE4
EFI system partitionAny1ef00C12A7328-F81F-11D2-BA4B-00A0C93EC93B
BIOS boot partitionNoneef0221686148-6449-6E6F-744E-656564454649
Linux x86-64 root (/)/83044F68BCE3-E8CD-4DB1-96E7-FBCAF984B709
Linux swap[SWAP]82000657FD6D-A4AB-43C4-84E5-0933C84B4F4F
Linux /home/home8302933AC7E1-2EB4-4F13-B844-0E14E2AEF915
Linux /srv/srv83063B8F8425-20E0-4F3B-907F-1A25A76F98E8
Linux /var/var183104D21B016-B534-45C2-A9FB-5C16E091FD2D
Linux /var/tmp/var/tmp183117EC6F557-3BC5-4ACA-B293-16EF5DF639D1
Linux LVMAny8e00E6D6D379-F507-44C2-A23C-238F2A3DF928
Linux RAIDAnyfd00A19D880F-05FC-4D3B-A006-743F0F84911E
Linux LUKSAny8309CA7D7CCB-63ED-4C53-861C-1742536059CC
Linux dm-cryptAny83087FFEC5C9-2D00-49B7-8941-3EA10A5586B7

Format partitions

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 created partitions:

mount /dev/mapper/cryptroot /mnt
mkdir -p /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi

Create swap file (if needed):

Getting started with swap in RHEL 8 manual:

Amount of RAM in the systemRecommended swap spaceRecommended swap space if allowing for hibernation
less than 2 GB2x amount of RAM3x the amount of RAM
2 GB - 8 GB1x amount of RAM2x the amount of RAM
8 GB - 64 GBAt least 4 GB1.5x times the amount of RAM
more than 64 GBAt least 4 GBHibernation not recommended

From ???

RAMNo hibernationWith HibernationMaximum
256MB256MB512MB512MB
512MB512MB1024MB1024MB
1GB1GB2GB2GB
2GB1GB3GB4GB
3GB2GB5GB6GB
4GB2GB6GB8GB
5GB2GB7GB10GB
6GB2GB8GB12GB
8GB3GB11GB16GB
12GB3GB15GB24GB
16GB4GB20GB32GB
24GB5GB29GB48GB
32GB6GB38GB64GB
64GB8GB72GB128GB
128GB11GB139GB256GB
256GB16GB272GB512GB
512GB23GB535GB1TB
1TB32GB1056GB2TB
2TB46GB2094GB4TB
4TB64GB4160GB8TB
8TB91GB8283GB16TB
dd if=/dev/zero of=/mnt/swapfile bs=1G count=8 status=progress
chmod 600 /mnt/swapfile
mkswap /mnt/swapfile
swapon /mnt/swapfile

Key file for initrd

dd bs=512 count=4 if=/dev/urandom of=private-files/keyfile iflag=fullblock
sudo cryptosetup luksAddKey /dev/sda2 private-files/keyfile

Use store on /mnt

herd start cow-store /mnt

Update channels

TODO: add nonguix channel

guix pull

TODO: set GUIX_PROFILE and load $GUIX_PROFILE/etc/profile

Clone dotfiles repo

guix shell git -- git clone https://github.com/rsauex/dotfiles.git

(TODO)

  • lsblk -o ‘NAME,LABEL,RM,RO,SIZE,TYPE,FSTYPE,MOUNTPOINT,UUID’
  • non-guix channel
  • drives UUID??

(TODO) Install bootstrap system

guix system init -L /root/dotfiles ???.scm /mnt
  • install bootstrap home

(TODO) Configure to full system

  • pull