Install Guide

From yiffOS
Revision as of 08:50, 9 April 2022 by MrRocket (talk | contribs) (Needs to be updated at some point)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

(This article is currently out of date and doesn't reflect the current way of installation)

This article is a guide on how to install from a live system.

Before installing, ensure that the following minimum requirements are met:

  • UEFI capable machine (Only for the official stage 3 image)
  • Core 2 or newer processor / AMD equivalent
  • 256MB of ram
  • 5G of disk space (without swap)

If you need any assistance with the install, do not hesitate to join the official Discord and ask for help in #support.

Note: X and Y are used in the article: X.X.X is the Linux Kernel version and Y.Y.Y is the yiffOS version.

Pre-Installation

Download yiffOS

You can download the current version of yiffOS here Version: yiffOS 0.1.1 (Knot) with the 5.14.7 Kernel

Create GPT partition table

Using cfdisk, create the required partitions:

$ cfdisk /dev/sdXY

You'll want:

  • A boot partition that is at least 512M which has the type as EFI System
  • An optional swap partition that is the same size as the amount of memory in your system with the type Linux swap
  • A root partition that is at least 4G big but ideally will take up the rest of the space on your drive with the type as Linux filesystem

Format the partitions

$ mkfs.fat -F32 /dev/sdxY # efi partition
$ mkfs.ext4  /dev/sdxY # root partition

If you have a swap partition:

$ mkswap /dev/sdxY

Mount Partitions

$ mkdir /mnt/root
$ mount /dev/sdXY /mnt/root # root
$ mkdir -p /mnt/root/boot/efi
$ mount /dev/sdXY /mnt/root/boot/efi # efi partition	

If you have a swap partition:

$ swapon /dev/sdxY

Installation

Copy rootfs

$ rsync -av -P --exclude '/mnt/*' --exclude '/dev/*' --exclude '/proc/*' --exclude '/tmp/*' --exclude '/sys/*' /* /mnt/root

Install bootloader

GRUB

$ grub-install --target=x86_64-efi --efi-directory=/mnt/root/boot/efi --boot-directory=/mnt/root/boot --bootloader-id=yiffOS

rEFInd

Coming soon...

Configuration

Generate fstab

$ genfstab -U /mnt/root > /mnt/root/etc/fstab

Enter chroot

$ mount -v --bind /dev /mnt/root/dev
$ mount -v --bind /dev/pts /mnt/root/dev/pts
$ mount -vt proc proc /mnt/root/proc
$ mount -vt sysfs sysfs /mnt/root/sys
$ mount -vt tmpfs tmpfs /mnt/root/run
$ chroot "/mnt/root" /usr/bin/env -i   \
	HOME=/root                  \
	TERM="$TERM"                \
	PS1='(yiffOS chroot) \u:\w\$ ' \
	PATH=/usr/bin:/usr/sbin     \
	/usr/local/bin/fish --login

Generate initrd

$ mkinitramfs X.X.XyiffOS
$ mv ./initrd-X.X.XyiffOS.img /boot/initrd-X.X.X-yiffOS-Y.Y.Y.img

Generate bootloader config

GRUB

$ grub-mkconfig -o /boot/grub/grub.cfg

rEFInd

Coming soon...

Set hostname

$ echo "<hostname>" > /etc/hostname

Change timezone

$ timedatectl list-timezones
$ timedatectl set-timezone <timezone>

Set locale

$ locale -a
$ LC_ALL=<locale name> locale language
$ LC_ALL=<locale name> locale charmap
$ LC_ALL=<locale name> locale int_curr_symbol
$ LC_ALL=<locale name> locale int_prefix
$ localectl set-locale LANG="<ll>_<CC>.<charmap><@modifiers>"

Reboot

Exit the chroot environment by typing exit.

You should now be able to reboot by typing reboot to boot into your new yiffOS install and log in with root:root.

Post-Install

You should immediately update the root password and optionally remove the stage 3 text from /etc/issues.

See General Recommendations for post-install tutorials like setting up a user account and installing applications.