From 7c885f1403fba42b33218656ff19e359ccbae7e4 Mon Sep 17 00:00:00 2001 From: adi1090x Date: Fri, 21 Jul 2023 15:43:56 +0530 Subject: [PATCH] Updated the ISO --- packages/archcraft-xfce/PKGBUILD | 4 +- .../files/xfce-themes/catppuccin-frappe.bash | 43 ++++++++++ .../xfce-themes/catppuccin-macchiato.bash | 43 ++++++++++ .../files/xfce-themes/catppuccin-mocha.bash | 43 ++++++++++ .../files/xfce-themes/darkred.bash | 43 ++++++++++ .../files/xfce-themes/everforest.bash | 43 ++++++++++ .../files/xfce-themes/kanagawa.bash | 43 ++++++++++ packages/calamares-config-xfce/PKGBUILD | 12 +-- .../calamares/branding/archcraft/show.qml | 2 +- .../branding/archcraft/test-slides.sh | 4 +- .../calamares/modules/shellprocess_kms.conf | 4 +- .../files/calamares/modules/welcome.conf | 1 - .../files/chrooted_post_install.sh | 30 +++---- .../files/chrooted_post_install_nvidia.sh | 82 +++++++++++++++++++ .../files/post_install.sh | 3 +- .../files/post_install_nvidia.sh | 63 ++++++++++++++ profile/airootfs/etc/mkinitcpio-nvidia.conf | 67 +++++++++++++++ profile/airootfs/etc/mkinitcpio.conf | 4 +- .../etc/mkinitcpio.d/linux-nvidia.preset | 8 ++ .../etc/skel/.icons/default/index.theme | 2 + profile/airootfs/etc/ssh/sshd_config | 6 +- .../etc/systemd/network/20-ethernet.network | 1 + .../etc/systemd/network/20-wlan.network | 1 + .../etc/systemd/resolved.conf.d/archiso.conf | 4 + .../dbus-org.freedesktop.timesync1.service | 1 + .../qemu-guest-agent.service | 1 - profile/airootfs/root/.automated_script.sh | 11 ++- profile/airootfs/root/customize_airootfs.sh | 11 +-- .../entries/01-archcraftiso-x86_64-linux.conf | 10 +-- ...archcraftiso-x86_64-linux-open-source.conf | 10 +-- ...-archcraftiso-x86_64-linux-no-nouveau.conf | 7 -- .../03-archcraftiso-x86_64-linux-nvidia.conf | 7 ++ ...4-archcraftiso-x86_64-linux-nomodeset.conf | 7 ++ ...hcraftiso-x86_64-linux-nvidia-nouveau.conf | 7 -- ...aftiso-x86_64-linux-nvidia-no-nouveau.conf | 7 -- ...6-archcraftiso-x86_64-linux-nomodeset.conf | 7 -- profile/grub/grub.cfg | 52 +++++------- profile/mkarchcraftiso | 60 ++++++++++---- profile/packages.x86_64 | 50 +++++++---- profile/pacman.conf | 13 ++- profile/profiledef.sh | 4 +- profile/syslinux/archcraftiso_head.cfg | 8 +- profile/syslinux/archcraftiso_pxe-linux.cfg | 18 ++-- profile/syslinux/archcraftiso_sys-linux.cfg | 36 ++------ 44 files changed, 682 insertions(+), 201 deletions(-) create mode 100644 packages/archcraft-xfce/files/xfce-themes/catppuccin-frappe.bash create mode 100644 packages/archcraft-xfce/files/xfce-themes/catppuccin-macchiato.bash create mode 100644 packages/archcraft-xfce/files/xfce-themes/catppuccin-mocha.bash create mode 100644 packages/archcraft-xfce/files/xfce-themes/darkred.bash create mode 100644 packages/archcraft-xfce/files/xfce-themes/everforest.bash create mode 100644 packages/archcraft-xfce/files/xfce-themes/kanagawa.bash create mode 100755 packages/calamares-config-xfce/files/chrooted_post_install_nvidia.sh create mode 100755 packages/calamares-config-xfce/files/post_install_nvidia.sh create mode 100644 profile/airootfs/etc/mkinitcpio-nvidia.conf create mode 100644 profile/airootfs/etc/mkinitcpio.d/linux-nvidia.preset create mode 100644 profile/airootfs/etc/skel/.icons/default/index.theme create mode 100644 profile/airootfs/etc/systemd/resolved.conf.d/archiso.conf create mode 120000 profile/airootfs/etc/systemd/system/dbus-org.freedesktop.timesync1.service delete mode 120000 profile/airootfs/etc/systemd/system/multi-user.target.wants/qemu-guest-agent.service delete mode 100644 profile/efiboot/loader/entries/03-archcraftiso-x86_64-linux-no-nouveau.conf create mode 100644 profile/efiboot/loader/entries/03-archcraftiso-x86_64-linux-nvidia.conf create mode 100644 profile/efiboot/loader/entries/04-archcraftiso-x86_64-linux-nomodeset.conf delete mode 100644 profile/efiboot/loader/entries/04-archcraftiso-x86_64-linux-nvidia-nouveau.conf delete mode 100644 profile/efiboot/loader/entries/05-archcraftiso-x86_64-linux-nvidia-no-nouveau.conf delete mode 100644 profile/efiboot/loader/entries/06-archcraftiso-x86_64-linux-nomodeset.conf diff --git a/packages/archcraft-xfce/PKGBUILD b/packages/archcraft-xfce/PKGBUILD index 4ac18ff..653e319 100644 --- a/packages/archcraft-xfce/PKGBUILD +++ b/packages/archcraft-xfce/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Aditya Shakya pkgname=archcraft-xfce -pkgver=1.0 -pkgrel=4 +pkgver=2.0 +pkgrel=0 pkgdesc="XFCE desktop configurations for Archcraft" url="https://github.com/archcraft-os/archcraft-xfce" arch=('any') diff --git a/packages/archcraft-xfce/files/xfce-themes/catppuccin-frappe.bash b/packages/archcraft-xfce/files/xfce-themes/catppuccin-frappe.bash new file mode 100644 index 0000000..0affedc --- /dev/null +++ b/packages/archcraft-xfce/files/xfce-themes/catppuccin-frappe.bash @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2020-2023 Aditya Shakya +# +# Catppuccin Frappe Theme +# ------------------------------------------------------------------------------ + +# Colors +background='#303446' +foreground='#C6D0F5' +color0='#51576D' +color1='#E78284' +color2='#A6D189' +color3='#E5C890' +color4='#8CAAEE' +color5='#F4B8E4' +color6='#81C8BE' +color7='#B5BFE2' +color8='#626880' +color9='#E78284' +color10='#A6D189' +color11='#E5C890' +color12='#8CAAEE' +color13='#F4B8E4' +color14='#81C8BE' +color15='#A5ADCE' + +# Wallpaper +wallpaper='/usr/share/backgrounds/frappe.png' + +# Terminal +terminal_font_name='JetBrainsMono Nerd Font' +terminal_font_size='10' + +# Geany +geany_colors='catppuccin-frappe.conf' +geany_font='JetBrains Mono 10' + +# Appearance +xfwm_theme='Catppuccin-Frappe' +gtk_font='Noto Sans 9' +gtk_theme='Catppuccin-Frappe' +icon_theme='Zafiro' +cursor_theme='Fluent' diff --git a/packages/archcraft-xfce/files/xfce-themes/catppuccin-macchiato.bash b/packages/archcraft-xfce/files/xfce-themes/catppuccin-macchiato.bash new file mode 100644 index 0000000..c4a0000 --- /dev/null +++ b/packages/archcraft-xfce/files/xfce-themes/catppuccin-macchiato.bash @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2020-2023 Aditya Shakya +# +# Catppuccin Macchiato Theme +# ------------------------------------------------------------------------------ + +# Colors +background='#24273A' +foreground='#CAD3F5' +color0='#494D64' +color1='#ED8796' +color2='#A6DA95' +color3='#EED49F' +color4='#8AADF4' +color5='#F5BDE6' +color6='#8BD5CA' +color7='#B8C0E0' +color8='#5B6078' +color9='#ED8796' +color10='#A6DA95' +color11='#EED49F' +color12='#8AADF4' +color13='#F5BDE6' +color14='#8BD5CA' +color15='#A5ADCB' + +# Wallpaper +wallpaper='/usr/share/backgrounds/macchiato.png' + +# Terminal +terminal_font_name='JetBrainsMono Nerd Font' +terminal_font_size='10' + +# Geany +geany_colors='catppuccin-macchiato.conf' +geany_font='JetBrains Mono 10' + +# Appearance +xfwm_theme='Catppuccin-Macchiato' +gtk_font='Noto Sans 9' +gtk_theme='Catppuccin-Macchiato' +icon_theme='Arc-Circle' +cursor_theme='Qogirr-Dark' diff --git a/packages/archcraft-xfce/files/xfce-themes/catppuccin-mocha.bash b/packages/archcraft-xfce/files/xfce-themes/catppuccin-mocha.bash new file mode 100644 index 0000000..39215cc --- /dev/null +++ b/packages/archcraft-xfce/files/xfce-themes/catppuccin-mocha.bash @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2020-2023 Aditya Shakya +# +# Catppuccin Mocha Theme +# ------------------------------------------------------------------------------ + +# Colors +background='#1E1E2E' +foreground='#CDD6F4' +color0='#45475A' +color1='#F38BA8' +color2='#A6E3A1' +color3='#F9E2AF' +color4='#89B4FA' +color5='#F5C2E7' +color6='#94E2D5' +color7='#BAC2DE' +color8='#585B70' +color9='#F38BA8' +color10='#A6E3A1' +color11='#F9E2AF' +color12='#89B4FA' +color13='#F5C2E7' +color14='#94E2D5' +color15='#A6ADC8' + +# Wallpaper +wallpaper='/usr/share/backgrounds/mocha.jpg' + +# Terminal +terminal_font_name='JetBrainsMono Nerd Font' +terminal_font_size='10' + +# Geany +geany_colors='catppuccin-mocha.conf' +geany_font='JetBrains Mono 10' + +# Appearance +xfwm_theme='Catppuccin-Mocha' +gtk_font='Noto Sans 9' +gtk_theme='Catppuccin-Mocha' +icon_theme='Luv-Folders-Dark' +cursor_theme='Sweet' diff --git a/packages/archcraft-xfce/files/xfce-themes/darkred.bash b/packages/archcraft-xfce/files/xfce-themes/darkred.bash new file mode 100644 index 0000000..75f2208 --- /dev/null +++ b/packages/archcraft-xfce/files/xfce-themes/darkred.bash @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2020-2023 Aditya Shakya +# +# Dark Red Theme +# ------------------------------------------------------------------------------ + +# Colors +background='#1e222a' +foreground='#c8ccd4' +color0='#1e222a' +color1='#e06c75' +color2='#98c379' +color3='#e5c07b' +color4='#61afef' +color5='#c678dd' +color6='#56b6c2' +color7='#abb2bf' +color8='#545862' +color9='#e06c75' +color10='#98c379' +color11='#e5c07b' +color12='#61afef' +color13='#c678dd' +color14='#56b6c2' +color15='#c8ccd4' + +# Wallpaper +wallpaper='/usr/share/backgrounds/tokyo.png' + +# Terminal +terminal_font_name='JetBrainsMono Nerd Font' +terminal_font_size='10' + +# Geany +geany_colors='manhattan.conf' +geany_font='JetBrains Mono 10' + +# Appearance +xfwm_theme='Manhattan' +gtk_font='Noto Sans 9' +gtk_theme='Manhattan' +icon_theme='Luv-Folders-Dark' +cursor_theme='Qogirr-Dark' diff --git a/packages/archcraft-xfce/files/xfce-themes/everforest.bash b/packages/archcraft-xfce/files/xfce-themes/everforest.bash new file mode 100644 index 0000000..8afbf85 --- /dev/null +++ b/packages/archcraft-xfce/files/xfce-themes/everforest.bash @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2020-2023 Aditya Shakya +# +# Everforest Theme +# ------------------------------------------------------------------------------ + +# Colors +background='#2B3339' +foreground='#D3C6AA' +color0='#48555F' +color1='#E67E80' +color2='#A7C080' +color3='#DBBC7F' +color4='#7FBBB3' +color5='#D699B6' +color6='#83C092' +color7='#D3C6AA' +color8='#48555F' +color9='#E67E80' +color10='#A7C080' +color11='#DBBC7F' +color12='#7FBBB3' +color13='#D699B6' +color14='#83C092' +color15='#D3C6AA' + +# Wallpaper +wallpaper='/usr/share/backgrounds/everforest.png' + +# Terminal +terminal_font_name='JetBrainsMono Nerd Font' +terminal_font_size='10' + +# Geany +geany_colors='manhattan.conf' +geany_font='JetBrains Mono 10' + +# Appearance +xfwm_theme='Everforest' +gtk_font='Noto Sans 9' +gtk_theme='Everforest' +icon_theme='Zafiro-Green' +cursor_theme='Qogirr-Dark' diff --git a/packages/archcraft-xfce/files/xfce-themes/kanagawa.bash b/packages/archcraft-xfce/files/xfce-themes/kanagawa.bash new file mode 100644 index 0000000..e80ac23 --- /dev/null +++ b/packages/archcraft-xfce/files/xfce-themes/kanagawa.bash @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# Copyright (C) 2020-2023 Aditya Shakya +# +# Kanagawa Theme +# ------------------------------------------------------------------------------ + +# Colors +background='#2e3440' +foreground='#D8DEE9' +color0='#3B4252' +color1='#BF616A' +color2='#A3BE8C' +color3='#EBCB8B' +color4='#81A1C1' +color5='#B48EAD' +color6='#88C0D0' +color7='#E5E9F0' +color8='#4C566A' +color9='#BF616A' +color10='#A3BE8C' +color11='#EBCB8B' +color12='#81A1C1' +color13='#B48EAD' +color14='#8FBCBB' +color15='#ECEFF4' + +# Wallpaper +wallpaper='/usr/share/backgrounds/kanagawa.png' + +# Terminal +terminal_font_name='JetBrainsMono Nerd Font' +terminal_font_size='10' + +# Geany +geany_colors='nordic.conf' +geany_font='JetBrains Mono 10' + +# Appearance +xfwm_theme='Nordic' +gtk_font='Noto Sans 9' +gtk_theme='Nordic' +icon_theme='Qogir-Dark' +cursor_theme='Qogirr-Dark' diff --git a/packages/calamares-config-xfce/PKGBUILD b/packages/calamares-config-xfce/PKGBUILD index 8adf371..353f7b6 100644 --- a/packages/calamares-config-xfce/PKGBUILD +++ b/packages/calamares-config-xfce/PKGBUILD @@ -1,14 +1,14 @@ # Maintainer: Aditya Shakya pkgname=calamares-config-xfce -pkgver=1.0 -pkgrel=2 +pkgver=2.0 +pkgrel=1 pkgdesc="Calamares configuration for Archcraft XFCE." url="https://github.com/archcraft-os/archcraft-xfce" arch=('any') license=('GPL') provides=($pkgname) -conflicts=('calamares-config') +conflicts=('calamares-config' 'calamares-config-prime' 'calamares-config-wayland') depends=() prepare() { @@ -23,8 +23,10 @@ package() { (find calamares -type f -exec install -Dm 644 "{}" "$pkgdir/etc/{}" \;) # copy install scripts - install -Dm 755 post_install.sh "$_bindir"/post_install.sh - install -Dm 755 chrooted_post_install.sh "$_bindir"/chrooted_post_install.sh + install -Dm 755 post_install.sh "$_bindir"/post_install.sh + install -Dm 755 chrooted_post_install.sh "$_bindir"/chrooted_post_install.sh + install -Dm 755 post_install_nvidia.sh "$_bindir"/post_install_nvidia.sh + install -Dm 755 chrooted_post_install_nvidia.sh "$_bindir"/chrooted_post_install_nvidia.sh # make scripts executable chmod 755 "$pkgdir"/etc/calamares/launch.sh diff --git a/packages/calamares-config-xfce/files/calamares/branding/archcraft/show.qml b/packages/calamares-config-xfce/files/calamares/branding/archcraft/show.qml index 6311c54..4a8386d 100644 --- a/packages/calamares-config-xfce/files/calamares/branding/archcraft/show.qml +++ b/packages/calamares-config-xfce/files/calamares/branding/archcraft/show.qml @@ -22,7 +22,7 @@ Presentation Timer { id: advanceTimer - interval: 5000 + interval: 10000 running: presentation.activatedInCalamares repeat: true onTriggered: nextSlide() diff --git a/packages/calamares-config-xfce/files/calamares/branding/archcraft/test-slides.sh b/packages/calamares-config-xfce/files/calamares/branding/archcraft/test-slides.sh index 5f49bb8..cdd1870 100755 --- a/packages/calamares-config-xfce/files/calamares/branding/archcraft/test-slides.sh +++ b/packages/calamares-config-xfce/files/calamares/branding/archcraft/test-slides.sh @@ -1,7 +1,7 @@ #!/usr/bin/bash ## Copyright (C) 2020-2023 Aditya Shakya -## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 - +## ## Test Calamares Slides + qmlscene -I /usr/share/calamares/qml show.qml -geometry 825x500 diff --git a/packages/calamares-config-xfce/files/calamares/modules/shellprocess_kms.conf b/packages/calamares-config-xfce/files/calamares/modules/shellprocess_kms.conf index af13085..6702678 100644 --- a/packages/calamares-config-xfce/files/calamares/modules/shellprocess_kms.conf +++ b/packages/calamares-config-xfce/files/calamares/modules/shellprocess_kms.conf @@ -4,14 +4,14 @@ # Configuration for the shell process job. # Set to true to run in host, rather than target system -dontChroot: false +dontChroot: true # Tune this for the commands you're actually running timeout: 999 # Commands script: - - command: "sed -i -e 's/modconf/modconf kms/g' /etc/mkinitcpio.conf" + - command: "/usr/bin/post_install_nvidia.sh" # Description of the job i18n: diff --git a/packages/calamares-config-xfce/files/calamares/modules/welcome.conf b/packages/calamares-config-xfce/files/calamares/modules/welcome.conf index 5d3b2c1..584eff2 100644 --- a/packages/calamares-config-xfce/files/calamares/modules/welcome.conf +++ b/packages/calamares-config-xfce/files/calamares/modules/welcome.conf @@ -21,7 +21,6 @@ requirements: - storage - ram - power - - internet - root - screen diff --git a/packages/calamares-config-xfce/files/chrooted_post_install.sh b/packages/calamares-config-xfce/files/chrooted_post_install.sh index ed4250a..abc8301 100755 --- a/packages/calamares-config-xfce/files/chrooted_post_install.sh +++ b/packages/calamares-config-xfce/files/chrooted_post_install.sh @@ -1,8 +1,7 @@ #!/bin/bash ## Copyright (C) 2020-2023 Aditya Shakya -## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 - +## ## Post installation script for Archcraft (Executes on target system to perform various operations) ## ----------------------------------------------- @@ -262,23 +261,6 @@ _perform_various_stuff() { mkdir -p /boot/grub/themes cp -rf /usr/share/grub/themes/archcraft /boot/grub/themes - # disabling autologin for lightdm (if exist) - lightdm_config='/etc/lightdm/lightdm.conf' - if [[ -e "$lightdm_config" ]]; then - echo "+---------------------->>" - echo "[*] Disabling autologin for lightdm..." - sed -i -e 's|autologin-user=.*|#autologin-user=username|g' "$lightdm_config" - sed -i -e 's|autologin-session=.*|#autologin-session=openbox|g' "$lightdm_config" - fi - - # disabling autologin for lxdm (if exist) - lxdm_config='/etc/lxdm/lxdm.conf' - if [[ -e "$lxdm_config" ]]; then - echo "+---------------------->>" - echo "[*] Disabling autologin for lxdm..." - sed -i -e 's/autologin=.*/#autologin=username/g' "$lxdm_config" - fi - # disabling autologin for sddm (if exist) sddm_config='/etc/sddm.conf.d/kde_settings.conf' if [[ -e "$sddm_config" ]]; then @@ -287,6 +269,16 @@ _perform_various_stuff() { sed -i -e 's/User=liveuser/#User=username/g' "$sddm_config" fi + # Fix Directory menu in xfce panel + panel_config="/home/${new_user}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml" + if [[ -e "$panel_config" ]]; then + echo "+---------------------->>" + echo "[*] Fixing directory menu in xfce-panel..." + sed -i -e "s|/home/liveuser|/home/$new_user|g" "$panel_config" + sed -i -e "s|/home/liveuser|/home/$new_user|g" /etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml + chown -R ${new_user}:${new_user} "$panel_config" + fi + # Perform various operations echo "+---------------------->>" echo "[*] Running operations as new user : ${new_user}..." diff --git a/packages/calamares-config-xfce/files/chrooted_post_install_nvidia.sh b/packages/calamares-config-xfce/files/chrooted_post_install_nvidia.sh new file mode 100755 index 0000000..2e8998f --- /dev/null +++ b/packages/calamares-config-xfce/files/chrooted_post_install_nvidia.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +## Copyright (C) 2020-2023 Aditya Shakya +## +## Post installation script for Archcraft (Executes on target system to perform nvidia specific operations) + +## ----------------------------------------------- + +## mkinitcpio.conf file +init_file='/etc/mkinitcpio.conf' + +## Add `kms` hook in 'init_file' file for in-tree modules (if not already present) +_add_kms() { + if [[ ! `cat $init_file | grep 'kms'` ]]; then + echo "+---------------------->>" + echo "[*] Enabling 'kms' in $init_file file..." + sed -i -e 's/modconf/modconf kms/g' /etc/mkinitcpio.conf + fi +} + +## Enable Nvidia Modules and Required Kernel Parameters +_enable_nvidia() { + local nvidia_gpu_file='/var/log/nvidia-gpu-card-info.bash' + + local nvidia_card='' + local nvidia_driver='' + + if [[ -r "$nvidia_gpu_file" ]] ; then + echo "+---------------------->>" + echo "[*] Getting Nvidia drivers info from $nvidia_gpu_file file..." + source ${nvidia_gpu_file} + else + echo "+---------------------->>" + echo "[!] Warning: file $nvidia_gpu_file does not exist!" + fi + + if [[ "$nvidia_card" == 'yes' ]] ; then + if [[ "$nvidia_driver" == 'yes' ]] ; then + # Add nvidia modules in 'init_file' file + if [[ `cat $init_file | grep 'MODULES="'` ]]; then + echo "+---------------------->>" + echo "[*] Adding Nvidia Modules in $init_file file..." + sed -i -e 's|MODULES="|MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm |g' ${init_file} + else + echo "+---------------------->>" + echo "[*] Adding Nvidia Modules in $init_file file..." + sed -i -e 's|MODULES=(|MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm |g' ${init_file} + fi + + # Remove `kms` hook from 'init_file' file + echo "+---------------------->>" + echo "[*] Removing 'kms' from $init_file file..." + sed -i -e 's/modconf kms/modconf/g' ${init_file} + + # Add kernel parameter in `/etc/default/grub` file + echo "+---------------------->>" + echo "[*] Adding Nvidia Kernel Parameter in '/etc/default/grub' file..." + sed -i -e 's|GRUB_CMDLINE_LINUX_DEFAULT="quiet splash|GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia_drm.modeset=1|g' /etc/default/grub + + fi + fi +} + +## Remove Nvidia Specific Files from Live ISO +_remove_iso_files() { + local _files_to_remove=( + /etc/mkinitcpio-nvidia.conf + /etc/mkinitcpio.d/linux-nvidia.preset + ) + local dfile + + echo "+---------------------->>" + for dfile in "${_files_to_remove[@]}"; do + echo "[*] Deleting $dfile file from target system..." + rm -rf ${dfile} + done +} + +## Execute Script +_add_kms +_enable_nvidia +_remove_iso_files diff --git a/packages/calamares-config-xfce/files/post_install.sh b/packages/calamares-config-xfce/files/post_install.sh index f4a7a8f..58a3be2 100755 --- a/packages/calamares-config-xfce/files/post_install.sh +++ b/packages/calamares-config-xfce/files/post_install.sh @@ -1,8 +1,7 @@ #!/bin/bash ## Copyright (C) 2020-2023 Aditya Shakya -## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 - +## ## Post installation script for Archcraft (Executes on live system, only to detect drivers in use) ##-------------------------------------------------------------------------------- diff --git a/packages/calamares-config-xfce/files/post_install_nvidia.sh b/packages/calamares-config-xfce/files/post_install_nvidia.sh new file mode 100755 index 0000000..a934bec --- /dev/null +++ b/packages/calamares-config-xfce/files/post_install_nvidia.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +## Copyright (C) 2020-2023 Aditya Shakya +## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 + +## Post installation script for Archcraft (only to detect nvidia) + +##-------------------------------------------------------------------------------- + +## Get mount points of target system according to installer being used (calamares or abif) +if [[ `pidof calamares` ]]; then + chroot_path="/tmp/`lsblk | grep 'calamares-root' | awk '{ print $NF }' | sed -e 's/\/tmp\///' -e 's/\/.*$//' | tail -n1`" +else + chroot_path='/mnt' +fi + +if [[ "$chroot_path" == '/tmp/' ]] ; then + echo "+---------------------->>" + echo "[!] Fatal error: `basename $0`: chroot_path is empty!" +fi + +## Use chroot not arch-chroot +arch_chroot() { + chroot "$chroot_path" /bin/bash -c ${1} +} + +## Detect drivers in use in live session +nvidia_gpu_file="$chroot_path"/var/log/nvidia-gpu-card-info.bash + +_detect_nvidia_drivers() { + local nvidia_card=no + local nvidia_driver=no + + if [[ -n "`lspci -k | grep -P 'VGA|3D|Display' | grep -w 'NVIDIA'`" ]]; then + nvidia_card=yes + if [[ -n "`lsmod | grep -w nvidia`" ]]; then + nvidia_driver=yes + fi + if [[ -n "`lspci -k | grep -wA2 'NVIDIA' | grep 'Kernel driver in use: nvidia'`" ]]; then + nvidia_driver=yes + fi + fi + echo "nvidia_card=$nvidia_card" >> ${nvidia_gpu_file} + echo "nvidia_driver=$nvidia_driver" >> ${nvidia_gpu_file} +} + +echo "+---------------------->>" +echo "[*] Detecting NVIDIA GPU card & drivers used in live session..." +_detect_nvidia_drivers + +# For logs +echo "+---------------------->>" +echo "[*] Content of $nvidia_gpu_file :" +cat ${nvidia_gpu_file} + +##-------------------------------------------------------------------------------- + +## Run the final script inside calamares chroot (target system) +if [[ `pidof calamares` ]]; then + echo "+---------------------->>" + echo "[*] Running nvidia chroot post installation script in target system..." + arch_chroot "/usr/bin/chrooted_post_install_nvidia.sh" +fi diff --git a/profile/airootfs/etc/mkinitcpio-nvidia.conf b/profile/airootfs/etc/mkinitcpio-nvidia.conf new file mode 100644 index 0000000..fe2cb8a --- /dev/null +++ b/profile/airootfs/etc/mkinitcpio-nvidia.conf @@ -0,0 +1,67 @@ +# 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=(piix ide_disk reiserfs) +MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) + +# 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 block filesystems) +# +## This setup will generate a 'full' image which supports most systems. +## No autodetection is done. +# HOOKS=(base udev block filesystems) +# +## This setup assembles a pata mdadm array with an encrypted root FS. +## Note: See 'mkinitcpio -H mdadm' for more information on raid devices. +# HOOKS=(base udev block mdadm encrypt filesystems) +# +## This setup loads an lvm2 volume group on a usb device. +# HOOKS=(base udev block lvm2 filesystems) +# +## NOTE: If you have /usr on a separate partition, you MUST include the +# usr, fsck and shutdown hooks. +HOOKS=(base udev plymouth modconf archiso archiso_loop_mnt block filesystems keyboard) + +# COMPRESSION +# Use this to compress the initramfs image. By default, gzip compression +# is used. Use 'cat' to create an uncompressed image. +#COMPRESSION="gzip" +#COMPRESSION="bzip2" +#COMPRESSION="lzma" +COMPRESSION="xz" +#COMPRESSION="lzop" +#COMPRESSION="lz4" +#COMPRESSION="zstd" + +# COMPRESSION_OPTIONS +# Additional options for the compressor +#COMPRESSION_OPTIONS=() diff --git a/profile/airootfs/etc/mkinitcpio.conf b/profile/airootfs/etc/mkinitcpio.conf index da4d1d2..26383a5 100644 --- a/profile/airootfs/etc/mkinitcpio.conf +++ b/profile/airootfs/etc/mkinitcpio.conf @@ -57,10 +57,10 @@ HOOKS=(base udev plymouth modconf kms archiso archiso_loop_mnt block filesystems #COMPRESSION="gzip" #COMPRESSION="bzip2" #COMPRESSION="lzma" -#COMPRESSION="xz" +COMPRESSION="xz" #COMPRESSION="lzop" #COMPRESSION="lz4" -COMPRESSION="zstd" +#COMPRESSION="zstd" # COMPRESSION_OPTIONS # Additional options for the compressor diff --git a/profile/airootfs/etc/mkinitcpio.d/linux-nvidia.preset b/profile/airootfs/etc/mkinitcpio.d/linux-nvidia.preset new file mode 100644 index 0000000..e1088b0 --- /dev/null +++ b/profile/airootfs/etc/mkinitcpio.d/linux-nvidia.preset @@ -0,0 +1,8 @@ +# mkinitcpio preset file for the 'linux' package (nvidia) + +PRESETS=('nvidia') + +ALL_kver="/boot/vmlinuz-linux" +ALL_config="/etc/mkinitcpio-nvidia.conf" + +nvidia_image="/boot/initramfs-linux-nvidia.img" diff --git a/profile/airootfs/etc/skel/.icons/default/index.theme b/profile/airootfs/etc/skel/.icons/default/index.theme new file mode 100644 index 0000000..d7feea7 --- /dev/null +++ b/profile/airootfs/etc/skel/.icons/default/index.theme @@ -0,0 +1,2 @@ +[Icon Theme] +Inherits=Qogirr diff --git a/profile/airootfs/etc/ssh/sshd_config b/profile/airootfs/etc/ssh/sshd_config index 93f7d63..dc22c11 100644 --- a/profile/airootfs/etc/ssh/sshd_config +++ b/profile/airootfs/etc/ssh/sshd_config @@ -58,7 +58,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitEmptyPasswords no # Change to no to disable s/key passwords -#KbdInteractiveAuthentication yes +KbdInteractiveAuthentication no # Kerberos options #KerberosAuthentication no @@ -75,7 +75,7 @@ AuthorizedKeysFile .ssh/authorized_keys # be allowed through the KbdInteractiveAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via KbdInteractiveAuthentication may bypass -# the setting of "PermitRootLogin without-password". +# the setting of "PermitRootLogin prohibit-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'. @@ -88,7 +88,7 @@ UsePAM yes #X11DisplayOffset 10 #X11UseLocalhost yes #PermitTTY yes -PrintMotd no # pam does that +PrintMotd no #PrintLastLog yes #TCPKeepAlive yes #PermitUserEnvironment no diff --git a/profile/airootfs/etc/systemd/network/20-ethernet.network b/profile/airootfs/etc/systemd/network/20-ethernet.network index 9ada778..ce8de1f 100644 --- a/profile/airootfs/etc/systemd/network/20-ethernet.network +++ b/profile/airootfs/etc/systemd/network/20-ethernet.network @@ -7,6 +7,7 @@ Name=eth* [Network] DHCP=yes +MulticastDNS=yes IPv6PrivacyExtensions=yes # systemd-networkd does not set per-interface-type default route metrics diff --git a/profile/airootfs/etc/systemd/network/20-wlan.network b/profile/airootfs/etc/systemd/network/20-wlan.network index 601d5b8..e5990bf 100644 --- a/profile/airootfs/etc/systemd/network/20-wlan.network +++ b/profile/airootfs/etc/systemd/network/20-wlan.network @@ -3,6 +3,7 @@ Name=wl* [Network] DHCP=yes +MulticastDNS=yes IPv6PrivacyExtensions=yes # systemd-networkd does not set per-interface-type default route metrics diff --git a/profile/airootfs/etc/systemd/resolved.conf.d/archiso.conf b/profile/airootfs/etc/systemd/resolved.conf.d/archiso.conf new file mode 100644 index 0000000..636f3bd --- /dev/null +++ b/profile/airootfs/etc/systemd/resolved.conf.d/archiso.conf @@ -0,0 +1,4 @@ +# Default systemd-resolved configuration for archiso + +[Resolve] +MulticastDNS=yes diff --git a/profile/airootfs/etc/systemd/system/dbus-org.freedesktop.timesync1.service b/profile/airootfs/etc/systemd/system/dbus-org.freedesktop.timesync1.service new file mode 120000 index 0000000..cd00411 --- /dev/null +++ b/profile/airootfs/etc/systemd/system/dbus-org.freedesktop.timesync1.service @@ -0,0 +1 @@ +/usr/lib/systemd/system/systemd-timesyncd.service \ No newline at end of file diff --git a/profile/airootfs/etc/systemd/system/multi-user.target.wants/qemu-guest-agent.service b/profile/airootfs/etc/systemd/system/multi-user.target.wants/qemu-guest-agent.service deleted file mode 120000 index 8e3ff80..0000000 --- a/profile/airootfs/etc/systemd/system/multi-user.target.wants/qemu-guest-agent.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/system/qemu-guest-agent.service \ No newline at end of file diff --git a/profile/airootfs/root/.automated_script.sh b/profile/airootfs/root/.automated_script.sh index 52c47e6..f257537 100755 --- a/profile/airootfs/root/.automated_script.sh +++ b/profile/airootfs/root/.automated_script.sh @@ -16,7 +16,13 @@ automated_script () script="$(script_cmdline)" if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then - curl "${script}" --location --retry-connrefused --retry 10 -s -o /tmp/startup_script >/dev/null + # 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 +30,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 diff --git a/profile/airootfs/root/customize_airootfs.sh b/profile/airootfs/root/customize_airootfs.sh index 26bb50b..d0d7da3 100755 --- a/profile/airootfs/root/customize_airootfs.sh +++ b/profile/airootfs/root/customize_airootfs.sh @@ -28,7 +28,7 @@ _EOF_ ## Enable Parallel Downloads sed -i -e 's|#ParallelDownloads.*|ParallelDownloads = 5|g' /etc/pacman.conf -sed -i -e '/#\[testing\]/Q' /etc/pacman.conf +sed -i -e '/#\[core-testing\]/Q' /etc/pacman.conf ## Append archcraft repository to pacman.conf cat >> "/etc/pacman.conf" <<- EOL @@ -36,19 +36,16 @@ cat >> "/etc/pacman.conf" <<- EOL SigLevel = Optional TrustAll Include = /etc/pacman.d/archcraft-mirrorlist - #[testing] + #[core-testing] #Include = /etc/pacman.d/mirrorlist [core] Include = /etc/pacman.d/mirrorlist - [extra] - Include = /etc/pacman.d/mirrorlist - - #[community-testing] + #[extra-testing] #Include = /etc/pacman.d/mirrorlist - [community] + [extra] Include = /etc/pacman.d/mirrorlist # If you want to run 32 bit applications on your x86_64 system, diff --git a/profile/efiboot/loader/entries/01-archcraftiso-x86_64-linux.conf b/profile/efiboot/loader/entries/01-archcraftiso-x86_64-linux.conf index c78db77..2c171d7 100644 --- a/profile/efiboot/loader/entries/01-archcraftiso-x86_64-linux.conf +++ b/profile/efiboot/loader/entries/01-archcraftiso-x86_64-linux.conf @@ -1,7 +1,7 @@ title Boot Archcraft (x86_64, UEFI) sort-key 01 -linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux -initrd /%INSTALL_DIR%/boot/intel-ucode.img -initrd /%INSTALL_DIR%/boot/amd-ucode.img -initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n +linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux +initrd /%INSTALL_DIR%/boot/intel-ucode.img +initrd /%INSTALL_DIR%/boot/amd-ucode.img +initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img +options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n module_blacklist=pcspkr,snd_pcsp diff --git a/profile/efiboot/loader/entries/02-archcraftiso-x86_64-linux-open-source.conf b/profile/efiboot/loader/entries/02-archcraftiso-x86_64-linux-open-source.conf index 6f1b1ac..5bb60f1 100644 --- a/profile/efiboot/loader/entries/02-archcraftiso-x86_64-linux-open-source.conf +++ b/profile/efiboot/loader/entries/02-archcraftiso-x86_64-linux-open-source.conf @@ -1,7 +1,7 @@ title Boot Archcraft (x86_64, UEFI, open source) sort-key 02 -linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux -initrd /%INSTALL_DIR%/boot/intel-ucode.img -initrd /%INSTALL_DIR%/boot/amd-ucode.img -initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=free nouveau.modeset=1 radeon.modeset=1 i915.modeset=1 nvme_load=yes +linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux +initrd /%INSTALL_DIR%/boot/intel-ucode.img +initrd /%INSTALL_DIR%/boot/amd-ucode.img +initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img +options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nouveau.modeset=1 radeon.modeset=1 i915.modeset=1 nvme_load=yes module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm module_blacklist=pcspkr,snd_pcsp diff --git a/profile/efiboot/loader/entries/03-archcraftiso-x86_64-linux-no-nouveau.conf b/profile/efiboot/loader/entries/03-archcraftiso-x86_64-linux-no-nouveau.conf deleted file mode 100644 index 4ccaf78..0000000 --- a/profile/efiboot/loader/entries/03-archcraftiso-x86_64-linux-no-nouveau.conf +++ /dev/null @@ -1,7 +0,0 @@ -title Boot Archcraft (x86_64, UEFI, open source, no nouveau) -sort-key 03 -linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux -initrd /%INSTALL_DIR%/boot/intel-ucode.img -initrd /%INSTALL_DIR%/boot/amd-ucode.img -initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=freenonouveau radeon.modeset=1 i915.modeset=1 nvme_load=yes diff --git a/profile/efiboot/loader/entries/03-archcraftiso-x86_64-linux-nvidia.conf b/profile/efiboot/loader/entries/03-archcraftiso-x86_64-linux-nvidia.conf new file mode 100644 index 0000000..c4df285 --- /dev/null +++ b/profile/efiboot/loader/entries/03-archcraftiso-x86_64-linux-nvidia.conf @@ -0,0 +1,7 @@ +title Boot Archcraft (x86_64, UEFI, nvidia) +sort-key 03 +linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux +initrd /%INSTALL_DIR%/boot/intel-ucode.img +initrd /%INSTALL_DIR%/boot/amd-ucode.img +initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-nvidia.img +options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nvidia_drm.modeset=1 nouveau.modeset=0 module_blacklist=nouveau radeon.modeset=1 i915.modeset=1 nvme_load=yes module_blacklist=pcspkr,snd_pcsp diff --git a/profile/efiboot/loader/entries/04-archcraftiso-x86_64-linux-nomodeset.conf b/profile/efiboot/loader/entries/04-archcraftiso-x86_64-linux-nomodeset.conf new file mode 100644 index 0000000..6503d15 --- /dev/null +++ b/profile/efiboot/loader/entries/04-archcraftiso-x86_64-linux-nomodeset.conf @@ -0,0 +1,7 @@ +title Boot Archcraft (x86_64, UEFI, nomodeset) +sort-key 04 +linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux +initrd /%INSTALL_DIR%/boot/intel-ucode.img +initrd /%INSTALL_DIR%/boot/amd-ucode.img +initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img +options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nomodeset module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm nouveau.modeset=0 radeon.modeset=0 i915.modeset=0 nvme_load=yes module_blacklist=pcspkr,snd_pcsp diff --git a/profile/efiboot/loader/entries/04-archcraftiso-x86_64-linux-nvidia-nouveau.conf b/profile/efiboot/loader/entries/04-archcraftiso-x86_64-linux-nvidia-nouveau.conf deleted file mode 100644 index b76e372..0000000 --- a/profile/efiboot/loader/entries/04-archcraftiso-x86_64-linux-nvidia-nouveau.conf +++ /dev/null @@ -1,7 +0,0 @@ -title Boot Archcraft (x86_64, UEFI, NVIDIA) -sort-key 04 -linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux -initrd /%INSTALL_DIR%/boot/intel-ucode.img -initrd /%INSTALL_DIR%/boot/amd-ucode.img -initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=nonfree nouveau.modeset=0 radeon.modeset=1 i915.modeset=1 nvme_load=yes diff --git a/profile/efiboot/loader/entries/05-archcraftiso-x86_64-linux-nvidia-no-nouveau.conf b/profile/efiboot/loader/entries/05-archcraftiso-x86_64-linux-nvidia-no-nouveau.conf deleted file mode 100644 index bdaf265..0000000 --- a/profile/efiboot/loader/entries/05-archcraftiso-x86_64-linux-nvidia-no-nouveau.conf +++ /dev/null @@ -1,7 +0,0 @@ -title Boot Archcraft (x86_64, UEFI, NVIDIA, no nouveau) -sort-key 05 -linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux -initrd /%INSTALL_DIR%/boot/intel-ucode.img -initrd /%INSTALL_DIR%/boot/amd-ucode.img -initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=nonfreenonouveau nouveau.modeset=0 radeon.modeset=1 i915.modeset=1 nvme_load=yes diff --git a/profile/efiboot/loader/entries/06-archcraftiso-x86_64-linux-nomodeset.conf b/profile/efiboot/loader/entries/06-archcraftiso-x86_64-linux-nomodeset.conf deleted file mode 100644 index 9ba261e..0000000 --- a/profile/efiboot/loader/entries/06-archcraftiso-x86_64-linux-nomodeset.conf +++ /dev/null @@ -1,7 +0,0 @@ -title Boot Archcraft (x86_64, UEFI, nomodeset) -sort-key 06 -linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux -initrd /%INSTALL_DIR%/boot/intel-ucode.img -initrd /%INSTALL_DIR%/boot/amd-ucode.img -initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img -options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=free nomodeset nouveau.modeset=0 radeon.modeset=0 i915.modeset=0 nvme_load=yes diff --git a/profile/grub/grub.cfg b/profile/grub/grub.cfg index 525aad1..55562e6 100644 --- a/profile/grub/grub.cfg +++ b/profile/grub/grub.cfg @@ -3,15 +3,18 @@ insmod part_gpt insmod part_msdos insmod fat insmod iso9660 +insmod ntfs +insmod ntfscomp +insmod exfat +insmod udf # Use graphics-mode output insmod all_video insmod font if loadfont "${prefix}/fonts/unicode.pf2" ; then - insmod gfxterm set gfxmode="auto" terminal_input console - terminal_output gfxterm + terminal_output console fi # Enable serial console @@ -20,6 +23,15 @@ if serial --unit=0 --speed=115200; then terminal_output --append serial fi +# Search for the ISO volume +if [ -z "${ARCHISO_UUID}" ]; then + if [ -z "${ARCHISO_HINT}" ]; then + regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}" + fi + search --no-floppy --set=root --file '%ARCHISO_SEARCH_FILENAME%' --hint "${ARCHISO_HINT}" + probe --set ARCHISO_UUID --fs-uuid "${root}" +fi + # Set default menu entry default=archcraft timeout=10 @@ -28,57 +40,37 @@ timeout_style=menu # Menu entries menuentry "Boot Archcraft (x86_64, UEFI)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraft' { set gfxpayload=keep - search --no-floppy --set=root --label %ARCHISO_LABEL% - linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n + linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n module_blacklist=pcspkr,snd_pcsp initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img } menuentry "Boot Archcraft (x86_64, UEFI, open source)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftos' { set gfxpayload=keep - search --no-floppy --set=root --label %ARCHISO_LABEL% - linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=free nouveau.modeset=1 radeon.modeset=1 i915.modeset=1 nvme_load=yes + linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nouveau.modeset=1 radeon.modeset=1 i915.modeset=1 nvme_load=yes module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm module_blacklist=pcspkr,snd_pcsp initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img } -menuentry "Boot Archcraft (x86_64, UEFI, open source, no nouveau)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftnn' { +menuentry "Boot Archcraft (x86_64, UEFI, nvidia)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftpn' { set gfxpayload=keep - search --no-floppy --set=root --label %ARCHISO_LABEL% - linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=freenonouveau radeon.modeset=1 i915.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.img -} - -menuentry "Boot Archcraft (x86_64, UEFI, NVIDIA)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftpn' { - set gfxpayload=keep - search --no-floppy --set=root --label %ARCHISO_LABEL% - linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=nonfree nouveau.modeset=0 radeon.modeset=1 i915.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.img -} - -menuentry "Boot Archcraft (x86_64, UEFI, NVIDIA, no nouveau)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftpnn' { - set gfxpayload=keep - search --no-floppy --set=root --label %ARCHISO_LABEL% - linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=nonfreenonouveau nouveau.modeset=0 radeon.modeset=1 i915.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.img + linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nvidia_drm.modeset=1 nouveau.modeset=0 module_blacklist=nouveau radeon.modeset=1 i915.modeset=1 nvme_load=yes module_blacklist=pcspkr,snd_pcsp + initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux-nvidia.img } menuentry "Boot Archcraft (x86_64, UEFI, nomodeset)" --class archcraft --class arch --class gnu-linux --class gnu --class os --id 'archcraftnm' { set gfxpayload=keep - search --no-floppy --set=root --label %ARCHISO_LABEL% - linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n driver=free nomodeset nouveau.modeset=0 radeon.modeset=0 i915.modeset=0 nvme_load=yes + linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID} quiet splash loglevel=3 udev.log_level=3 vt.global_cursor_default=0 cow_spacesize=5G copytoram=n nomodeset module_blacklist=nvidia,nvidia_modeset,nvidia_uvm,nvidia_drm nouveau.modeset=0 radeon.modeset=0 i915.modeset=0 nvme_load=yes module_blacklist=pcspkr,snd_pcsp initrd /%INSTALL_DIR%/boot/intel-ucode.img /%INSTALL_DIR%/boot/amd-ucode.img /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img } if [ "${grub_platform}" == "efi" ]; then if [ "${grub_cpu}" == "x86_64" ]; then - menuentry "UEFI Shell" --class recovery { + menuentry "UEFI Shell" --class recovery --class efi { insmod chain - search --no-floppy --set=root --label %ARCHISO_LABEL% chainloader /shellx64.efi } elif [ "${grub_cpu}" == "i386" ]; then - menuentry "UEFI Shell" --class recovery { + menuentry "UEFI Shell" --class recovery --class efi { insmod chain - search --no-floppy --set=root --label %ARCHISO_LABEL% chainloader /shellia32.efi } fi diff --git a/profile/mkarchcraftiso b/profile/mkarchcraftiso index bfca543..9523664 100755 --- a/profile/mkarchcraftiso +++ b/profile/mkarchcraftiso @@ -29,6 +29,7 @@ gpg_key="" gpg_sender="" iso_name="" iso_label="" +iso_uuid="" iso_publisher="" iso_application="" iso_version="" @@ -38,6 +39,7 @@ pacman_conf="" packages="" bootstrap_packages="" pacstrap_dir="" +declare -i rm_work_dir=0 buildmodes=() bootmodes=() airootfs_image_type="" @@ -86,7 +88,7 @@ usage: ${app_name} [options] Default: '${iso_application}' -C pacman configuration file. Default: '${pacman_conf}' - -D Set an install_dir. All files will by located here. + -D Set an install_dir. All files will be located here. Default: '${install_dir}' NOTE: Max 8 characters, use only [a-z0-9] -L