From 37bb556e40ff20814d4e88d51efddbb2f425be8a Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Fri, 26 Jan 2024 22:41:44 +0400 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=94=84=20Sync=20with=20archiso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archiso/airootfs/etc/environment | 1 - archiso/airootfs/etc/mkinitcpio.conf | 73 ----------- .../etc/mkinitcpio.conf.d/archiso.conf | 2 + .../airootfs/etc/mkinitcpio.d/linux.preset | 2 +- archiso/airootfs/etc/ssh/sshd_config | 116 ------------------ .../etc/ssh/sshd_config.d/10-archiso.conf | 3 + archiso/airootfs/etc/systemd/journald.conf | 44 ------- archiso/airootfs/etc/systemd/logind.conf | 38 ------ .../ipv6-privacy-extensions.conf | 2 + .../etc/systemd/network/20-ethernet.network | 24 ++++ .../etc/systemd/network/20-wlan.network | 20 +++ .../etc/systemd/network/20-wwan.network | 19 +++ .../system/dbus-org.freedesktop.Avahi.service | 1 - .../systemd/system/etc-pacman.d-gnupg.mount | 3 +- .../system/sockets.target.wants/pcscd.socket | 1 + archiso/airootfs/root/.automated_script.sh | 27 ++-- archiso/airootfs/root/.gnupg/scdaemon.conf | 4 + archiso/airootfs/root/.zlogin | 3 +- archiso/airootfs/usr/local/bin/choose-mirror | 18 +-- .../entries/01-archiso-x86_64-linux.conf | 2 +- .../entries/02-archiso-x86_64-linux-nv.conf | 2 +- archiso/efiboot/loader/entries/fallback.conf | 2 +- archiso/grub/grub.cfg | 51 ++++---- archiso/grub/loopback.cfg | 81 ++++++++++++ archiso/packages_gnome.x86_64 | 15 +-- archiso/packages_kde.x86_64 | 8 +- archiso/packages_xfce.x86_64 | 16 +-- archiso/profiledef.sh | 3 +- archiso/syslinux/archiso_pxe-linux.cfg | 6 +- archiso/syslinux/archiso_sys-linux.cfg | 6 +- 30 files changed, 251 insertions(+), 342 deletions(-) delete mode 100644 archiso/airootfs/etc/mkinitcpio.conf create mode 100644 archiso/airootfs/etc/mkinitcpio.conf.d/archiso.conf delete mode 100644 archiso/airootfs/etc/ssh/sshd_config create mode 100644 archiso/airootfs/etc/ssh/sshd_config.d/10-archiso.conf delete mode 100644 archiso/airootfs/etc/systemd/journald.conf delete mode 100644 archiso/airootfs/etc/systemd/logind.conf create mode 100644 archiso/airootfs/etc/systemd/network.conf.d/ipv6-privacy-extensions.conf create mode 100644 archiso/airootfs/etc/systemd/network/20-ethernet.network create mode 100644 archiso/airootfs/etc/systemd/network/20-wlan.network create mode 100644 archiso/airootfs/etc/systemd/network/20-wwan.network delete mode 120000 archiso/airootfs/etc/systemd/system/dbus-org.freedesktop.Avahi.service create mode 120000 archiso/airootfs/etc/systemd/system/sockets.target.wants/pcscd.socket create mode 100644 archiso/airootfs/root/.gnupg/scdaemon.conf create mode 100644 archiso/grub/loopback.cfg diff --git a/archiso/airootfs/etc/environment b/archiso/airootfs/etc/environment index b40c14d..0a2ce11 100644 --- a/archiso/airootfs/etc/environment +++ b/archiso/airootfs/etc/environment @@ -1,3 +1,2 @@ -EDITOR=vim QT_QPA_PLATFORMTHEME=qt5ct ZPOOL_VDEV_NAME_PATH=1 diff --git a/archiso/airootfs/etc/mkinitcpio.conf b/archiso/airootfs/etc/mkinitcpio.conf deleted file mode 100644 index 53217b8..0000000 --- a/archiso/airootfs/etc/mkinitcpio.conf +++ /dev/null @@ -1,73 +0,0 @@ -# vim:set ft=sh -# MODULES -# The following modules are loaded before any boot hooks are -# run. Advanced users may wish to specify all system modules -# in this array. For instance: -# MODULES=(usbhid xhci_hcd) -MODULES=() - -# BINARIES -# This setting includes any additional binaries a given user may -# wish into the CPIO image. This is run last, so it may be used to -# override the actual binaries included by a given hook -# BINARIES are dependency parsed, so you may safely ignore libraries -BINARIES=() - -# FILES -# This setting is similar to BINARIES above, however, files are added -# as-is and are not parsed in any way. This is useful for config files. -FILES=() - -# HOOKS -# This is the most important setting in this file. The HOOKS control the -# modules and scripts added to the image, and what happens at boot time. -# Order is important, and it is recommended that you do not change the -# order in which HOOKS are added. Run 'mkinitcpio -H ' for -# help on a given hook. -# 'base' is _required_ unless you know precisely what you are doing. -# 'udev' is _required_ in order to automatically load modules -# 'filesystems' is _required_ unless you specify your fs modules in MODULES -# Examples: -## This setup specifies all modules in the MODULES setting above. -## No RAID, lvm2, or encrypted root is needed. -# HOOKS=(base) -# -## This setup will autodetect all modules for your system and should -## work as a sane default -# HOOKS=(base udev autodetect modconf block filesystems fsck) -# -## This setup will generate a 'full' image which supports most systems. -## No autodetection is done. -# HOOKS=(base udev modconf block filesystems fsck) -# -## This setup assembles a mdadm array with an encrypted root file system. -## Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices. -# HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck) -# -## This setup loads an lvm2 volume group. -# HOOKS=(base udev modconf block lvm2 filesystems fsck) -# -## NOTE: If you have /usr on a separate partition, you MUST include the -# usr and fsck hooks. -HOOKS=(base udev modconf memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs kms block filesystems keyboard) - -# COMPRESSION -# Use this to compress the initramfs image. By default, zstd compression -# is used. Use 'cat' to create an uncompressed image. -#COMPRESSION="zstd" -#COMPRESSION="gzip" -#COMPRESSION="bzip2" -#COMPRESSION="lzma" -#COMPRESSION="xz" -#COMPRESSION="lzop" -#COMPRESSION="lz4" - -# COMPRESSION_OPTIONS -# Additional options for the compressor -#COMPRESSION_OPTIONS=() - -# MODULES_DECOMPRESS -# Decompress kernel modules during initramfs creation. -# Enable to speedup boot process, disable to save RAM -# during early userspace. Switch (yes/no). -#MODULES_DECOMPRESS="yes" diff --git a/archiso/airootfs/etc/mkinitcpio.conf.d/archiso.conf b/archiso/airootfs/etc/mkinitcpio.conf.d/archiso.conf new file mode 100644 index 0000000..b4b3095 --- /dev/null +++ b/archiso/airootfs/etc/mkinitcpio.conf.d/archiso.conf @@ -0,0 +1,2 @@ +HOOKS=(base udev modconf kms memdisk archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs block filesystems keyboard) +COMPRESSION="xz" diff --git a/archiso/airootfs/etc/mkinitcpio.d/linux.preset b/archiso/airootfs/etc/mkinitcpio.d/linux.preset index ed167b1..3dcc5a1 100644 --- a/archiso/airootfs/etc/mkinitcpio.d/linux.preset +++ b/archiso/airootfs/etc/mkinitcpio.d/linux.preset @@ -3,6 +3,6 @@ PRESETS=('archiso') ALL_kver='/boot/vmlinuz-linux-cachyos' -ALL_config='/etc/mkinitcpio.conf' +archiso_config='/etc/mkinitcpio.conf.d/archiso.conf' archiso_image="/boot/initramfs-linux-cachyos.img" diff --git a/archiso/airootfs/etc/ssh/sshd_config b/archiso/airootfs/etc/ssh/sshd_config deleted file mode 100644 index 93f7d63..0000000 --- a/archiso/airootfs/etc/ssh/sshd_config +++ /dev/null @@ -1,116 +0,0 @@ -# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $ - -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/local/sbin:/usr/local/bin:/usr/bin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented. Uncommented options override the -# default value. - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: - -#HostKey /etc/ssh/ssh_host_rsa_key -#HostKey /etc/ssh/ssh_host_ecdsa_key -#HostKey /etc/ssh/ssh_host_ed25519_key - -# Ciphers and keying -#RekeyLimit default none - -# Logging -#SyslogFacility AUTH -#LogLevel INFO - -# Authentication: - -#LoginGraceTime 2m -PermitRootLogin yes -#StrictModes yes -#MaxAuthTries 6 -#MaxSessions 10 - -#PubkeyAuthentication yes - -# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys - -#AuthorizedPrincipalsFile none - -#AuthorizedKeysCommand none -#AuthorizedKeysCommandUser nobody - -# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts -#HostbasedAuthentication no -# Change to yes if you don't trust ~/.ssh/known_hosts for -# HostbasedAuthentication -#IgnoreUserKnownHosts no -# Don't read the user's ~/.rhosts and ~/.shosts files -#IgnoreRhosts yes - -# To disable tunneled clear text passwords, change to no here! -#PasswordAuthentication yes -#PermitEmptyPasswords no - -# Change to no to disable s/key passwords -#KbdInteractiveAuthentication yes - -# Kerberos options -#KerberosAuthentication no -#KerberosOrLocalPasswd yes -#KerberosTicketCleanup yes -#KerberosGetAFSToken no - -# GSSAPI options -#GSSAPIAuthentication no -#GSSAPICleanupCredentials yes - -# Set this to 'yes' to enable PAM authentication, account processing, -# and session processing. If this is enabled, PAM authentication will -# be allowed through the KbdInteractiveAuthentication and -# PasswordAuthentication. Depending on your PAM configuration, -# PAM authentication via KbdInteractiveAuthentication may bypass -# the setting of "PermitRootLogin without-password". -# If you just want the PAM account and session checks to run without -# PAM authentication, then enable this but set PasswordAuthentication -# and KbdInteractiveAuthentication to 'no'. -UsePAM yes - -#AllowAgentForwarding yes -#AllowTcpForwarding yes -#GatewayPorts no -#X11Forwarding no -#X11DisplayOffset 10 -#X11UseLocalhost yes -#PermitTTY yes -PrintMotd no # pam does that -#PrintLastLog yes -#TCPKeepAlive yes -#PermitUserEnvironment no -#Compression delayed -#ClientAliveInterval 0 -#ClientAliveCountMax 3 -#UseDNS no -#PidFile /run/sshd.pid -#MaxStartups 10:30:100 -#PermitTunnel no -#ChrootDirectory none -#VersionAddendum none - -# no default banner path -#Banner none - -# override default of no subsystems -Subsystem sftp /usr/lib/ssh/sftp-server - -# Example of overriding settings on a per-user basis -#Match User anoncvs -# X11Forwarding no -# AllowTcpForwarding no -# PermitTTY no -# ForceCommand cvs server diff --git a/archiso/airootfs/etc/ssh/sshd_config.d/10-archiso.conf b/archiso/airootfs/etc/ssh/sshd_config.d/10-archiso.conf new file mode 100644 index 0000000..6ea7b41 --- /dev/null +++ b/archiso/airootfs/etc/ssh/sshd_config.d/10-archiso.conf @@ -0,0 +1,3 @@ +# Allow root login using password authentication +PasswordAuthentication yes +PermitRootLogin yes diff --git a/archiso/airootfs/etc/systemd/journald.conf b/archiso/airootfs/etc/systemd/journald.conf deleted file mode 100644 index 6e11247..0000000 --- a/archiso/airootfs/etc/systemd/journald.conf +++ /dev/null @@ -1,44 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. -# -# See journald.conf(5) for details. - -[Journal] -Storage=volatile -#Compress=yes -#Seal=yes -#SplitMode=uid -#SyncIntervalSec=5m -#RateLimitIntervalSec=30s -#RateLimitBurst=10000 -#SystemMaxUse= -#SystemKeepFree= -#SystemMaxFileSize= -#SystemMaxFiles=100 -#RuntimeMaxUse= -#RuntimeKeepFree= -#RuntimeMaxFileSize= -#RuntimeMaxFiles=100 -#MaxRetentionSec= -#MaxFileSec=1month -#ForwardToSyslog=no -#ForwardToKMsg=no -#ForwardToConsole=no -#ForwardToWall=yes -#TTYPath=/dev/console -#MaxLevelStore=debug -#MaxLevelSyslog=debug -#MaxLevelKMsg=notice -#MaxLevelConsole=info -#MaxLevelWall=emerg -#LineMax=48K -#ReadKMsg=yes -#Audit=yes diff --git a/archiso/airootfs/etc/systemd/logind.conf b/archiso/airootfs/etc/systemd/logind.conf deleted file mode 100644 index 72b3254..0000000 --- a/archiso/airootfs/etc/systemd/logind.conf +++ /dev/null @@ -1,38 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. -# -# See logind.conf(5) for details. - -[Login] -#NAutoVTs=6 -#ReserveVT=6 -#KillUserProcesses=no -#KillOnlyUsers= -#KillExcludeUsers=root -#InhibitDelayMaxSec=5 -#HandlePowerKey=poweroff -HandleSuspendKey=ignore -HandleHibernateKey=ignore -HandleLidSwitch=ignore -#HandleLidSwitchExternalPower=suspend -#HandleLidSwitchDocked=ignore -#PowerKeyIgnoreInhibited=no -#SuspendKeyIgnoreInhibited=no -#HibernateKeyIgnoreInhibited=no -#LidSwitchIgnoreInhibited=yes -#HoldoffTimeoutSec=30s -#IdleAction=ignore -#IdleActionSec=30min -#RuntimeDirectorySize=10% -#RuntimeDirectoryInodes=400k -#RemoveIPC=yes -#InhibitorsMax=8192 -#SessionsMax=8192 diff --git a/archiso/airootfs/etc/systemd/network.conf.d/ipv6-privacy-extensions.conf b/archiso/airootfs/etc/systemd/network.conf.d/ipv6-privacy-extensions.conf new file mode 100644 index 0000000..0e9ceb4 --- /dev/null +++ b/archiso/airootfs/etc/systemd/network.conf.d/ipv6-privacy-extensions.conf @@ -0,0 +1,2 @@ +[Network] +IPv6PrivacyExtensions=yes diff --git a/archiso/airootfs/etc/systemd/network/20-ethernet.network b/archiso/airootfs/etc/systemd/network/20-ethernet.network new file mode 100644 index 0000000..d3a3271 --- /dev/null +++ b/archiso/airootfs/etc/systemd/network/20-ethernet.network @@ -0,0 +1,24 @@ +[Match] +# Matching with "Type=ether" causes issues with containers because it also matches virtual Ethernet interfaces (veth*). +# See https://bugs.archlinux.org/task/70892 +# Instead match by globbing the network interface name. +Name=en* +Name=eth* + +[Link] +RequiredForOnline=routable + +[Network] +DHCP=yes +MulticastDNS=yes + +# systemd-networkd does not set per-interface-type default route metrics +# https://github.com/systemd/systemd/issues/17698 +# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband. +# Use values from NetworkManager. From nm_device_get_route_metric_default in +# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c +[DHCPv4] +RouteMetric=100 + +[IPv6AcceptRA] +RouteMetric=100 diff --git a/archiso/airootfs/etc/systemd/network/20-wlan.network b/archiso/airootfs/etc/systemd/network/20-wlan.network new file mode 100644 index 0000000..8b70a95 --- /dev/null +++ b/archiso/airootfs/etc/systemd/network/20-wlan.network @@ -0,0 +1,20 @@ +[Match] +Name=wl* + +[Link] +RequiredForOnline=routable + +[Network] +DHCP=yes +MulticastDNS=yes + +# systemd-networkd does not set per-interface-type default route metrics +# https://github.com/systemd/systemd/issues/17698 +# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband. +# Use values from NetworkManager. From nm_device_get_route_metric_default in +# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c +[DHCPv4] +RouteMetric=600 + +[IPv6AcceptRA] +RouteMetric=600 diff --git a/archiso/airootfs/etc/systemd/network/20-wwan.network b/archiso/airootfs/etc/systemd/network/20-wwan.network new file mode 100644 index 0000000..6e1c8dd --- /dev/null +++ b/archiso/airootfs/etc/systemd/network/20-wwan.network @@ -0,0 +1,19 @@ +[Match] +Name=ww* + +[Link] +RequiredForOnline=routable + +[Network] +DHCP=yes + +# systemd-networkd does not set per-interface-type default route metrics +# https://github.com/systemd/systemd/issues/17698 +# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband. +# Use values from NetworkManager. From nm_device_get_route_metric_default in +# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c +[DHCPv4] +RouteMetric=700 + +[IPv6AcceptRA] +RouteMetric=700 diff --git a/archiso/airootfs/etc/systemd/system/dbus-org.freedesktop.Avahi.service b/archiso/airootfs/etc/systemd/system/dbus-org.freedesktop.Avahi.service deleted file mode 120000 index e7ae405..0000000 --- a/archiso/airootfs/etc/systemd/system/dbus-org.freedesktop.Avahi.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/avahi-daemon.service \ No newline at end of file diff --git a/archiso/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount b/archiso/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount index 4eab551..db9784f 100644 --- a/archiso/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount +++ b/archiso/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount @@ -5,4 +5,5 @@ Description=Temporary /etc/pacman.d/gnupg directory What=tmpfs Where=/etc/pacman.d/gnupg Type=tmpfs -Options=mode=0755 +Options=mode=0755,noswap + diff --git a/archiso/airootfs/etc/systemd/system/sockets.target.wants/pcscd.socket b/archiso/airootfs/etc/systemd/system/sockets.target.wants/pcscd.socket new file mode 120000 index 0000000..3897c63 --- /dev/null +++ b/archiso/airootfs/etc/systemd/system/sockets.target.wants/pcscd.socket @@ -0,0 +1 @@ +/usr/lib/systemd/system/pcscd.socket \ No newline at end of file diff --git a/archiso/airootfs/root/.automated_script.sh b/archiso/airootfs/root/.automated_script.sh index 52c47e6..b67686f 100755 --- a/archiso/airootfs/root/.automated_script.sh +++ b/archiso/airootfs/root/.automated_script.sh @@ -1,22 +1,29 @@ #!/usr/bin/env bash -script_cmdline () -{ +script_cmdline() { local param - for param in $(< /proc/cmdline); do + for param in $(/dev/null + if [[ "${script}" =~ ^((http|https|ftp|tftp)://) ]]; then + # there's no synchronization for network availability before executing this script + printf '%s: waiting for network-online.target\n' "$0" + until systemctl --quiet is-active network-online.target; do + sleep 1 + done + printf '%s: downloading %s\n' "$0" "${script}" + curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script rt=$? else cp "${script}" /tmp/startup_script @@ -24,6 +31,9 @@ automated_script () fi if [[ ${rt} -eq 0 ]]; then chmod +x /tmp/startup_script + printf '%s: executing automated script\n' "$0" + # note that script is executed when other services (like pacman-init) may be still in progress, please + # synchronize to "systemctl is-system-running --wait" when your script depends on other services /tmp/startup_script fi fi @@ -32,3 +42,4 @@ automated_script () if [[ $(tty) == "/dev/tty1" ]]; then automated_script fi + diff --git a/archiso/airootfs/root/.gnupg/scdaemon.conf b/archiso/airootfs/root/.gnupg/scdaemon.conf new file mode 100644 index 0000000..e1f3d1f --- /dev/null +++ b/archiso/airootfs/root/.gnupg/scdaemon.conf @@ -0,0 +1,4 @@ +disable-ccid +disable-pinpad +pcsc-driver /usr/lib/libpcsclite.so +pcsc-shared diff --git a/archiso/airootfs/root/.zlogin b/archiso/airootfs/root/.zlogin index 0fb119d..7cd536c 100644 --- a/archiso/airootfs/root/.zlogin +++ b/archiso/airootfs/root/.zlogin @@ -1,6 +1,7 @@ # fix for screen readers -if grep -Fq 'accessibility=' /proc/cmdline &> /dev/null; then +if grep -Fqa 'accessibility=' /proc/cmdline &> /dev/null; then setopt SINGLE_LINE_ZLE fi ~/.automated_script.sh + diff --git a/archiso/airootfs/usr/local/bin/choose-mirror b/archiso/airootfs/usr/local/bin/choose-mirror index b021945..3d26fad 100755 --- a/archiso/airootfs/usr/local/bin/choose-mirror +++ b/archiso/airootfs/usr/local/bin/choose-mirror @@ -4,21 +4,22 @@ get_cmdline() { local param - for param in $(< /proc/cmdline); do + for param in $(/etc/pacman.d/mirrorlist << EOF +cat >/etc/pacman.d/mirrorlist </etc/pacman.d/mirrorlist << EOF Server = ${mirror%%/}/\$repo/os/\$arch EOF + diff --git a/archiso/efiboot/loader/entries/01-archiso-x86_64-linux.conf b/archiso/efiboot/loader/entries/01-archiso-x86_64-linux.conf index ee06d9f..54e2acc 100644 --- a/archiso/efiboot/loader/entries/01-archiso-x86_64-linux.conf +++ b/archiso/efiboot/loader/entries/01-archiso-x86_64-linux.conf @@ -4,4 +4,4 @@ linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos initrd /%INSTALL_DIR%/boot/intel-ucode.img initrd /%INSTALL_DIR%/boot/amd-ucode.img initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes +options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes diff --git a/archiso/efiboot/loader/entries/02-archiso-x86_64-linux-nv.conf b/archiso/efiboot/loader/entries/02-archiso-x86_64-linux-nv.conf index fb495cf..65a91b3 100644 --- a/archiso/efiboot/loader/entries/02-archiso-x86_64-linux-nv.conf +++ b/archiso/efiboot/loader/entries/02-archiso-x86_64-linux-nv.conf @@ -4,4 +4,4 @@ linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos initrd /%INSTALL_DIR%/boot/intel-ucode.img initrd /%INSTALL_DIR%/boot/amd-ucode.img initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G nvidia nvidia-drm.modeset=1 nvidia-drm.fbdev=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr +options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G nvidia nvidia-drm.modeset=1 nvidia-drm.fbdev=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr diff --git a/archiso/efiboot/loader/entries/fallback.conf b/archiso/efiboot/loader/entries/fallback.conf index 8f205d1..75129df 100644 --- a/archiso/efiboot/loader/entries/fallback.conf +++ b/archiso/efiboot/loader/entries/fallback.conf @@ -2,4 +2,4 @@ title CachyOS x86_64 Fallback (nomodeset) sort-key C linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm nomodeset nvme_load=yes +options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm nomodeset nvme_load=yes diff --git a/archiso/grub/grub.cfg b/archiso/grub/grub.cfg index 92911df..f2e1f80 100644 --- a/archiso/grub/grub.cfg +++ b/archiso/grub/grub.cfg @@ -2,10 +2,10 @@ # Default "GIT", because if somebody outside from the DEVs create a ISO, this ISO wouldnt have a specific Version number. CACHYOS_VERSION="GIT" -if [ "${grub_platform}" == "efi" ]; then - bios_or_uefi="(UEFI)!" - else - bios_or_uefi="(BIOS)!" +if [ "${grub_platform}" == 'efi' ]; then + bios_or_uefi='(UEFI)!' +else + bios_or_uefi='(BIOS)!' fi # Load partition table and file system modules @@ -19,16 +19,20 @@ insmod exfat insmod udf # Use graphics-mode output -insmod all_video insmod font if loadfont "${prefix}/fonts/unicode.pf2" ; then - insmod gfxterm + insmod all_video set gfxmode="auto" terminal_input console terminal_output gfxterm fi # Enable serial console +insmod serial +insmod usbserial_common +insmod usbserial_ftdi +insmod usbserial_pl2303 +insmod usbserial_usbdebug if serial --unit=0 --speed=115200; then terminal_input --append serial terminal_output --append serial @@ -51,10 +55,10 @@ timeout_style=menu # Welcome Text menuentry "Welcome to CachyOS $CACHYOS_VERSION Live ISO $bios_or_uefi" { insmod ext2 -} +} menuentry "----------------------------------------------------" { insmod ext2 -} +} # Menu entries @@ -76,19 +80,20 @@ menuentry "CachyOS Legacy Hardware (GPU nomodeset)" --class arch --class gnu-lin initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img } -if [ "${grub_platform}" == "efi" ]; then - if [ "${grub_cpu}" == "x86_64" ]; then - menuentry "Run Memtest86+ (RAM test)" --class memtest86 --class memtest --class gnu --class tool { - set gfxpayload=800x600,1024x768 - linux /boot/memtest86+/memtest.efi - } - menuentry "UEFI Shell" --class efi { - insmod chain +if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then + menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool { + set gfxpayload=800x600,1024x768 + linux /boot/memtest86+/memtest.efi + } +fi + +if [ "${grub_platform}" == 'efi' ]; then + if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then + menuentry 'UEFI Shell' --class efi { chainloader /shellx64.efi } - elif [ "${grub_cpu}" == "i386" ]; then - menuentry "UEFI Shell" --class efi { - insmod chain + elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then + menuentry 'UEFI Shell' --class efi { chainloader /shellia32.efi } fi @@ -98,12 +103,12 @@ if [ "${grub_platform}" == "efi" ]; then } fi -menuentry "System shutdown" --class shutdown --class poweroff { - echo "System shutting down..." +menuentry 'System shutdown' --class shutdown --class poweroff { + echo 'System shutting down...' halt } -menuentry "System restart" --class reboot --class restart { - echo "System rebooting..." +menuentry 'System restart' --class reboot --class restart { + echo 'System rebooting...' reboot } diff --git a/archiso/grub/loopback.cfg b/archiso/grub/loopback.cfg new file mode 100644 index 0000000..5717f28 --- /dev/null +++ b/archiso/grub/loopback.cfg @@ -0,0 +1,81 @@ +# Defining the Version of the ISO. This line could be easy changed by a Script wich do that automatic before creating ISO self. +# Default "GIT", because if somebody outside from the DEVs create a ISO, this ISO wouldnt have a specific Version number. +CACHYOS_VERSION="GIT" + +if [ "${grub_platform}" == 'efi' ]; then + bios_or_uefi='(UEFI)!' +else + bios_or_uefi='(BIOS)!' +fi + +# https://www.supergrubdisk.org/wiki/Loopback.cfg + +# Search for the ISO volume +search --no-floppy --set=archiso_img_dev --file "${iso_path}" +probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}" + +# Set default menu entry +default=cachyos +timeout=10 +timeout_style=menu + +# Welcome Text +menuentry "Welcome to CachyOS $CACHYOS_VERSION Live ISO $bios_or_uefi" { +insmod ext2 +} +menuentry "----------------------------------------------------" { +insmod ext2 +} + + +# Menu entries +menuentry "CachyOS" --class arch --class gnu-linux --class gnu --class os --id 'cachyos' { + set gfxpayload=keep + linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 nvme_load=yes + initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img +} + +menuentry "CachyOS with NVIDIA closed-source Driver (latest cards only 900+)" --class arch --class gnu-linux --class gnu --class os --id 'cachyos-nvidia' { + set gfxpayload=keep + linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nvidia-drm.fbdev=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspkr + initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img +} + +menuentry "CachyOS Legacy Hardware (GPU nomodeset)" --class arch --class gnu-linux --class gnu --class os --id 'cachyos-fallback' { + set gfxpayload=keep + linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm nomodeset nvme_load=yes + initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img +} + +if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then + menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class memtest --class gnu --class tool { + set gfxpayload=800x600,1024x768 + linux /boot/memtest86+/memtest.efi + } +fi + +if [ "${grub_platform}" == 'efi' ]; then + if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then + menuentry 'UEFI Shell' --class efi { + chainloader /shellx64.efi + } + elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then + menuentry 'UEFI Shell' --class efi { + chainloader /shellia32.efi + } + fi + + menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' { + fwsetup + } +fi + +menuentry 'System shutdown' --class shutdown --class poweroff { + echo 'System shutting down...' + halt +} + +menuentry 'System restart' --class reboot --class restart { + echo 'System rebooting...' + reboot +} diff --git a/archiso/packages_gnome.x86_64 b/archiso/packages_gnome.x86_64 index ed4fadf..f65aad1 100644 --- a/archiso/packages_gnome.x86_64 +++ b/archiso/packages_gnome.x86_64 @@ -10,6 +10,7 @@ b43-fwcutter base base-devel bash-completion +bcachefs-tools bind bind-tools bluez @@ -36,6 +37,7 @@ cachyos-v4-mirrorlist cachyos-zsh-config cantarell-fonts capitaine-cursors +chwd ckbcomp clonezilla cloud-init @@ -121,9 +123,9 @@ jfsutils kitty-terminfo kpmcore kvantum +ldns less lftp -lib32-wayland libfido2 libusb-compat libwnck3 @@ -146,7 +148,6 @@ mdadm memtest86+ memtest86+-efi mesa -chwd mkinitcpio mkinitcpio-archiso mkinitcpio-nfs-utils @@ -159,8 +160,8 @@ nano-syntax-highlighting nautilus nbd ndisc6 -net-tools netctl +net-tools networkmanager nfs-utils nilfs-utils @@ -173,11 +174,11 @@ ntp nvidia-utils nvme-cli octopi -open-iscsi -open-vm-tools openconnect opendesktop-fonts +open-iscsi openssh +open-vm-tools openvpn os-prober parole @@ -200,8 +201,8 @@ pv python python-defusedxml qemu-guest-agent -qt5-xmlpatterns qt5ct +qt5-xmlpatterns realtime-privileges refind reflector @@ -246,8 +247,8 @@ wireless_tools wireplumber wpa_supplicant wvdial -xdg-user-dirs-gtk xdg-desktop-portal-gnome +xdg-user-dirs-gtk xdg-utils xed xf86-input-elographics diff --git a/archiso/packages_kde.x86_64 b/archiso/packages_kde.x86_64 index aa4e88f..01730fe 100644 --- a/archiso/packages_kde.x86_64 +++ b/archiso/packages_kde.x86_64 @@ -7,6 +7,7 @@ avahi b43-fwcutter base bash-completion +bcachefs-tools bind boost-libs breeze-gtk @@ -35,6 +36,7 @@ cachyos-zsh-config cantarell-fonts capitaine-cursors char-white +chwd ckbcomp clonezilla cloud-init @@ -93,6 +95,7 @@ kitty-terminfo konsole kpmcore kscreen +ldns less lftp libfido2 @@ -118,7 +121,6 @@ mdadm memtest86+ memtest86+-efi mesa -chwd micro mkinitcpio mkinitcpio-archiso @@ -144,11 +146,11 @@ ntp nvidia-utils nvme-cli octopi -open-iscsi -open-vm-tools openconnect opendesktop-fonts +open-iscsi openssh +open-vm-tools openvpn os-prober partclone diff --git a/archiso/packages_xfce.x86_64 b/archiso/packages_xfce.x86_64 index adefb4d..ed0bd72 100644 --- a/archiso/packages_xfce.x86_64 +++ b/archiso/packages_xfce.x86_64 @@ -14,6 +14,7 @@ b43-fwcutter base base-devel bash-completion +bcachefs-tools bind bind-tools bluez @@ -42,6 +43,7 @@ cachyos-zsh-config cantarell-fonts capitaine-cursors char-white +chwd ckbcomp clonezilla cloud-init @@ -89,8 +91,8 @@ gst-libav gst-plugin-pipewire gst-plugins-bad gst-plugins-ugly -gtk-engine-murrine gtk3 +gtk-engine-murrine hdparm hwdetect hwinfo @@ -104,6 +106,7 @@ iw jfsutils kitty-terminfo kvantum +ldns less lftp libfido2 @@ -133,7 +136,6 @@ meld memtest86+ mesa mesa-utils -chwd mkinitcpio mkinitcpio-archiso mkinitcpio-nfs-utils @@ -145,10 +147,10 @@ nano-syntax-highlighting nbd ndisc6 neofetch -net-tools netctl -network-manager-applet +net-tools networkmanager +network-manager-applet networkmanager-openvpn networkmanager-qt5 networkmanager-vpnc @@ -162,11 +164,11 @@ ntp nvidia-utils nvme-cli octopi -open-iscsi -open-vm-tools openconnect opendesktop-fonts +open-iscsi openssh +open-vm-tools openvpn os-prober parole @@ -193,8 +195,8 @@ pv python python-defusedxml qemu-guest-agent -qt5-xmlpatterns qt5ct +qt5-xmlpatterns realtime-privileges refind reflector diff --git a/archiso/profiledef.sh b/archiso/profiledef.sh index a63c628..f28d635 100644 --- a/archiso/profiledef.sh +++ b/archiso/profiledef.sh @@ -4,7 +4,7 @@ iso_name="cachyos" iso_label="COS_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)" iso_publisher="CachyOS " -iso_application="CachyOS Live/Rescue CD" +iso_application="CachyOS Live/Rescue DVD" iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)" install_dir="arch" buildmodes=('iso') @@ -22,6 +22,7 @@ file_permissions=( ["/etc/polkit-1/rules.d"]="0:0:750" ["/etc/sudoers.d"]="0:0:750" ["/root/.automated_script.sh"]="0:0:755" + ["/root/.gnupg"]="0:0:700" ["/usr/local/bin/choose-mirror"]="0:0:755" ["/usr/local/bin/dmcheck"]="0:0:755" ["/usr/local/bin/calamares-offline.sh"]="0:0:755" diff --git a/archiso/syslinux/archiso_pxe-linux.cfg b/archiso/syslinux/archiso_pxe-linux.cfg index d2485a1..ee74d30 100644 --- a/archiso/syslinux/archiso_pxe-linux.cfg +++ b/archiso/syslinux/archiso_pxe-linux.cfg @@ -6,7 +6,7 @@ ENDTEXT MENU LABEL CachyOS install medium (x86_64, NBD) LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos INITRD ::/%INSTALL_DIR%/boot/intel-ucode.img,::/%INSTALL_DIR%/boot/amd-ucode.img,::/%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver} checksum verify +APPEND archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% archiso_nbd_srv=${pxeserver} cms_verify=y SYSAPPEND 3 LABEL arch64_nfs @@ -17,7 +17,7 @@ ENDTEXT MENU LABEL CachyOS install medium (x86_64, NFS) LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos INITRD ::/%INSTALL_DIR%/boot/intel-ucode.img,::/%INSTALL_DIR%/boot/amd-ucode.img,::/%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt checksum verify +APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt cms_verify=y SYSAPPEND 3 LABEL arch64_http @@ -28,5 +28,5 @@ ENDTEXT MENU LABEL CachyOS install medium (x86_64, HTTP) LINUX ::/%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos INITRD ::/%INSTALL_DIR%/boot/intel-ucode.img,::/%INSTALL_DIR%/boot/amd-ucode.img,::/%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ checksum verify +APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/ cms_verify=y SYSAPPEND 3 diff --git a/archiso/syslinux/archiso_sys-linux.cfg b/archiso/syslinux/archiso_sys-linux.cfg index 10cea0b..715c6b4 100644 --- a/archiso/syslinux/archiso_sys-linux.cfg +++ b/archiso/syslinux/archiso_sys-linux.cfg @@ -6,7 +6,7 @@ ENDTEXT MENU LABEL CachyOS default (x86_64, BIOS) LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n nouveau.modeset=1 module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr i915.modeset=1 radeon.modeset=1 nvme_load=yes +APPEND archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n nouveau.modeset=1 module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr i915.modeset=1 radeon.modeset=1 nvme_load=yes # Nvidia propritary (Non-Free) LABEL cos64nv @@ -17,7 +17,7 @@ ENDTEXT MENU LABEL CachyOS NVIDIA (latest cards, x86_64, BIOS) LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos INITRD /%INSTALL_DIR%/boot/intel-ucode.img,/%INSTALL_DIR%/boot/amd-ucode.img,/%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nvidia-drm.fbdev=1 nouveau.modeset=0 module_blacklist=nouveau,pcspkr i915.modeset=1 radeon.modeset=1 nvme_load=yes +APPEND archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nvidia-drm.fbdev=1 nouveau.modeset=0 module_blacklist=nouveau,pcspkr i915.modeset=1 radeon.modeset=1 nvme_load=yes # Fallback (nomodeset) LABEL cos64fb @@ -28,4 +28,4 @@ ENDTEXT MENU LABEL CachyOS Fallback (nomodeset, BIOS) LINUX /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-cachyos INITRD /%INSTALL_DIR%/boot/x86_64/initramfs-linux-cachyos.img -APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nomodeset nvme_load=yes +APPEND archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% cow_spacesize=10G copytoram=n module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm,pcspkr nomodeset nvme_load=yes