Skip to content

Instantly share code, notes, and snippets.

@tvdu29
Created December 15, 2018 13:39
Show Gist options
  • Save tvdu29/02391c57dac0b4289aa016f13aca49eb to your computer and use it in GitHub Desktop.
Save tvdu29/02391c57dac0b4289aa016f13aca49eb to your computer and use it in GitHub Desktop.
#******************************************************************************#
# #
# ::: :::::::: #
# preseed.cfg :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2018/12/15 12:46:55 by tmaze #+# #+# #
# Updated: 2018/12/15 13:24:43 by tmaze ### ########.fr #
# #
#******************************************************************************#
# FR locale/kbd map
d-i debian-installer/language fr
d-i debian-installer/country FR
d-i debian-installer/locale string fr_FR.UTF-8
d-i keyboard-configuration/xkb-keymap select us
# select and setup first network interface
d-i netcfg/choose_interface select enp0s3
d-i netcfg/disable_autoconfig boolean true
d-i netcfg/get_ipaddress string 172.127.0.130
d-i netcfg/get_netmask string 255.255.255.252
d-i netcfg/get_gateway string 172.127.0.129
d-i netcfg/get_nameservers string 172.127.0.129
d-i netcfg/confirm_static boolean true
# select and setup second network interface
d-i netcfg/choose_interface select enp0s8
d-i netcfg/disable_autoconfig boolean true
d-i netcfg/get_ipaddress string 192.168.99.2
d-i netcfg/get_netmask string 255.255.255.252
d-i netcfg/confirm_static boolean true
# set host and domain
d-i netcfg/hostname string roger-skyline-1
d-i netcfg/get_domain string unassigned-domain
# disable WEP dialogue
d-i netcfg/wireless_wep string
# use http.us.debian.org as mirror with no proxy
d-i mirror/country string manual
d-i mirror/http/hostname string ftp.fr.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
# Root password
d-i passwd/root-password-crypted password B17E1D12639B63F4710F52DA05FCCDA1279CB8F09D6D0C3B7C9C26AFEBAD4EC05449EBA831EED7FFC261BF4E452ACBCCE795EC8201EC10698FD711005B2534E4
# make a regular user
d-i passwd/make-user boolean true
d-i passwd/user-fullname string tanguy
d-i passwd/username string tanguy
d-i passwd/user-password-crypted password D1B7892B3E102C9D13E396A990CE98D4E6D37B68C7CDA59CD78F432A17EB07EB0F8688E2B8E3619B70CB4619038BD3BE1B40B68311B793F07BF132781B9334BE
d-i passwd/user-default-groups tanguy cdrom floppy sudo audio dip video plugdev netdev
# hardware clock is UTC, timezone is US/Eastern, use ntp to set clock
d-i clock-setup/utc boolean true
d-i time/zone string Europe/Paris
d-i clock-setup/ntp boolean true
# use lvm partitioning
d-i partman-auto/method string lvm
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
# make lvm the max size
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string debian
# use the following partition scheme on /dev/sda
d-i partman-auto/disk string /dev/sda
d-i partman-auto/choose_recipe select boot-lvm
# /boot 500M ext4
# swap 2G
# /tmp 2G ext4
# /var/log 4G ext4
# / 8G+ ext4
d-i partman-auto/expert_recipe string \
boot-lvm :: \
954 954 954 linux-swap \
$lvmok{ } \
lv_name{ swap } in_vg { debian } \
$primary{ } \
method{ swap } format{ } \
. \
3815 3815 3815 ext4 \
$lvmok{ } \
lv_name{ root } in_vg { debian } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
1907 1907 -1 ext4 \
$lvmok{ } \
lv_name{ home } in_vg { debian } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /home } \
. \
# remove any RAID partitioning
d-i partman-md/device_remove_md boolean true
# don't confirm anything
d-i partman-basicfilesystems/no_mount_point boolean false
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
# setup non-free and contrib repositories
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
# install standard system with ssh-server
tasksel tasksel/first multiselect standard, ssh-server
# also install the htop package
d-i pkgsel/include string emacs git sudo
# upgrade all packages
d-i pkgsel/upgrade select full-upgrade
# disable popularity contest
popularity-contest popularity-contest/participate boolean false
# force grub install to /dev/sda
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/bootdev string /dev/sda
# don't wait for confirm, just reboot when finished
d-i finish-install/reboot_in_progress note%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment