Metainformationen zur Seite
debian autoinstall with preseed.cfg
- preseed.cfg
#Location # set installer language d-i debian-installer/language string en # set installer country d-i debian-installer/country string DE # set installer locale d-i debian-installer/locale string en_US.UTF-8 # set installer keyboard d-i keyboard-configuration/xkb-keymap select de #################################################################### # network d-i netcfg/enable boolean true d-i netcfg/choose_interface select auto d-i netcfg/hostname string kali-net #################################################################### # firmware d-i hw-detect/load_firmware boolean true #################################################################### # debian mirror d-i mirror/country string manual d-i mirror/http/hostname string ftp2.de.debian.org d-i mirror/http/directory string /debian d-i mirror/http/proxy string d-i mirror/suite string stable #################################################################### #USERS # set the initial root password d-i passwd/root-password password user d-i passwd/root-password-again password user # To create a normal user account. d-i passwd/user-fullname string user d-i passwd/username string user # Normal user's password, either in clear text d-i passwd/user-password password user d-i passwd/user-password-again password user d-i passwd/auto-login boolean true #################################################################### # set timezone d-i clock-setup/utc boolean true d-i time/zone string Europe/Berlin #################################################################### # Partitioning #vbox #d-i partman-auto/disk string /dev/sda #kvm virtmanager d-i partman-auto/disk string /dev/vda d-i partman-auto/method string regular d-i partman-auto/choose_recipe select atomic #and fire ! d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true # select software to install tasksel tasksel/first multiselect standard, desktop-kde # packages d-i pkgsel/include string linux-headers-amd64 gcc make perl code-oss ffuf gobuster metasploit-framework zaproxy seclists tmux openvpn sqlmap vim vim-airline vim-airline-themes vim-ctrlp vim-youcompleteme yakuake xclip python3-bs4 nfs-common python3-pip rlwrap python3-impacket # cmds after install in target #d-i preseed/late_command string in-target sh -c 'echo "[Autologin]\nRelogin=false\nSession=plasma\nUser=user\n" >> /etc/sddm.conf.d/kde_settings.conf' # sudo adduser user vboxsf # cp /cdrom/partition.sh /target/root/ d-i preseed/late_command string tar xzf /cdrom/tmux-vim.tar.gz -C /target/home/user; #in-target sh SCRIPT # update my software if it is installed d-i pkgsel/upgrade select full-upgrade # I don't want to publish my software usage #popularity-contest popularity-contest/participate boolean false #GRUB d-i grub-installer/with_other_os boolean true d-i grub-installer/bootdev string default #d-i grub-installer/only_debian boolean true d-i finish-install/reboot_in_progress note
- make-preseed.sh
#MakeISO ISO='kali-linux-2021.3a-installer-netinst-amd64.iso' # create a folder for mounting the iso mkdir ORIGISO # create a folder for the content of the new iso mkdir NEWISO # mount the downloaded iso sudo mount -o loop $ISO ./ORIGISO # copy the content of the original ISO to the workspace sudo cp -rT ./ORIGISO/ ./NEWISO/ #copy extra files cp tmux-vim.tar.gz ./NEWISO/ #rsync -avhP ./ORGISO ./NEWISO #umount the iso sudo umount ./ORIGISO # now the magic beginns chmod +w -R ./NEWISO/install.amd/ gunzip ./NEWISO/install.amd/initrd.gz echo preseed.cfg | cpio -H newc -o -A -F ./NEWISO/install.amd/initrd gzip ./NEWISO/install.amd/initrd chmod -w -R ./NEWISO/install.amd chmod +w ./NEWISO/md5sum.txt # copy-here-the-scripts? find -follow -type f ! -name md5sum.txt -print0 | xargs -0 md5sum > ./NEWISO/md5sum.txt chmod -w ./NEWISO/md5sum.txt # generate the iso sudo genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o preseed-debian-10.iso ./NEWISO # remove all the temporary stuff sudo rm -fR ./ORIGISO ./NEWIS