From 05d35bc71286559065a71cdf5600cee2fc4119e1 Mon Sep 17 00:00:00 2001 From: simono41 Date: Mon, 2 Apr 2018 04:44:41 +0200 Subject: [PATCH] nvidia-fix --- arch-graphical-install-auto | 3 ++- arch-install | 24 ++++++++++++++++++------ find_and_delete.sh | 15 +++++++++++++++ make_mksquashfs-auto.sh | 29 +++++++++++++++++++++++++---- packages_cinnamon.txt | 3 +++ packages_gnome.txt | 3 +++ packages_kde.txt | 3 +++ packages_libre.txt | 3 +++ packages_lxde.txt | 3 +++ packages_lxqt.txt | 3 +++ packages_mate.txt | 3 +++ packages_voll.txt | 3 +++ packages_xfce4.txt | 3 +++ 13 files changed, 87 insertions(+), 11 deletions(-) create mode 100755 find_and_delete.sh diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index 0365df7..8adfc31 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -759,7 +759,8 @@ ldconfigcache if [ "${version}" == "libre" ]; then mkinitcpio -p linux-libre else - mkinitcpio -p linux + mkinitcpio -p linux -c /etc/mkinitcpio.conf + mkinitcpio -p linux-lts -c /etc/mkinitcpio-lts.conf fi echo "Fertig!!!" diff --git a/arch-install b/arch-install index 2061c08..d050d63 100755 --- a/arch-install +++ b/arch-install @@ -288,12 +288,22 @@ function installation { echo "" if [ "${version}" == "libre" ]; then echo "MODULES=\"i915 radeon nouveau ata_generic ata_piix nls_cp437 vfat ext4 btrfs\"" > ${mountpoint}/etc/mkinitcpio.conf + echo "HOOKS=\"${parameter}\"" >> ${mountpoint}/etc/mkinitcpio.conf + echo "COMPRESSION=\"lz4\"" >> ${mountpoint}/etc/mkinitcpio.conf + echo "FILES=\"/etc/modprobe.d/blacklist-floppy.conf /etc/modprobe.d/blacklist_nouveau.conf\"" >> ${mountpoint}/etc/mkinitcpio.conf + else - echo "MODULES=\"nvidia nvidia_modeset nvidia_uvm nvidia_drm i915 radeon ata_generic ata_piix nls_cp437 vfat ext4 btrfs\"" > ${mountpoint}/etc/mkinitcpio.conf + echo "MODULES=\"i915 radeon ata_generic ata_piix nls_cp437 vfat ext4 btrfs\"" > ${mountpoint}/etc/mkinitcpio.conf + echo "HOOKS=\"${parameter}\"" >> ${mountpoint}/etc/mkinitcpio.conf + echo "COMPRESSION=\"lz4\"" >> ${mountpoint}/etc/mkinitcpio.conf + echo "FILES=\"/etc/modprobe.d/blacklist-floppy.conf\"" >> ${mountpoint}/etc/mkinitcpio.conf + + echo "MODULES=\"nvidia nvidia_modeset nvidia_uvm nvidia_drm i915 radeon ata_generic ata_piix nls_cp437 vfat ext4 btrfs\"" > ${mountpoint}/etc/mkinitcpio-lts.conf + echo "HOOKS=\"${parameter}\"" >> ${mountpoint}/etc/mkinitcpio-lts.conf + echo "COMPRESSION=\"lz4\"" >> ${mountpoint}/etc/mkinitcpio-lts.conf + echo "FILES=\"/etc/modprobe.d/blacklist-floppy.conf /etc/modprobe.d/blacklist_nouveau.conf\"" >> ${mountpoint}/etc/mkinitcpio-lts.conf + fi - echo "HOOKS=\"${parameter}\"" >> ${mountpoint}/etc/mkinitcpio.conf - echo "COMPRESSION=\"lz4\"" >> ${mountpoint}/etc/mkinitcpio.conf - echo "FILES=\"/etc/modprobe.d/blacklist-floppy.conf /etc/modprobe.d/blacklist_nouveau.conf\"" >> ${mountpoint}/etc/mkinitcpio.conf echo "" echo "blacklist floppy" > ${mountpoint}/etc/modprobe.d/blacklist-floppy.conf echo "blacklist nouveau" > ${mountpoint}/etc/modprobe.d/blacklist_nouveau.conf @@ -1005,7 +1015,8 @@ then if [ "${version}" == "libre" ]; then arch-chroot ${mountpoint} mkinitcpio -p linux-libre else - arch-chroot ${mountpoint} mkinitcpio -p linux + arch-chroot ${mountpoint} mkinitcpio -p linux -c /etc/mkinitcpio.conf + arch-chroot ${mountpoint} mkinitcpio -p linux-lts -c /etc/mkinitcpio-lts.conf fi echo "" if [ "${boot}" == "grub" ] @@ -1035,7 +1046,8 @@ elif [ "${Partition}" == "bios" ]; then if [ "${version}" == "libre" ]; then arch-chroot ${mountpoint} mkinitcpio -p linux-libre else - arch-chroot ${mountpoint} mkinitcpio -p linux + arch-chroot ${mountpoint} mkinitcpio -p linux -c /etc/mkinitcpio.conf + arch-chroot ${mountpoint} mkinitcpio -p linux-lts -c /etc/mkinitcpio-lts.conf fi arch-chroot ${mountpoint} grub-install --target=i386-pc --recheck ${device} arch-chroot ${mountpoint} grub-mkconfig -o /boot/grub/grub.cfg diff --git a/find_and_delete.sh b/find_and_delete.sh new file mode 100755 index 0000000..b677db5 --- /dev/null +++ b/find_and_delete.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -ex + +wort=${1} +shift +ersetzen=${1} +shift + +while (( "$(expr $#)" )) +do + sed "s|${wort}|${ersetzen}|g;" $1 > tempdatei + mv tempdatei $1 + shift +done diff --git a/make_mksquashfs-auto.sh b/make_mksquashfs-auto.sh index 7cff82f..efdf7e4 100755 --- a/make_mksquashfs-auto.sh +++ b/make_mksquashfs-auto.sh @@ -96,12 +96,21 @@ function filesystem() { if [ "${version}" == "libre" ]; then echo "MODULES=\"i915 radeon nouveau ata_generic ata_piix nls_cp437 vfat ext4 btrfs\"" > ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf echo "HOOKS=\"base udev memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block pcmcia filesystems keyboard cow_device\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf + echo "COMPRESSION=\"lz4\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf + echo "FILES=\"/etc/modprobe.d/blacklist-floppy.conf\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf + else - echo "MODULES=\"nvidia nvidia_modeset nvidia_uvm nvidia_drm i915 radeon ata_generic ata_piix nls_cp437 vfat ext4 btrfs\"" > ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf + echo "MODULES=\"i915 radeon ata_generic ata_piix nls_cp437 vfat ext4 btrfs\"" > ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf echo "HOOKS=\"base udev plymouth memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block pcmcia filesystems keyboard cow_device\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf + echo "COMPRESSION=\"lz4\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf + echo "FILES=\"/etc/modprobe.d/blacklist-floppy.conf\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf + + echo "MODULES=\"nvidia nvidia_modeset nvidia_uvm nvidia_drm i915 radeon ata_generic ata_piix nls_cp437 vfat ext4 btrfs\"" > ${work_dir}/${arch}/airootfs/etc/mkinitcpio-lts.conf + echo "HOOKS=\"base udev plymouth memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block pcmcia filesystems keyboard cow_device\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio-lts.conf + echo "COMPRESSION=\"lz4\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio-lts.conf + echo "FILES=\"/etc/modprobe.d/blacklist-floppy.conf /etc/modprobe.d/blacklist_nouveau.conf\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio-lts.conf + fi - echo "COMPRESSION=\"lz4\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf - echo "FILES=\"/etc/modprobe.d/blacklist-floppy.conf /etc/modprobe.d/blacklist_nouveau.conf\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf # hooks cp -v install/archiso* ${work_dir}/${arch}/airootfs/usr/lib/initcpio/install/ @@ -171,8 +180,15 @@ function BIOS() { mkdir -p ${work_dir}/iso/${install_dir}/boot/syslinux cp -R ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/* ${work_dir}/iso/${install_dir}/boot/syslinux/ + cp ${work_dir}/${arch}/airootfs/boot/initramfs-linux${linuxparameter}.img ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img cp ${work_dir}/${arch}/airootfs/boot/vmlinuz-linux${linuxparameter} ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz + + if [ "${version}" != "libre" ]; then + cp ${work_dir}/${arch}/airootfs/boot/initramfs-linux-lts.img ${work_dir}/iso/${install_dir}/boot/${arch}/archiso-lts.img + cp ${work_dir}/${arch}/airootfs/boot/vmlinuz-linux-lts ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz-lts + fi + cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isolinux.bin ${work_dir}/iso/isolinux/ cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isohdpfx.bin ${work_dir}/iso/isolinux/ cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/ldlinux.c32 ${work_dir}/iso/isolinux/ @@ -228,7 +244,7 @@ function UEFI() { echo "efiboot.img nicht vorhanden!" fi - truncate -s 256M ${work_dir}/iso/EFI/archiso/efiboot.img + truncate -s 512M ${work_dir}/iso/EFI/archiso/efiboot.img mkfs.vfat -n ${iso_label}_EFI ${work_dir}/iso/EFI/archiso/efiboot.img mkdir -p ${work_dir}/efiboot @@ -242,6 +258,11 @@ function UEFI() { cp ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz ${work_dir}/efiboot/EFI/archiso/vmlinuz.efi cp ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img ${work_dir}/efiboot/EFI/archiso/archiso.img + if [ "${version}" != "libre" ]; then + cp ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz-lts ${work_dir}/efiboot/EFI/archiso/vmlinuz-lts.efi + cp ${work_dir}/iso/${install_dir}/boot/${arch}/archiso-lts.img ${work_dir}/efiboot/EFI/archiso/archiso-lts.img + fi + cp ${work_dir}/${arch}/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi cp ${work_dir}/${arch}/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/efiboot/EFI/boot/ diff --git a/packages_cinnamon.txt b/packages_cinnamon.txt index 4c640f5..e8e65d8 100644 --- a/packages_cinnamon.txt +++ b/packages_cinnamon.txt @@ -18,10 +18,13 @@ blueman bmon brasero btrfs-progs +bumblebee cdrtools cinnamon cmake cronie +cuda +cudnn cups dbus dialog diff --git a/packages_gnome.txt b/packages_gnome.txt index d4d0d43..93a20ce 100644 --- a/packages_gnome.txt +++ b/packages_gnome.txt @@ -18,9 +18,12 @@ blueman bmon brasero btrfs-progs +bumblebee cdrtools cmake cronie +cuda +cudnn cups dbus dialog diff --git a/packages_kde.txt b/packages_kde.txt index 696f8bf..ee91cb6 100644 --- a/packages_kde.txt +++ b/packages_kde.txt @@ -18,9 +18,12 @@ blueman bmon brasero btrfs-progs +bumblebee cdrtools cmake cronie +cuda +cudnn cups dbus dialog diff --git a/packages_libre.txt b/packages_libre.txt index d5327f5..d3c485d 100644 --- a/packages_libre.txt +++ b/packages_libre.txt @@ -11,9 +11,12 @@ base-devel bash-completion blueman btrfs-progs +bumblebee cdrtools cmake cronie +cuda +cudnn cups dbus dialog diff --git a/packages_lxde.txt b/packages_lxde.txt index 5406b19..fc3fae2 100644 --- a/packages_lxde.txt +++ b/packages_lxde.txt @@ -18,9 +18,12 @@ blueman bmon brasero btrfs-progs +bumblebee cdrtools cmake cronie +cuda +cudnn cups dbus dialog diff --git a/packages_lxqt.txt b/packages_lxqt.txt index d24b794..6a94876 100644 --- a/packages_lxqt.txt +++ b/packages_lxqt.txt @@ -19,9 +19,12 @@ bmon brasero breeze-icons btrfs-progs +bumblebee cdrtools cmake cronie +cuda +cudnn cups dbus dialog diff --git a/packages_mate.txt b/packages_mate.txt index 37829a2..cc13a51 100644 --- a/packages_mate.txt +++ b/packages_mate.txt @@ -18,9 +18,12 @@ blueman bmon brasero btrfs-progs +bumblebee cdrtools cmake cronie +cuda +cudnn cups dbus dialog diff --git a/packages_voll.txt b/packages_voll.txt index f6be40c..f9d944b 100644 --- a/packages_voll.txt +++ b/packages_voll.txt @@ -28,6 +28,7 @@ boost brasero breeze-icons btrfs-progs +bumblebee bzr calibre cdrtools @@ -35,6 +36,8 @@ chromium cinnamon cmake cronie +cuda +cudnn cups dbus dialog diff --git a/packages_xfce4.txt b/packages_xfce4.txt index 3fbe536..9dc9447 100644 --- a/packages_xfce4.txt +++ b/packages_xfce4.txt @@ -18,9 +18,12 @@ blueman bmon brasero btrfs-progs +bumblebee cdrtools cmake cronie +cuda +cudnn cups dbus dialog