Skip to content

Commit

Permalink
1.4.2
Browse files Browse the repository at this point in the history
* reenable watchdog
* add microcode hook
* add desktop variant
* certs
* renaming
  • Loading branch information
murkl committed Mar 20, 2024
1 parent 6ac3a01 commit c50c138
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 21 deletions.
3 changes: 1 addition & 2 deletions docs/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ ARCH_OS_BOOTSPLASH_ENABLED='true' # Bootsplash | Disable: false
ARCH_OS_DESKTOP_ENABLED='desktop' # Arch OS Desktop | Disable: false
ARCH_OS_MANAGER_ENABLED='true' # Arch OS Manager | Disable: false
ARCH_OS_SHELL_ENHANCEMENT_ENABLED='true' # Shell Enhancement | Disable: false
ARCH_OS_AUR_HELPER='paru' # AUR Helper | Default: paru | Disable: none | Recommended: paru, yay, trizen, pikaur
ARCH_OS_AUR_HELPER='paru-bin' # AUR Helper | Default: paru-bin | Disable: none | Recommended: paru, yay, trizen, pikaur
ARCH_OS_MULTILIB_ENABLED='true' # MultiLib 32 Bit Support | Disable: false
ARCH_OS_HOUSEKEEPING_ENABLED='true' # Housekeeping | Disable: false
ARCH_OS_REFLECTOR_COUNTRY='' # Country used by reflector | Default: null | Example: Germany,France
Expand Down Expand Up @@ -283,7 +283,6 @@ This configuration will be set during Arch OS Core Installation:

- `vm.max_map_count` is set to `1048576` for compatibility of some apps/games
- `DefaultTimeoutStopSec` is set to `10s` for faster shutdown
- `modprobe.blacklist=iTCO_wdt nowatchdog` is set to kernel parameters
- `quiet splash vt.global_cursor_default=0` is set to kernel parameters for silent boot
- Pacman parallel downloads is set to `5`
- Pacman colors and eyecandy is enabled
Expand Down
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This project aims to provide a robust Arch Linux base for desktop usage, along w
<p>
<strong>Test successful</strong>
<br>
<a target="_blank" href="https://www.archlinux.de/releases/2024.02.01">archlinux-2024.02.01-x86_64.iso</a>
<a target="_blank" href="https://www.archlinux.de/releases/2024.03.01">archlinux-2024.03.01-x86_64.iso</a>
<br>
<sub>100% shellcheck approved</sub>
</p>
Expand All @@ -52,7 +52,6 @@ This project aims to provide a robust Arch Linux base for desktop usage, along w
- Systemd Bootloader (auto updated)
- Systemd OOM (out-of-memory killer)
- Pacman parallel downloads & eyecandy
- Watchdog disabled
- Network Manager
- SSD Support (fstrim)
- Microcode Support (Intel/AMD)
Expand Down
Binary file modified docs/screenshots/installer_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 37 additions & 17 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export MODE="$1" # Start debug: ./installer.sh debug
# LICENCE: GPL 2.0

# VERSION
VERSION='1.4.1'
VERSION='1.4.2'
VERSION_GUM="0.13.0"

