Skip to content

Instantly share code, notes, and snippets.

@constrict0r
Last active February 22, 2022 07:59
Show Gist options
  • Save constrict0r/eb63809b2d7acf099d8d9962f3c22d4a to your computer and use it in GitHub Desktop.
Save constrict0r/eb63809b2d7acf099d8d9962f3c22d4a to your computer and use it in GitHub Desktop.
Preseed late command
# Post install script.
# Execute kick.sh to setup the system.
d-i preseed/late_command string \
wget https://raw.githubusercontent.com/constrict0r/kick/master/kick.sh -O /target/usr/local/sbin/kick.sh; \
chmod +x /target/usr/local/sbin/kick.sh; \
cp /custom-config.yml /target/usr/local/sbin/custom-config.yml &>/dev/null; \
sed -i '/^\ *deb\ cdrom/s/^\(.*\)$/#\1/' /target/etc/apt/sources.list; \
mkdir /dev/shm; \
mount --bind /dev/pts /target/dev/pts; \
mount --bind /dev/shm /target/dev/shm; \
chroot /target mount -t proc proc /proc; \
chroot mount --rbind /sys sys/; \
chroot mount --rbind /dev dev/; \
chroot /target /bin/bash /usr/local/sbin/kick.sh -u {{ username }} {{ desktop_parameters }} {{ custom_parameters }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment