From b86540e5377db567fbdc2ae3a5a1ffb9ebab0bc6 Mon Sep 17 00:00:00 2001 From: Kaj Forney Date: Wed, 17 Oct 2018 15:35:13 -0600 Subject: [PATCH] Parrot preseed changes Former-commit-id: 14dd6bccfd5545229d14258341427afe3b72377f Former-commit-id: f42f1393ead3eb4f41d8b8ad7a019efddfa3ce62 --- .../{etc/skel => root}/Templates/prog/ObjC.m | 0 .../skel => root}/Templates/prog/assembly.asm | 0 .../skel => root}/Templates/prog/bash-sh.sh | 0 .../{etc/skel => root}/Templates/prog/c++.cpp | 0 .../{etc/skel => root}/Templates/prog/c.c | 0 .../skel => root}/Templates/prog/falcon.fal | 0 .../skel => root}/Templates/prog/header.h | 0 .../skel => root}/Templates/prog/java.java | 0 .../{etc/skel => root}/Templates/prog/perl.pl | 0 .../Templates/prog/perlModule.pm | 0 .../skel => root}/Templates/prog/python.py | 0 .../{etc/skel => root}/Templates/prog/ruby.rb | 0 .../skel => root}/Templates/prog/shellcode.s | 0 .../skel => root}/Templates/text/calc.ods | Bin .../skel => root}/Templates/text/impress.odp | Bin .../{etc/skel => root}/Templates/text/txt.txt | 0 .../skel => root}/Templates/text/writer.odt | Bin .../{etc/skel => root}/Templates/web/css.css | 0 .../skel => root}/Templates/web/html.html | 0 .../skel => root}/Templates/web/javascript.js | 0 .../{etc/skel => root}/Templates/web/php.php | 0 .../{etc/skel => root}/Templates/web/xml.xml | 0 .../02-unattended-boot.binary | 8 ++ .../common/includes.installer/preseed.cfg | 70 ++++++++++++---- .../common/includes.installer/preseed.cfg | 34 +++++++- .../includes.installer/preseed.cfg.kali | 79 ++++++++++++++++++ .../includes.installer/preseed.cfg.orig | 76 +++++++++++++++++ runme.sh | 2 - 28 files changed, 247 insertions(+), 22 deletions(-) rename filesystem/{etc/skel => root}/Templates/prog/ObjC.m (100%) rename filesystem/{etc/skel => root}/Templates/prog/assembly.asm (100%) rename filesystem/{etc/skel => root}/Templates/prog/bash-sh.sh (100%) rename filesystem/{etc/skel => root}/Templates/prog/c++.cpp (100%) rename filesystem/{etc/skel => root}/Templates/prog/c.c (100%) rename filesystem/{etc/skel => root}/Templates/prog/falcon.fal (100%) rename filesystem/{etc/skel => root}/Templates/prog/header.h (100%) rename filesystem/{etc/skel => root}/Templates/prog/java.java (100%) rename filesystem/{etc/skel => root}/Templates/prog/perl.pl (100%) rename filesystem/{etc/skel => root}/Templates/prog/perlModule.pm (100%) rename filesystem/{etc/skel => root}/Templates/prog/python.py (100%) rename filesystem/{etc/skel => root}/Templates/prog/ruby.rb (100%) rename filesystem/{etc/skel => root}/Templates/prog/shellcode.s (100%) rename filesystem/{etc/skel => root}/Templates/text/calc.ods (100%) rename filesystem/{etc/skel => root}/Templates/text/impress.odp (100%) rename filesystem/{etc/skel => root}/Templates/text/txt.txt (100%) rename filesystem/{etc/skel => root}/Templates/text/writer.odt (100%) rename filesystem/{etc/skel => root}/Templates/web/css.css (100%) rename filesystem/{etc/skel => root}/Templates/web/html.html (100%) rename filesystem/{etc/skel => root}/Templates/web/javascript.js (100%) rename filesystem/{etc/skel => root}/Templates/web/php.php (100%) rename filesystem/{etc/skel => root}/Templates/web/xml.xml (100%) create mode 100755 modules/live-build-config/kali-config/common/includes.installer/02-unattended-boot.binary mode change 100644 => 100755 modules/live-build-config/kali-config/common/includes.installer/preseed.cfg create mode 100755 modules/parrot-build/templates/common/includes.installer/preseed.cfg.kali create mode 100644 modules/parrot-build/templates/common/includes.installer/preseed.cfg.orig diff --git a/filesystem/etc/skel/Templates/prog/ObjC.m b/filesystem/root/Templates/prog/ObjC.m similarity index 100% rename from filesystem/etc/skel/Templates/prog/ObjC.m rename to filesystem/root/Templates/prog/ObjC.m diff --git a/filesystem/etc/skel/Templates/prog/assembly.asm b/filesystem/root/Templates/prog/assembly.asm similarity index 100% rename from filesystem/etc/skel/Templates/prog/assembly.asm rename to filesystem/root/Templates/prog/assembly.asm diff --git a/filesystem/etc/skel/Templates/prog/bash-sh.sh b/filesystem/root/Templates/prog/bash-sh.sh similarity index 100% rename from filesystem/etc/skel/Templates/prog/bash-sh.sh rename to filesystem/root/Templates/prog/bash-sh.sh diff --git a/filesystem/etc/skel/Templates/prog/c++.cpp b/filesystem/root/Templates/prog/c++.cpp similarity index 100% rename from filesystem/etc/skel/Templates/prog/c++.cpp rename to filesystem/root/Templates/prog/c++.cpp diff --git a/filesystem/etc/skel/Templates/prog/c.c b/filesystem/root/Templates/prog/c.c similarity index 100% rename from filesystem/etc/skel/Templates/prog/c.c rename to filesystem/root/Templates/prog/c.c diff --git a/filesystem/etc/skel/Templates/prog/falcon.fal b/filesystem/root/Templates/prog/falcon.fal similarity index 100% rename from filesystem/etc/skel/Templates/prog/falcon.fal rename to filesystem/root/Templates/prog/falcon.fal diff --git a/filesystem/etc/skel/Templates/prog/header.h b/filesystem/root/Templates/prog/header.h similarity index 100% rename from filesystem/etc/skel/Templates/prog/header.h rename to filesystem/root/Templates/prog/header.h diff --git a/filesystem/etc/skel/Templates/prog/java.java b/filesystem/root/Templates/prog/java.java similarity index 100% rename from filesystem/etc/skel/Templates/prog/java.java rename to filesystem/root/Templates/prog/java.java diff --git a/filesystem/etc/skel/Templates/prog/perl.pl b/filesystem/root/Templates/prog/perl.pl similarity index 100% rename from filesystem/etc/skel/Templates/prog/perl.pl rename to filesystem/root/Templates/prog/perl.pl diff --git a/filesystem/etc/skel/Templates/prog/perlModule.pm b/filesystem/root/Templates/prog/perlModule.pm similarity index 100% rename from filesystem/etc/skel/Templates/prog/perlModule.pm rename to filesystem/root/Templates/prog/perlModule.pm diff --git a/filesystem/etc/skel/Templates/prog/python.py b/filesystem/root/Templates/prog/python.py similarity index 100% rename from filesystem/etc/skel/Templates/prog/python.py rename to filesystem/root/Templates/prog/python.py diff --git a/filesystem/etc/skel/Templates/prog/ruby.rb b/filesystem/root/Templates/prog/ruby.rb similarity index 100% rename from filesystem/etc/skel/Templates/prog/ruby.rb rename to filesystem/root/Templates/prog/ruby.rb diff --git a/filesystem/etc/skel/Templates/prog/shellcode.s b/filesystem/root/Templates/prog/shellcode.s similarity index 100% rename from filesystem/etc/skel/Templates/prog/shellcode.s rename to filesystem/root/Templates/prog/shellcode.s diff --git a/filesystem/etc/skel/Templates/text/calc.ods b/filesystem/root/Templates/text/calc.ods similarity index 100% rename from filesystem/etc/skel/Templates/text/calc.ods rename to filesystem/root/Templates/text/calc.ods diff --git a/filesystem/etc/skel/Templates/text/impress.odp b/filesystem/root/Templates/text/impress.odp similarity index 100% rename from filesystem/etc/skel/Templates/text/impress.odp rename to filesystem/root/Templates/text/impress.odp diff --git a/filesystem/etc/skel/Templates/text/txt.txt b/filesystem/root/Templates/text/txt.txt similarity index 100% rename from filesystem/etc/skel/Templates/text/txt.txt rename to filesystem/root/Templates/text/txt.txt diff --git a/filesystem/etc/skel/Templates/text/writer.odt b/filesystem/root/Templates/text/writer.odt similarity index 100% rename from filesystem/etc/skel/Templates/text/writer.odt rename to filesystem/root/Templates/text/writer.odt diff --git a/filesystem/etc/skel/Templates/web/css.css b/filesystem/root/Templates/web/css.css similarity index 100% rename from filesystem/etc/skel/Templates/web/css.css rename to filesystem/root/Templates/web/css.css diff --git a/filesystem/etc/skel/Templates/web/html.html b/filesystem/root/Templates/web/html.html similarity index 100% rename from filesystem/etc/skel/Templates/web/html.html rename to filesystem/root/Templates/web/html.html diff --git a/filesystem/etc/skel/Templates/web/javascript.js b/filesystem/root/Templates/web/javascript.js similarity index 100% rename from filesystem/etc/skel/Templates/web/javascript.js rename to filesystem/root/Templates/web/javascript.js diff --git a/filesystem/etc/skel/Templates/web/php.php b/filesystem/root/Templates/web/php.php similarity index 100% rename from filesystem/etc/skel/Templates/web/php.php rename to filesystem/root/Templates/web/php.php diff --git a/filesystem/etc/skel/Templates/web/xml.xml b/filesystem/root/Templates/web/xml.xml similarity index 100% rename from filesystem/etc/skel/Templates/web/xml.xml rename to filesystem/root/Templates/web/xml.xml diff --git a/modules/live-build-config/kali-config/common/includes.installer/02-unattended-boot.binary b/modules/live-build-config/kali-config/common/includes.installer/02-unattended-boot.binary new file mode 100755 index 00000000..bbac3189 --- /dev/null +++ b/modules/live-build-config/kali-config/common/includes.installer/02-unattended-boot.binary @@ -0,0 +1,8 @@ +#!/bin/sh +cat >>binary/isolinux/install.cfg < label install +menu label ^Unattended Install +menu default +linux /install/vmlinuz +initrd /install/initrd.gz +append vga=788 — quiet file=/cdrom/install/preseed.cfg locale=en_US keymap=us hostname=kali domain=local.lan +END diff --git a/modules/live-build-config/kali-config/common/includes.installer/preseed.cfg b/modules/live-build-config/kali-config/common/includes.installer/preseed.cfg old mode 100644 new mode 100755 index 31fffa91..71b5f496 --- a/modules/live-build-config/kali-config/common/includes.installer/preseed.cfg +++ b/modules/live-build-config/kali-config/common/includes.installer/preseed.cfg @@ -1,14 +1,15 @@ -# This file replaces preseed.cfg embedded in the initrd by -# debian-installer. It should be kept in sync except with the -# mirror/{codename,suite} dropped so that the image installs -# what's available on the CD instead of hardcoding a specific -# release. - -# Default repository information (don't include codename data, d-i figures it -# out from what's available in the ISO) +d-i debian-installer/locale string en_US.UTF-8 +d-i console-keymaps-at/keymap select us d-i mirror/country string enter information manually d-i mirror/http/hostname string http.kali.org d-i mirror/http/directory string /kali +d-i keyboard-configuration/xkb-keymap select us +d-i mirror/http/proxy string +d-i mirror/suite string kali-rolling +d-i mirror/codename string kali-rolling + +d-i clock-setup/utc boolean true +d-i time/zone string US/Mountain # Disable security, volatile and backports d-i apt-setup/services-select multiselect @@ -17,25 +18,62 @@ d-i apt-setup/services-select multiselect d-i apt-setup/non-free boolean true d-i apt-setup/contrib boolean true -# Disable CDROM entries after install -d-i apt-setup/disable-cdrom-entries boolean true - # Disable source repositories too d-i apt-setup/enable-source-repositories boolean false +# Partitioning +d-i partman-auto/method string regular +d-i partman-lvm/device_remove_lvm boolean true +d-i partman-md/device_remove_md boolean true +d-i partman-lvm/confirm boolean true +d-i partman-auto/choose_recipe select atomic +d-i partman-auto/disk string /dev/sda +d-i partman/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 +d-i partman-partitioning/confirm_write_new_label boolean true + +# Disable CDROM entries after install +d-i apt-setup/disable-cdrom-entries boolean true + # Upgrade installed packages d-i pkgsel/upgrade select full-upgrade # Change default hostname -# DISABLED: We take care of this by forking netcfg until #719101 is fixed -# d-i netcfg/get_hostname string kali -# d-i netcfg/get_hostname seen false +d-i netcfg/get_hostname string Kali +d-i netcfg/get_domain string unassigned-domain +#d-i netcfg/choose_interface select auto +d-i netcfg/choose_interface select eth0 +d-i netcfg/dhcp_timeout string 60 + +d-i hw-detect/load_firmware boolean false # Do not create a normal user account d-i passwd/make-user boolean false +d-i passwd/root-password password toor +d-i passwd/root-password-again password toor -# Enable eatmydata in kali-installer to boost speed installation -d-i preseed/early_command string anna-install eatmydata-udeb +d-i apt-setup/use_mirror boolean true +d-i grub-installer/only_debian boolean true +d-i grub-installer/with_other_os boolean false +d-i grub-installer/bootdev string /dev/sda +d-i finish-install/reboot_in_progress note # Disable popularity-contest popularity-contest popularity-contest/participate boolean false + +kismet kismet/install-setuid boolean false +kismet kismet/install-users string + +sslh sslh/inetd_or_standalone select standalone + +mysql-server-5.5 mysql-server/root_password_again password +mysql-server-5.5 mysql-server/root_password password +mysql-server-5.5 mysql-server/error_setting_password error +mysql-server-5.5 mysql-server-5.5/postrm_remove_databases boolean false +mysql-server-5.5 mysql-server-5.5/start_on_boot boolean true +mysql-server-5.5 mysql-server-5.5/nis_warning note +mysql-server-5.5 mysql-server-5.5/really_downgrade boolean false +mysql-server-5.5 mysql-server/password_mismatch error +mysql-server-5.5 mysql-server/no_upgrade_when_using_ndb error diff --git a/modules/parrot-build/templates/common/includes.installer/preseed.cfg b/modules/parrot-build/templates/common/includes.installer/preseed.cfg index b12f0239..0253bfba 100644 --- a/modules/parrot-build/templates/common/includes.installer/preseed.cfg +++ b/modules/parrot-build/templates/common/includes.installer/preseed.cfg @@ -1,3 +1,11 @@ +d-i debian-installer/locale string en_US.UTF-8 +d-i console-keymaps-at/keymap select us +d-i mirror/country string enter information manually +d-i keyboard-configuration/xkb-keymap select us + +d-i clock-setup/utc boolean true +d-i time/zone string US/Mountain + # Disable volatile and security d-i apt-setup/services-select multiselect @@ -30,6 +38,19 @@ d-i apt-setup/use_mirror boolean false # Disable CDROM entries after install d-i apt-setup/disable-cdrom-entries boolean true +# Partitioning +d-i partman-auto/method string regular +d-i partman-lvm/device_remove_lvm boolean true +d-i partman-md/device_remove_md boolean true +d-i partman-lvm/confirm boolean true +d-i partman-auto/choose_recipe select atomic +d-i partman-auto/disk string /dev/sda +d-i partman/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 +d-i partman-partitioning/confirm_write_new_label boolean true + # Packages #d-i pkgsel/upgrade select full-upgrade # install Parrot Security @@ -42,9 +63,11 @@ d-i netcfg/get_hostname string parrot # d-i netcfg/get_hostname seen false # user creation -d-i passwd/root-login boolean false -d-i passwd/make-user boolean true -d-i passwd/user-default-groups string audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth debian-tor sudo libvirt fuse dialout +d-i passwd/root-login boolean true +d-i passwd/make-user boolean false +d-i passwd/root-password password toor +d-i passwd/root-password-again password toor +#d-i passwd/user-default-groups string audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth debian-tor sudo libvirt fuse dialout # Use the following option to add additional boot parameters for the # installed system (if supported by the bootloader installer). @@ -63,7 +86,10 @@ d-i anna/choose_modules seen false # When disk encryption is enabled, skip wiping the partitions beforehand. d-i partman-auto-crypto/erase_disks boolean false - +d-i grub-installer/only_debian boolean true +d-i grub-installer/with_other_os boolean false +d-i grub-installer/bootdev string /dev/sda +d-i finish-install/reboot_in_progress note # Skip the exit timeout #d-i di-utils-reboot/really_reboot boolean false diff --git a/modules/parrot-build/templates/common/includes.installer/preseed.cfg.kali b/modules/parrot-build/templates/common/includes.installer/preseed.cfg.kali new file mode 100755 index 00000000..71b5f496 --- /dev/null +++ b/modules/parrot-build/templates/common/includes.installer/preseed.cfg.kali @@ -0,0 +1,79 @@ +d-i debian-installer/locale string en_US.UTF-8 +d-i console-keymaps-at/keymap select us +d-i mirror/country string enter information manually +d-i mirror/http/hostname string http.kali.org +d-i mirror/http/directory string /kali +d-i keyboard-configuration/xkb-keymap select us +d-i mirror/http/proxy string +d-i mirror/suite string kali-rolling +d-i mirror/codename string kali-rolling + +d-i clock-setup/utc boolean true +d-i time/zone string US/Mountain + +# Disable security, volatile and backports +d-i apt-setup/services-select multiselect + +# Enable contrib and non-free +d-i apt-setup/non-free boolean true +d-i apt-setup/contrib boolean true + +# Disable source repositories too +d-i apt-setup/enable-source-repositories boolean false + +# Partitioning +d-i partman-auto/method string regular +d-i partman-lvm/device_remove_lvm boolean true +d-i partman-md/device_remove_md boolean true +d-i partman-lvm/confirm boolean true +d-i partman-auto/choose_recipe select atomic +d-i partman-auto/disk string /dev/sda +d-i partman/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 +d-i partman-partitioning/confirm_write_new_label boolean true + +# Disable CDROM entries after install +d-i apt-setup/disable-cdrom-entries boolean true + +# Upgrade installed packages +d-i pkgsel/upgrade select full-upgrade + +# Change default hostname +d-i netcfg/get_hostname string Kali +d-i netcfg/get_domain string unassigned-domain +#d-i netcfg/choose_interface select auto +d-i netcfg/choose_interface select eth0 +d-i netcfg/dhcp_timeout string 60 + +d-i hw-detect/load_firmware boolean false + +# Do not create a normal user account +d-i passwd/make-user boolean false +d-i passwd/root-password password toor +d-i passwd/root-password-again password toor + +d-i apt-setup/use_mirror boolean true +d-i grub-installer/only_debian boolean true +d-i grub-installer/with_other_os boolean false +d-i grub-installer/bootdev string /dev/sda +d-i finish-install/reboot_in_progress note + +# Disable popularity-contest +popularity-contest popularity-contest/participate boolean false + +kismet kismet/install-setuid boolean false +kismet kismet/install-users string + +sslh sslh/inetd_or_standalone select standalone + +mysql-server-5.5 mysql-server/root_password_again password +mysql-server-5.5 mysql-server/root_password password +mysql-server-5.5 mysql-server/error_setting_password error +mysql-server-5.5 mysql-server-5.5/postrm_remove_databases boolean false +mysql-server-5.5 mysql-server-5.5/start_on_boot boolean true +mysql-server-5.5 mysql-server-5.5/nis_warning note +mysql-server-5.5 mysql-server-5.5/really_downgrade boolean false +mysql-server-5.5 mysql-server/password_mismatch error +mysql-server-5.5 mysql-server/no_upgrade_when_using_ndb error diff --git a/modules/parrot-build/templates/common/includes.installer/preseed.cfg.orig b/modules/parrot-build/templates/common/includes.installer/preseed.cfg.orig new file mode 100644 index 00000000..b12f0239 --- /dev/null +++ b/modules/parrot-build/templates/common/includes.installer/preseed.cfg.orig @@ -0,0 +1,76 @@ +# Disable volatile and security +d-i apt-setup/services-select multiselect + +# Enable contrib and non-free +d-i apt-setup/non-free boolean true +d-i apt-setup/contrib boolean true + +# Disable CDROM entries after install +d-i apt-setup/disable-cdrom-entries boolean true + +### Network configuration +# Disable network configuration entirely. This is useful for cdrom +# installations on non-networked devices where the network questions, +# warning and long timeouts are a nuisance. +d-i netcfg/enable boolean false + +# If non-free firmware is needed for the network or other hardware, you can +# configure the installer to always try to load it, without prompting. Or +# change to false to disable asking. +d-i hw-detect/load_firmware boolean false + + +# If you prefer to configure the network manually, uncomment this line and +# the static network configuration below. +d-i netcfg/disable_dhcp boolean true + +#disabling mirrors selection +d-i apt-setup/use_mirror boolean false + +# Disable CDROM entries after install +d-i apt-setup/disable-cdrom-entries boolean true + +# Packages +#d-i pkgsel/upgrade select full-upgrade +# install Parrot Security +#d-i pkgsel/include string parrot-core parrot-interface parrot-tools +# install Parrot Cloud +#d-i pkgsel/include string parrot-core parrot-cloud parrot-tools-cloud + +# Change default hostname +d-i netcfg/get_hostname string parrot +# d-i netcfg/get_hostname seen false + +# user creation +d-i passwd/root-login boolean false +d-i passwd/make-user boolean true +d-i passwd/user-default-groups string audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth debian-tor sudo libvirt fuse dialout + +# Use the following option to add additional boot parameters for the +# installed system (if supported by the bootloader installer). +# Note: options passed to the installer will be added automatically. +#d-i debian-installer/add-kernel-opts string noautomount nouveau.blacklist=1 splash + +# Disable popularity-contest +popularity-contest popularity-contest/participate boolean false + +# Select udeb for installation to allow exiting the installer +d-i anna/choose_modules string di-utils-exit-installer + +# Ask question regardless from that it's preseeded above +d-i anna/choose_modules seen false + +# When disk encryption is enabled, skip wiping the partitions beforehand. +d-i partman-auto-crypto/erase_disks boolean false + + + +# Skip the exit timeout +#d-i di-utils-reboot/really_reboot boolean false +#d-i finish-install/reboot_in_progress note + + + +#### Advanced options +### Running custom commands during the installation +#d-i preseed/late_command string in-target "rm /root/Desktop/debian-installer-launcher.desktop" diff --git a/runme.sh b/runme.sh index 92b06988..d4913046 100755 --- a/runme.sh +++ b/runme.sh @@ -73,8 +73,6 @@ Kali) mkdir ./build/live-build-config/kali-config/variant-$DESKTOP/packages.chroot cp ./debs/*.deb build/live-build-config/kali-config/variant-$DESKTOP/packages.chroot/ cp -rv filesystem/* ./build/live-build-config/kali-config/common/includes.chroot/ - cp config/02-unattended-boot.binary ./build/live-build-config/kali-config/common/includes.installer/ - cp config/preseed.cfg ./build/live-build-config/kali-config/common/includes.installer/ cp config/software.list.chroot ./build/live-build-config/kali-config/variant-$DESKTOP/package-lists/ if [ $REPO != "default" ];