diff --git a/arch-install b/arch-install index 183cde7..cbc2c38 100755 --- a/arch-install +++ b/arch-install @@ -259,11 +259,11 @@ function installation { echo "It is a copytoram system." unsquashfs -f -d ${mountpoint} /run/archiso/copytoram/airootfs.sfs else - read -p "Where is the airootfs.sfs? Please specify the complete path or choose the online installation? [/airootfs.sfs/online] : " installationfehler - if [ "${installationfehler}" == "online" ]; then + read -p "Where is the airootfs.sfs? Please specify the complete path or choose the online installation? [/airootfs.sfs/online] : " installationsfehler + if [ "${installationsfehler}" == "online" ]; then minimalinstallation else - unsquashfs -f -d ${mountpoint} ${installationfehler} + unsquashfs -f -d ${mountpoint} ${installationsfehler} fi fi else @@ -1106,14 +1106,14 @@ fi # benutzerwechsel -if [ "${name}" != "noinstall" ]; then +if [ "${name}" != "noinstall" ] && [ -z "${installationsfehler}" ]; then #arch-chroot ${mountpoint} usermod -l "${name}" user1 #arch-chroot ${mountpoint} usermod -d /home/"${name}" -m "${name}" arch-chroot ${mountpoint} chfn -f "${name}" user1 arch-chroot ${mountpoint} passwd user1 fi -if [ "${update}" != "n" ] && [ "${offline}" == "n" ] || [ "${installationfehler}" == "online" ]; then +if [ "${update}" != "n" ] && [ "${offline}" == "n" ] || [ -n "${installationsfehler}" ]; then read -p "Should the extended installation be carried out? [Y/n] " graphical if [ "$graphical" != "n" ] then diff --git a/make_mksquashfs-auto.sh b/make_mksquashfs-auto.sh index e71650f..6e2faea 100755 --- a/make_mksquashfs-auto.sh +++ b/make_mksquashfs-auto.sh @@ -22,7 +22,7 @@ echo "Hallo Echo" # for-schleife for wort in "$2" "$3" "$4" "$5" "$6" "$7" - do +do echo "$wort" if [ "$wort" == "deletework" ]; then deletework=y; fi if [ "$wort" == "filesystem" ]; then filesystem=y; fi @@ -30,6 +30,7 @@ for wort in "$2" "$3" "$4" "$5" "$6" "$7" if [ "$wort" == "makebios" ]; then makebios=y; fi if [ "$wort" == "makeimage" ]; then makeimage=y; fi if [ "$wort" == "makeiso" ]; then makeiso=y; fi + if [ "$wort" == "mkinitcpio" ]; then mkinitcpio=y; fi done sleep 5 @@ -49,20 +50,20 @@ function minimalinstallation() { cp mirrorlist* /etc/pacman.d/ if [ "${archchroot}" != "y" ]; then - echo "Tipp: Die Option -i eine automatische Bestätigung der Paketauswahl. Da Sie den Linux-Kernel nicht im Container installieren müssen, können Sie ihn aus der Paketlistenauswahl entfernen, um Platz zu sparen. Siehe Pacman # Verwendung ." + echo "Tipp: Die Option -i eine automatische Bestätigung der Paketauswahl. Da Sie den Linux-Kernel nicht im Container installieren müssen, können Sie ihn aus der Paketlistenauswahl entfernen, um Platz zu sparen. Siehe Pacman # Verwendung ." fi if [ "${version}" == "libre" ]; then - if [ "${archchroot}" != "y" ]; then - ./pacstrap -C /etc/pacman.conf_libre -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux - else - ./pacstrap -C /etc/pacman.conf_libre -c -d -G -M ${work_dir}/${arch}/airootfs base git - fi + if [ "${archchroot}" != "y" ]; then + ./pacstrap -C /etc/pacman.conf_libre -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux + else + ./pacstrap -C /etc/pacman.conf_libre -c -d -G -M ${work_dir}/${arch}/airootfs base git + fi else - if [ "${archchroot}" != "y" ]; then - ./pacstrap -C /etc/pacman.conf -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux - else - ./pacstrap -C /etc/pacman.conf -c -d -G -M ${work_dir}/${arch}/airootfs base git - fi + if [ "${archchroot}" != "y" ]; then + ./pacstrap -C /etc/pacman.conf -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux + else + ./pacstrap -C /etc/pacman.conf -c -d -G -M ${work_dir}/${arch}/airootfs base git + fi fi } @@ -112,35 +113,37 @@ function filesystem() { fi - # module and hooks - 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 + if [ "${mkinitcpio}" == "y" ]; then + # module and hooks + 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=\"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 + else + #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.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 /etc/modprobe.d/blacklist_nouveau.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.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 /etc/modprobe.d/blacklist_nouveau.conf\"" >> ${work_dir}/${arch}/airootfs/etc/mkinitcpio.conf + + fi + + # hooks + cp -v install/archiso* ${work_dir}/${arch}/airootfs/usr/lib/initcpio/install/ + cp -v hooks/archiso* ${work_dir}/${arch}/airootfs/usr/lib/initcpio/hooks/ + + cp -v script/archiso* ${work_dir}/${arch}/airootfs/usr/lib/initcpio/ + + 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/ fi - - # hooks - cp -v install/archiso* ${work_dir}/${arch}/airootfs/usr/lib/initcpio/install/ - cp -v hooks/archiso* ${work_dir}/${arch}/airootfs/usr/lib/initcpio/hooks/ - - cp -v script/archiso* ${work_dir}/${arch}/airootfs/usr/lib/initcpio/ - - 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/ - fi @@ -205,8 +208,8 @@ function BIOS() { 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 + #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/ @@ -279,8 +282,8 @@ function UEFI() { 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 + #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 @@ -424,9 +427,9 @@ if [ "${filesystem}" == "y" ]; then cp arch-graphical-install-auto ${work_dir}/${arch}/airootfs/usr/bin/arch-graphical-install-auto echo "${hostname}" > ${work_dir}/${arch}/airootfs/etc/hostname if [ "${archchroot}" != "y" ]; then - systemd-nspawn -b -D ${work_dir}/${arch}/airootfs + systemd-nspawn -b -D ${work_dir}/${arch}/airootfs else - ./arch-chroot ${work_dir}/${arch}/airootfs /usr/bin/arch-graphical-install-auto ${version} user1 user1 archchroot + ./arch-chroot ${work_dir}/${arch}/airootfs /usr/bin/arch-graphical-install-auto ${version} user1 user1 archchroot fi fi @@ -439,19 +442,19 @@ if [ "${makeimage}" == "y" ]; then fi if [ "${makebios}" == "y" ]; then -# BIOS + # BIOS -BIOS + BIOS -# EFI + # EFI -UEFI + UEFI fi if [ "${makeiso}" == "y" ]; then -# MAKEISO + # MAKEISO -makeiso + makeiso fi # chroot