GithubHelp home page GithubHelp logo

hidingcherry / ansible-archlinux-encrypted-root Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 47 KB

ansible script to install a fully encrypted archlinux system

License: GNU Affero General Public License v3.0

ansible ansible-galaxy ansible-playbook ansible-playbooks ansible-role ansible-roles installation installation-automation installation-guides installation-script installation-scripts iso linux os

ansible-archlinux-encrypted-root's People

Contributors

martinx3 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

ansible-archlinux-encrypted-root's Issues

FAQ - RESET IPMI

You need to reset the IPMI.
Please reboot on rescue mode (Ubuntu 18).
Then execute this command:

sudo ipmitool mc reset cold

Wait 5 min, reboot the server on normal mode and create a new IPMI session.
The issue should be fixed.

add tags or roles for different server capabilities

Different server cababilities allows different feature-sets
If we assume that the basic server has less than 6GB ram, on top of the basic features a 6GB ram server could handle:

  • ~/.cache in tmpfs

If we assume that the basic server has AES-NI, but not a different server:

  • use serpent-xts with 512b

If the server has UEFI

  • Add uefi (partition) support with systemd-boot and xbootldr partition and it's hook

Change temrinal default editor to nano

It's enough to install the nano package and remove the vi(m) package.
Otherwise the administrator will be lost forever inside the vim editor until someone tells him how to leave it.

Add automatic update server mirror fetcher

and

# /etc/pacman.d/hooks/mirrorupgrade.hook
[Trigger]
Operation = Upgrade
Type = Package
Target = pacman-mirrorlist

[Action]
Description = Updating pacman-mirrorlist with reflector and removing pacnew...
When = PostTransaction
Depends = reflector
Exec = /bin/sh -c 'systemctl start reflector.service; if [ -f /etc/pacman.d/mirrorlist.pacnew ]; then rm /etc/pacman.d/mirrorlist.pacnew; fi'

Add makepkg optimizations

We love an optimized buildtime

# /etc/profile.d/makepkg.sh
export PATH="/usr/lib/ccache/bin/:$PATH"
export PATH="/usr/lib/colorgcc/bin/:$PATH"    # As per usual colorgcc installation, leave unchanged (don't add ccache)
export CCACHE_PATH="/usr/bin"                 # Tell ccache to only use compilers here

And the optimizations of /etc/makepkg.conf here: https://wiki.archlinux.org/title/Makepkg#Tips_and_tricks

TODO: readme - add information to kernelModules

I haven't really noted the kernel modules.
If the system has special devices, which require some modules on boot - they need to be added into the host_vars/MyHostname.yml file, so the initrd contains the required files and can boot/load the devices accordingly.

TODO: make optional - wipe /etc/securetty

Currently /etc/securetty is being wiped - no login over any tty is possible anymore (my goal is a safe headless server).
This is probably not liked on a server at home - or frequent(?) direct access.

Add a colored diffprog for pacdiff

If pacdiff is needed the update process of pacman or paru should hint conflicts in changed files and we should have a good terminal diff app by default

# /etc/profile.d/diffprog.sh
# Used as diff app for apps like pacdiff (for .pacnew files)
export DIFFPROG=colordiff

and

# /etc/pacman.d/hooks/pacdiff.hook
[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Package
Target = *
[Action]
Description = Runs pacdiff utility
When = PostTransaction
Exec = /usr/bin/pacdiff

Add AUR helper

Add AUR helper

sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
paru -Syu paru-bin

And optimize its config

# /etc/paru.conf
Devel
#RemoveMake
CleanAfter
NewsOnUpgrade
SkipReview

TODO: user-passwords via prompt

The user password is defined as a variable (uh, bad bad bad) - it is better to ask for the password at the beginning of the task.

Reload microcode on update

# /etc/pacman.d/hooks/microcode_reload.hook
[Trigger]
Operation = Upgrade
Type = Path
Target = usr/lib/firmware/amd-ucode/*

[Action]
Description = Applying CPU microcode updates...
When = PostTransaction
Depends = sh
Exec = /bin/sh -c 'echo 1 > /sys/devices/system/cpu/microcode/reload'

Readme is missing

I need a manual to use this project

  • dependencies
  • bash commands
  • env variables
  • etc

It's important to know a list of parameter we should, must or need to change

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.