diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index edfe95e..a364fe7 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -423,13 +423,13 @@ then mkdir -p /etc/systemd/system/getty\@tty1.service.d echo "[Service]" > /etc/systemd/system/getty\@tty1.service.d/autologin.conf echo "ExecStart=" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf - echo "ExecStart=-/sbin/agetty --noclear -a root %I 38400 linux" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf + echo "ExecStart=-/usr/bin/agetty --autologin root -s %I 115200,38400,9600 vt102" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf systemctl enable getty@tty1 else mkdir -p /etc/systemd/system/getty\@tty1.service.d echo "[Service]" > /etc/systemd/system/getty\@tty1.service.d/autologin.conf echo "ExecStart=" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf - echo "ExecStart=-/sbin/agetty -a "$username" %I $TERM" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf + echo "ExecStart=-/usr/bin/agetty --autologin $username -s %I 115200,38400,9600 vt102" >> /etc/systemd/system/getty\@tty1.service.d/autologin.conf systemctl enable getty@tty1 fi diff --git a/arch-install b/arch-install index 83e1a64..4c410ac 100755 --- a/arch-install +++ b/arch-install @@ -38,6 +38,8 @@ function minimalinstallation() { cp -v /opt/${repo}/install/cow_device ${mountpoint}/usr/lib/initcpio/install/ cp -v /opt/${repo}/hooks/cow_device ${mountpoint}/usr/lib/initcpio/hooks/ + cp -v /opt/${repo}/pacman-hooks/* ${mountpoint}/etc/pacman.d/hooks/ + # scripts cp /opt/${repo}/arch-graphical-install-auto ${mountpoint}/usr/bin/arch-graphical-install-auto chmod +x ${mountpoint}/usr/bin/arch-graphical-install-auto @@ -789,7 +791,7 @@ function systemdboot() { echo "linux /${linuz}" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf echo "initrd /${kernelback}" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf - echo "options root=${tobootdevice} rw ${parameter}quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf + echo "options root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" >> ${mountpoint}/boot/loader/entries/arch-uefi-fallback.conf echo "default arch-uefi" > ${mountpoint}/boot/loader/loader.conf echo "timeout 1" >> ${mountpoint}/boot/loader/loader.conf @@ -799,7 +801,7 @@ function systemdboot() { echo "linux /%LINUZ%" >> ${mountpoint}/boot/arch-uefi.conf.example echo "initrd /intel-ucode.img" >> ${mountpoint}/boot/arch-uefi.conf.example echo "initrd /%KERNEL%" >> ${mountpoint}/boot/arch-uefi.conf.example - echo "options root=${tobootdevice} rw ${parameter}quiet splash" >> ${mountpoint}/boot/arch-uefi.conf.example + echo "options root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" >> ${mountpoint}/boot/arch-uefi.conf.example if [ "${booteintraege}" != "n" ]; then @@ -807,7 +809,7 @@ function systemdboot() { arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l /EFI/systemd/systemd-bootx64.efi -L "Linux Boot Manager" - arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \\${linuz} -L "Arch Linux efistub" -u "initrd=/${kernel} root=${tobootdevice} rw ${parameter}quiet splash" + arch-chroot ${mountpoint} efibootmgr -c -d ${device} -p 1 -l \\${linuz} -L "Arch Linux efistub" -u "initrd=/${kernel} root=${tobootdevice} rw ${parameter}nvidia-drm.modeset=1 quiet splash" fi diff --git a/make_mksquashfs-auto.sh b/make_mksquashfs-auto.sh index 588293b..077c620 100755 --- a/make_mksquashfs-auto.sh +++ b/make_mksquashfs-auto.sh @@ -131,6 +131,8 @@ function system() { cp -v install/cow_device ${work_dir}/${arch}/airootfs/usr/lib/initcpio/install/ cp -v hooks/cow_device ${work_dir}/${arch}/airootfs/usr/lib/initcpio/hooks/ + cp -v pacman-hooks/* ${work_dir}/${arch}/airootfs/etc/pacman.d/hooks/ + # modprobe.d mkdir -p ${work_dir}/${arch}/airootfs/etc/modprobe.d/ echo "blacklist floppy" > ${work_dir}/${arch}/airootfs/etc/modprobe.d/blacklist-floppy.conf diff --git a/pacman-hooks/backup-modules-post.hook b/pacman-hooks/backup-modules-post.hook new file mode 100644 index 0000000..66f9443 --- /dev/null +++ b/pacman-hooks/backup-modules-post.hook @@ -0,0 +1,13 @@ +[Trigger] +Operation = Remove +Operation = Upgrade +Type = Package +Target = linux +Target = linux-hardened +Target = linux-mainline + +[Action] +Depends = coreutils +Depends = bash +When = PostTransaction +Exec = /usr/bin/bash -c '[[ -d /usr/lib/modules/$(uname -r) ]] || ln -s /tmp/$(uname -r) /usr/lib/modules/$(uname -r)' diff --git a/pacman-hooks/backup-modules-pre.hook b/pacman-hooks/backup-modules-pre.hook new file mode 100644 index 0000000..372d5f2 --- /dev/null +++ b/pacman-hooks/backup-modules-pre.hook @@ -0,0 +1,13 @@ +[Trigger] +Operation = Upgrade +Operation = Remove +Type = Package +Target = linux +Target = linux-hardened +Target = linux-mainline + +[Action] +Depends = coreutils +Depends = bash +When = PreTransaction +Exec = /usr/bin/bash -c 'find /usr/lib/modules -maxdepth 1 -type l -delete; cp -a /usr/lib/modules/$(uname -r) /tmp 2>/dev/null || :' diff --git a/pacman-hooks/mirrorupgrade.hook b/pacman-hooks/mirrorupgrade.hook new file mode 100644 index 0000000..94f00e6 --- /dev/null +++ b/pacman-hooks/mirrorupgrade.hook @@ -0,0 +1,10 @@ +[Trigger] +Operation = Upgrade +Type = Package +Target = pacman-mirrorlist + +[Action] +Description = Updating pacman-mirrorlist with reflector and removing pacnew, this can take a few minutes... +When = PostTransaction +Depends = reflector +Exec = /bin/bash -c "reflector --sort rate --save /etc/pacman.d/mirrorlist; rm -f /etc/pacman.d/mirrorlist.pacnew" diff --git a/pacman-hooks/nvidia.hook b/pacman-hooks/nvidia.hook new file mode 100644 index 0000000..42780ee --- /dev/null +++ b/pacman-hooks/nvidia.hook @@ -0,0 +1,16 @@ + +[Trigger] +Operation=Install +Operation=Upgrade +Operation=Remove +Type=Package +Target=nvidia +Target=linux +# Change the linux part above and in the Exec line if a different kernel is used + +[Action] +Description=Update Nvidia module in initcpio +Depends=mkinitcpio +When=PostTransaction +NeedsTargets +Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'