first commit
This commit is contained in:
commit
56cccfc2ec
13
README.md
Normal file
13
README.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Chimera Linux
|
||||
|
||||
## Memos
|
||||
|
||||
* [Installation](https://git.netig.net/netig/chimera-linux/src/branch/main/installation.md)
|
||||
* [Tips and tricks](https://git.netig.net/netig/chimera-linux/src/branch/main/tips-and-tricks.md)
|
||||
* [Containers](https://git.netig.net/netig/chimera-linux/src/branch/main/containers.md)
|
||||
|
||||
## Project links
|
||||
|
||||
* [Chimera Linux website](https://chimera-linux.org)
|
||||
* [Chimera Linux documentation](https://chimera-linux.org/docs)
|
||||
* [Chimera Linux code repositories](https://github.com/chimera-linux)
|
13
containers.md
Normal file
13
containers.md
Normal file
@ -0,0 +1,13 @@
|
||||
# Containers
|
||||
|
||||
Docker and docker compose alternative using `nerdctl` :
|
||||
```
|
||||
# apk add nerdctl
|
||||
# dinitctl enable containerd
|
||||
```
|
||||
|
||||
To be able to build images :
|
||||
```
|
||||
# apk add buildkit
|
||||
# dinitctl enable buildkitd
|
||||
```
|
288
installation.md
Normal file
288
installation.md
Normal file
@ -0,0 +1,288 @@
|
||||
# Installation
|
||||
|
||||
It could have been an installation script, but it's more fun to do it yourself !
|
||||
|
||||
## Preparation
|
||||
|
||||
Download the [latest image](https://repo.chimera-linux.org/live/latest/) for your architecture, verify the checksum, and copy it to a USB pendrive.
|
||||
Then boot the machine from the USB drive, log in as `root` using the password `chimera`.
|
||||
|
||||
> You can use `loadkeys` to set your keymap if needed.
|
||||
|
||||
You can now proceed with the installation either from this machine or from another machine via SSH, which may be useful for copying and pasting commands.
|
||||
|
||||
For remote installation, start the `sshd` service :
|
||||
```
|
||||
# dinitctl start sshd
|
||||
```
|
||||
|
||||
Find the IP address using `ip a` and connect from your workstation with `ssh anon@<ip>` using the password `chimera`.
|
||||
Then switch to the root account with `doas -s` using the same password.
|
||||
|
||||
### Partition the disks
|
||||
|
||||
Identify disks with `lsblk`, let’s assume here that the target disk drive is `/dev/sda`.
|
||||
Start with wiping everything on it :
|
||||
```
|
||||
# wipefs -a /dev/sda
|
||||
```
|
||||
|
||||
The easiest way to initialize a partition table and create partitions is with the `cfdisk` TUI program :
|
||||
```
|
||||
# cfdisk /dev/sda
|
||||
```
|
||||
|
||||
Advised GPT partitioning scheme for UEFI systems :
|
||||
|
||||
| Partition | Mountpoint | Filesystem | Size | Type |
|
||||
|-----------|------------|------------|------|------------------|
|
||||
| 1 : EFI | /boot/efi | fat32 | 512M | EFI System |
|
||||
| 2 : Boot | /boot | ext4 | 1G | Linux filesystem |
|
||||
| 3 : Root | / | ext4 | - | Linux filesystem |
|
||||
|
||||
Advised GPT partitioning scheme for BIOS systems :
|
||||
|
||||
| Partition | Mountpoint | Filesystem | Size | Type |
|
||||
|-----------|------------|------------|------|------------------|
|
||||
| 1 : - | - | - | 1M | BIOS boot |
|
||||
| 2 : Boot | /boot | ext4 | 1G | Linux filesystem |
|
||||
| 3 : Root | / | ext4 | - | Linux filesystem |
|
||||
|
||||
|
||||
### Format the partitions
|
||||
|
||||
For UEFI systems :
|
||||
```
|
||||
# mkfs.vfat /dev/sda1
|
||||
# mkfs.ext4 /dev/sda2
|
||||
# mkfs.ext4 /dev/sda3
|
||||
```
|
||||
|
||||
For BIOS systems :
|
||||
```
|
||||
# mkfs.ext4 /dev/sda2
|
||||
# mkfs.ext4 /dev/sda3
|
||||
```
|
||||
|
||||
### Mount the file systems
|
||||
|
||||
Mount the root then the boot partitions :
|
||||
```
|
||||
# mkdir /media/root && mount /dev/sda3 /media/root
|
||||
# mkdir /media/root/boot && mount /dev/sda2 /media/root/boot
|
||||
```
|
||||
|
||||
For UEFI systems you also have to mount the EFI partition :
|
||||
```
|
||||
# mkdir /media/root/boot/efi && mount /dev/sda1 /media/root/boot/efi
|
||||
```
|
||||
|
||||
Check with `lsblk` that your mountpoints are corrects.
|
||||
|
||||
## System installation
|
||||
|
||||
### Bootsrap
|
||||
|
||||
```
|
||||
# chimera-bootstrap /media/root
|
||||
```
|
||||
|
||||
### Chroot
|
||||
|
||||
```
|
||||
# chimera-chroot /media/root
|
||||
```
|
||||
|
||||
### Kernel
|
||||
|
||||
You could omit the installation of the firmwares metapackage when installing in a virtual machine or a container :
|
||||
```
|
||||
# apk add !base-firmware-linux
|
||||
```
|
||||
|
||||
Linux LTS kernel installation :
|
||||
```
|
||||
# apk add linux-lts
|
||||
```
|
||||
|
||||
### Essential packages
|
||||
|
||||
```
|
||||
# apk add bash bash-completion tree ucode-<amd/intel>
|
||||
```
|
||||
|
||||
> For an AMD CPU install `ucode-amd` package and `ucode-intel` for Intel.
|
||||
|
||||
Other useful packages :
|
||||
|
||||
* Install `ufw` if you wish an easy to use firewall.
|
||||
* If you want `cron` install the `cronie` package.
|
||||
* You may want `git` it can be installed with the `git` package.
|
||||
|
||||
### Swapfile (optional)
|
||||
|
||||
Create a file that will be used for swap :
|
||||
```
|
||||
# fallocate -l 1G /swapfile
|
||||
```
|
||||
|
||||
Only the root user should be able to write and read the swap file.
|
||||
To set the correct permissions type :
|
||||
```
|
||||
# chmod 600 /swapfile
|
||||
```
|
||||
|
||||
Use the mkswap utility to set up the file as Linux swap area :
|
||||
```
|
||||
# mkswap /swapfile
|
||||
```
|
||||
|
||||
Enable the swap with the following command :
|
||||
```
|
||||
# swapon /swapfile
|
||||
```
|
||||
|
||||
### Fstab
|
||||
|
||||
```
|
||||
# genfstab -U / >> /etc/fstab
|
||||
```
|
||||
|
||||
### Time zone
|
||||
|
||||
```
|
||||
# ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
|
||||
```
|
||||
|
||||
### Localization
|
||||
|
||||
Set yout locale in the `/etc/locale.conf` file :
|
||||
```
|
||||
LANG=fr_FR.UTF-8
|
||||
LC_COLLATE=C
|
||||
```
|
||||
|
||||
If non `us` keymap, set console keymap in the `/etc/default/keyboard` file.
|
||||
|
||||
### Hostname
|
||||
|
||||
```
|
||||
# echo "<your_hostname>" > /etc/hostname
|
||||
```
|
||||
|
||||
### Initramfs
|
||||
|
||||
```
|
||||
# update-initramfs -c -k all
|
||||
```
|
||||
|
||||
### Root password and shell
|
||||
|
||||
```
|
||||
# passwd root
|
||||
# chsh -s /bin/bash root
|
||||
```
|
||||
|
||||
### Create a user
|
||||
|
||||
```
|
||||
# useradd -m -G wheel -s /bin/bash <your_username>
|
||||
# passwd <your_username>
|
||||
```
|
||||
|
||||
### Boot loader
|
||||
|
||||
For EFI systems :
|
||||
```
|
||||
# apk add grub-x86_64-efi
|
||||
# grub-install --efi-directory=/boot/efi
|
||||
# update-grub
|
||||
```
|
||||
|
||||
For BIOS systems :
|
||||
```
|
||||
# apk add grub-i386-pc
|
||||
# grub-install /dev/sda
|
||||
# update-grub
|
||||
```
|
||||
|
||||
### Enable services at startup
|
||||
|
||||
* Network
|
||||
```
|
||||
# cd /etc/dinit.d/boot.d && ln -sf ../dhcpcd .
|
||||
```
|
||||
|
||||
* System logging
|
||||
```
|
||||
# cd /etc/dinit.d/boot.d && ln -sf ../syslog-ng .
|
||||
```
|
||||
|
||||
Optional services, pick up what you need :
|
||||
|
||||
* Firewall
|
||||
```
|
||||
# cd /etc/dinit.d/boot.d && ln -sf ../ufw .
|
||||
```
|
||||
> Don't forget to execute `ufw enable` at first boot.
|
||||
|
||||
* Cron
|
||||
```
|
||||
# cd /etc/dinit.d/boot.d && ln -sf ../crond .
|
||||
```
|
||||
|
||||
* SSH server
|
||||
```
|
||||
# cd /etc/dinit.d/boot.d && ln -sf ../sshd .
|
||||
```
|
||||
> If you don't have a user don't forget to enable root connection !
|
||||
|
||||
### Reboot
|
||||
|
||||
Exit the chroot environment by typing `exit` or pressing `Ctrl+d`, and restart the machine with `reboot`.
|
||||
If you don't need a graphical user interface, your system is ready to use !
|
||||
|
||||
## Desktop installation
|
||||
|
||||
Additional tasks to do if you wish to run graphical applications on the system.
|
||||
|
||||
### Network Manager
|
||||
|
||||
```
|
||||
# apk add networkmanager
|
||||
# dinitctl disable dhcpcd
|
||||
# dinitctl enable networkmanager
|
||||
```
|
||||
|
||||
### Gcompat
|
||||
|
||||
```
|
||||
# apk add gcompat
|
||||
```
|
||||
|
||||
### Flatpak
|
||||
|
||||
```
|
||||
# apk add flatpak
|
||||
# flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
```
|
||||
|
||||
### Gnome
|
||||
|
||||
Install the desktop environment :
|
||||
```
|
||||
# apk add '!gnome-apps'
|
||||
# apk add gnome gnome-console gnome-software gnome-system-monitor gnome-tweaks gnome-text-editor loupe evince
|
||||
```
|
||||
|
||||
If non `us` keymap, set the X11 keymap for GDM :
|
||||
```
|
||||
# localectl --no-convert set-x11-keymap fr
|
||||
```
|
||||
|
||||
Finally start the display manager :
|
||||
```
|
||||
# dinitctl enable gdm
|
||||
```
|
||||
|
||||
Your system is ready to use !
|
37
tips-and-tricks.md
Normal file
37
tips-and-tricks.md
Normal file
@ -0,0 +1,37 @@
|
||||
# Tips and tricks
|
||||
|
||||
## Some software I use
|
||||
|
||||
From Chimera Linux repositories :
|
||||
```
|
||||
$ doas apk add firefox gimp libreoffice libreoffice-lang_fr zola
|
||||
```
|
||||
|
||||
From Flathub :
|
||||
|
||||
* Freecad
|
||||
* VLC
|
||||
* VSCodium
|
||||
|
||||
## First-Time Git Setup
|
||||
|
||||
```
|
||||
$ git config --global user.name "John Doe"
|
||||
$ git config --global user.email johndoe@example.com
|
||||
```
|
||||
|
||||
## Colored bash prompts
|
||||
|
||||
For users :
|
||||
```
|
||||
$ echo -e "if [ -f ~/.bashrc ];\nthen\n\t. ~/.bashrc;\nfi" > .bash_profile
|
||||
$ echo "PS1='\[\e[32;1m\]\u@\H\[\e[39m\]:\[\e[95m\]\w\[\e[39m\]$ \[\e[0m\]'" > .bashrc
|
||||
```
|
||||
|
||||
For the root account :
|
||||
```
|
||||
# echo -e "if [ -f ~/.bashrc ];\nthen\n\t. ~/.bashrc;\nfi" > /root/.bash_profile
|
||||
# echo "PS1='\[\e[91;1m\]\u\[\e[91m\]@\[\e[91m\]\H\[\e[39m\]:\[\e[95m\]\w\[\e[39m\]# \[\e[0m\]'" > /root/.bashrc
|
||||
```
|
||||
|
||||
> You could use [this website](https://bash-prompt-generator.org) if you want to easily customize your prompts.
|
Loading…
x
Reference in New Issue
Block a user