# ENVIRONMENT
Expand Down Expand Up @@ -473,7 +473,7 @@ select_enable_bootsplash() {
select_enable_desktop() {
if [ -z "$ARCH_OS_DESKTOP_ENABLED" ] || [ -z "$ARCH_OS_DESKTOP_GRAPHICS_DRIVER" ] || [ -z "$ARCH_OS_DESKTOP_KEYBOARD_LAYOUT" ]; then
local user_input options
user_input="false" && gum_confirm "Enable Arch OS Desktop?" && user_input="true"
user_input="false" && gum_confirm "Enable Desktop Environment?" && user_input="true"
ARCH_OS_DESKTOP_ENABLED="$user_input" # Set property
if [ "$ARCH_OS_DESKTOP_ENABLED" = "true" ]; then # If desktop is true set graphics driver and keyboard layout
options=("mesa" "intel_i915" "nvidia" "amd" "ati")
Expand All @@ -483,11 +483,14 @@ select_enable_desktop() {
user_input=$(gum_input --header " + Enter Desktop Keyboard Layout" --value "$ARCH_OS_DESKTOP_KEYBOARD_LAYOUT") || trap_gum_exit_confirm
[ -z "$user_input" ] && return 1 # Check if new value is null
ARCH_OS_DESKTOP_KEYBOARD_LAYOUT="$user_input" # Set property
user_input=$(gum_input --header " + Enter Desktop Keyboard Variant" --value "$ARCH_OS_DESKTOP_KEYBOARD_VARIANT") || trap_gum_exit_confirm
ARCH_OS_DESKTOP_KEYBOARD_VARIANT="$user_input" # Set property
fi
properties_generate # Generate properties file
fi
print_add "Arch OS Desktop is set to ${ARCH_OS_DESKTOP_ENABLED}"
print_add "Desktop Environment is set to ${ARCH_OS_DESKTOP_ENABLED}"
[ "$ARCH_OS_DESKTOP_ENABLED" = "true" ] && print_add "Desktop Keyboard Layout is set to ${ARCH_OS_DESKTOP_KEYBOARD_LAYOUT}"
[ "$ARCH_OS_DESKTOP_ENABLED" = "true" ] && [ -n "$ARCH_OS_DESKTOP_KEYBOARD_VARIANT" ] && print_add "Desktop Keyboard Variant is set to ${ARCH_OS_DESKTOP_KEYBOARD_VARIANT}"
[ "$ARCH_OS_DESKTOP_ENABLED" = "true" ] && print_add "Desktop Graphics Driver is set to ${ARCH_OS_DESKTOP_GRAPHICS_DRIVER}"
return 0
}
Expand All @@ -496,7 +499,7 @@ select_enable_desktop() {

select_enable_aur() {
if [ -z "$ARCH_OS_AUR_HELPER" ]; then
local user_input="none" && gum_confirm "Enable AUR Helper?" && user_input="paru"
local user_input="none" && gum_confirm "Enable AUR Helper?" && user_input="paru-bin"
ARCH_OS_AUR_HELPER="$user_input" && properties_generate # Set value and generate properties file
fi
print_add "AUR Helper is set to ${ARCH_OS_AUR_HELPER}"
Expand Down Expand Up @@ -708,16 +711,19 @@ exec_pacstrap_core() {
} >/mnt/etc/hosts

# Create initial ramdisk from /etc/mkinitcpio.conf
[ "$ARCH_OS_ENCRYPTION_ENABLED" = "true" ] && sed -i "s/^HOOKS=(.*)$/HOOKS=(base systemd keyboard autodetect modconf block sd-encrypt filesystems sd-vconsole fsck)/" /mnt/etc/mkinitcpio.conf
[ "$ARCH_OS_ENCRYPTION_ENABLED" = "false" ] && sed -i "s/^HOOKS=(.*)$/HOOKS=(base systemd keyboard autodetect modconf block filesystems sd-vconsole fsck)/" /mnt/etc/mkinitcpio.conf
# https://wiki.archlinux.org/title/Mkinitcpio#Common_hooks
# https://wiki.archlinux.org/title/Microcode#mkinitcpio
[ "$ARCH_OS_ENCRYPTION_ENABLED" = "true" ] && sed -i "s/^HOOKS=(.*)$/HOOKS=(base systemd keyboard autodetect microcode modconf block sd-encrypt filesystems sd-vconsole fsck)/" /mnt/etc/mkinitcpio.conf
[ "$ARCH_OS_ENCRYPTION_ENABLED" = "false" ] && sed -i "s/^HOOKS=(.*)$/HOOKS=(base systemd keyboard autodetect microcode modconf block filesystems sd-vconsole fsck)/" /mnt/etc/mkinitcpio.conf
arch-chroot /mnt mkinitcpio -P

# Install Bootloader to /boot (systemdboot)
arch-chroot /mnt bootctl --esp-path=/boot install # Install systemdboot to /boot

# Kernel args
# Zswap should be disabled when using zram (https://github.com/archlinux/archinstall/issues/881)
kernel_args_default="rw init=/usr/lib/systemd/systemd zswap.enabled=0 modprobe.blacklist=iTCO_wdt nowatchdog quiet splash vt.global_cursor_default=0"
# Silent boot: https://wiki.archlinux.org/title/Silent_boot
kernel_args_default="rw init=/usr/lib/systemd/systemd zswap.enabled=0 quiet splash vt.global_cursor_default=0"
[ "$ARCH_OS_ENCRYPTION_ENABLED" = "true" ] && kernel_args="rd.luks.name=$(blkid -s UUID -o value "${ARCH_OS_ROOT_PARTITION}")=cryptroot root=/dev/mapper/cryptroot ${kernel_args_default}"
[ "$ARCH_OS_ENCRYPTION_ENABLED" = "false" ] && kernel_args="root=PARTUUID=$(lsblk -dno PARTUUID "${ARCH_OS_ROOT_PARTITION}") ${kernel_args_default}"

Expand All @@ -733,7 +739,6 @@ exec_pacstrap_core() {
{
echo 'title Arch OS'
echo "linux /vmlinuz-${ARCH_OS_KERNEL}"
[ -n "$ARCH_OS_MICROCODE" ] && [ "$ARCH_OS_MICROCODE" != "none" ] && echo "initrd /${ARCH_OS_MICROCODE}.img"
echo "initrd /initramfs-${ARCH_OS_KERNEL}.img"
echo "options ${kernel_args}"
} >/mnt/boot/loader/entries/arch.conf
Expand All @@ -742,7 +747,6 @@ exec_pacstrap_core() {
{
echo 'title Arch OS (Fallback)'
echo "linux /vmlinuz-${ARCH_OS_KERNEL}"
[ -n "$ARCH_OS_MICROCODE" ] && [ "$ARCH_OS_MICROCODE" != "none" ] && echo "initrd /${ARCH_OS_MICROCODE}.img"
echo "initrd /initramfs-${ARCH_OS_KERNEL}-fallback.img"
echo "options ${kernel_args}"
} >/mnt/boot/loader/entries/arch-fallback.conf
Expand Down Expand Up @@ -787,17 +791,17 @@ exec_pacstrap_core() {
# ----------------------------------------------------------------------------------------------------

exec_install_desktop() {
local process_name="Install Arch OS Desktop System"
local process_name="Install Desktop Environment"
if [ "$ARCH_OS_DESKTOP_ENABLED" = "true" ]; then
process_init "$process_name"
(
[ "$MODE" = "debug" ] && sleep 1 && process_return 0 # If debug mode then return

# GNOME base packages
local packages=(gnome gnome-tweaks gnome-browser-connector gnome-themes-extra gnome-firmware power-profiles-daemon fwupd rygel cups)
local packages=(gnome gnome-tweaks gnome-browser-connector gnome-themes-extra gnome-firmware file-roller power-profiles-daemon rygel cups)

# GNOME wayland screensharing, flatpak & pipewire support
packages+=(xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-gnome)
packages+=(xdg-utils xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-gnome)

# Audio (Pipewire replacements + session manager)
packages+=(pipewire pipewire-alsa pipewire-pulse pipewire-jack wireplumber)
Expand All @@ -807,7 +811,10 @@ exec_install_desktop() {
packages+=(samba gvfs gvfs-mtp gvfs-smb gvfs-nfs gvfs-afc gvfs-goa gvfs-gphoto2 gvfs-google)

# Utils (https://wiki.archlinux.org/title/File_systems)
packages+=(git nfs-utils f2fs-tools udftools dosfstools lvm2 btrfs-progs ntfs-3g exfat-utils p7zip zip unzip unrar tar)
packages+=(git net-tools inetutils nfs-utils f2fs-tools udftools dosfstools ntfs-3g exfat-utils p7zip zip unzip unrar tar)

# Certificates
packages+=(ca-certificates)

# Codecs (https://wiki.archlinux.org/title/Codecs_and_containers)
packages+=(ffmpeg gstreamer gst-libav gst-plugin-pipewire gst-plugins-good gst-plugins-bad gst-plugins-ugly libdvdcss libheif webp-pixbuf-loader)
Expand Down Expand Up @@ -852,7 +859,7 @@ exec_install_desktop() {
echo 'XDG_DATA_HOME="${HOME}/.local/share"'
echo 'XDG_STATE_HOME="${HOME}/.local/state"'
echo 'XDG_CACHE_HOME="${HOME}/.cache" '
} >"/mnt/home/${ARCH_OS_USERNAME}/.config/environment.d/00-arch-os.conf"
} >"/mnt/home/${ARCH_OS_USERNAME}/.config/environment.d/00-arch.conf"

# Samba
mkdir -p "/mnt/etc/samba/"
Expand All @@ -877,6 +884,7 @@ exec_install_desktop() {
arch-chroot /mnt systemctl enable gdm.service # GNOME
arch-chroot /mnt systemctl enable bluetooth.service # Bluetooth
arch-chroot /mnt systemctl enable avahi-daemon # Network browsing service
arch-chroot /mnt systemctl enable power-profiles-daemon # Power daemon
arch-chroot /mnt systemctl enable cups.socket # Printer
arch-chroot /mnt systemctl enable smb.service # Samba
arch-chroot /mnt systemctl enable nmb.service # Samba
Expand All @@ -885,8 +893,20 @@ exec_install_desktop() {
arch-chroot /mnt /usr/bin/runuser -u "$ARCH_OS_USERNAME" -- systemctl enable --user wireplumber.service # Pipewire
arch-chroot /mnt /usr/bin/runuser -u "$ARCH_OS_USERNAME" -- systemctl enable --user gcr-ssh-agent.socket # GCR ssh-agent

# Hide desktop Aaplications icons
# Create users applications dir
mkdir -p "/mnt/home/${ARCH_OS_USERNAME}/.local/share/applications"

# Create UEFI Boot desktop entry
{
echo '[Desktop Entry]'
echo 'Name=Reboot to UEFI'
echo 'Icon=system-reboot'
echo 'Exec=systemctl reboot --firmware-setup'
echo 'Type=Application'
echo 'Terminal=false'
} >"/mnt/home/${ARCH_OS_USERNAME}/.local/share/applications/systemctl-reboot-firmware.desktop"

# Hide desktop Aaplications icons
echo -e '[Desktop Entry]\nType=Application\nHidden=true' >"/mnt/home/${ARCH_OS_USERNAME}/.local/share/applications/bssh.desktop"
echo -e '[Desktop Entry]\nType=Application\nHidden=true' >"/mnt/home/${ARCH_OS_USERNAME}/.local/share/applications/bvnc.desktop"
echo -e '[Desktop Entry]\nType=Application\nHidden=true' >"/mnt/home/${ARCH_OS_USERNAME}/.local/share/applications/avahi-discover.desktop"
Expand Down Expand Up @@ -919,7 +939,7 @@ exec_install_desktop() {
# ----------------------------------------------------------------------------------------------------

exec_install_graphics_driver() {
local process_name="Install Graphics Driver"
local process_name="Install Desktop Graphics Driver"
if [ -n "$ARCH_OS_DESKTOP_GRAPHICS_DRIVER" ] && [ "$ARCH_OS_DESKTOP_GRAPHICS_DRIVER" != "none" ]; then
process_init "$process_name"
(
Expand All @@ -943,7 +963,7 @@ exec_install_graphics_driver() {
chroot_pacman_install "${packages[@]}"
# https://wiki.archlinux.org/title/NVIDIA#DRM_kernel_mode_setting
# Alternative (slow boot, bios logo twice, but correct plymouth resolution):
#sed -i "s/nowatchdog quiet/nowatchdog nvidia_drm.modeset=1 nvidia_drm.fbdev=1 quiet/g" /mnt/boot/loader/entries/arch.conf
#sed -i "s/zswap.enabled=0 quiet/zswap.enabled=0 nvidia_drm.modeset=1 nvidia_drm.fbdev=1 quiet/g" /mnt/boot/loader/entries/arch.conf
mkdir -p /mnt/etc/modprobe.d/ && echo -e 'options nvidia_drm modeset=1 fbdev=1' >/mnt/etc/modprobe.d/nvidia.conf
sed -i "s/^MODULES=(.*)/MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)/g" /mnt/etc/mkinitcpio.conf
# https://wiki.archlinux.org/title/NVIDIA#pacman_hook
Expand Down

0 comments on commit c50c138

Please sign in to comment.