Skip to content

Instantly share code, notes, and snippets.

@rfdrake
Last active April 21, 2024 23:08
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rfdrake/7231221 to your computer and use it in GitHub Desktop.
Save rfdrake/7231221 to your computer and use it in GitHub Desktop.
Debian Wheezy raid1 preseed configuration
# This puts all files in one partition. You'll need to change proxy settings
# (USERNAME, PASSWORD, PROXYSERVER) and crypted passwords, as well as the
# get_domain string to your dns domain.
# This is not quite fully automatic. It will prompt you for hostname. If you
# want to automatically fill in the hostname you'll need to provide it in the
# kernel APPEND line by saying netcfg/get_hostname=hostname
# If you've never setup preseeding, the first step is going to be getting PXE
# netinstall working. You don't need a full CD, you just need netboot/debian-installer/amd64/linux
# and netboot/debian-installer/amd64/initrd.gz. Once you have normal netboot
# install working, just change your append line to be like the following comment,
# and then point SERVERIP to a webserver with your raid1.cfg file.
# APPEND ramdisk_size=15000 initrd=wheezy64.gz locale=en_US keyboard-configuration/xkb-keymap=us
# console-keymaps-at/keymap=us netcfg/choose_interface=auto netcfg/dhcp_timeout=60
# netcfg/get_domain=FQDN.EXAMPLE.COM url=SERVERIP/raid1.cfg
d-i console-setup/layoutcode string us
d-i netcfg/disable_dhcp boolean false
d-i netcfg/dhcp_failed note
d-i netcfg/dhcp_options select Configure network manually
d-i netcfg/wireless_wep string
d-i languagechooser/language-name-fb select English
d-i debian-installer/locale select en_US
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i netcfg/get_hostname seen true
d-i mirror/country string manual
d-i mirror/http/hostname string http.debian.net
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string http://USERNAME:PASSWORD@PROXYSERVER:3128/
#----------------------------------------------------------------------#
# Partitioning
# this only makes partman automatically partition without confirmation:
d-i partman-md/device_remove_md boolean true
d-i partman-md/confirm boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-partitionining/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman-md/confirm_nooverwrite boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman/confirm_nooverwrite boolean true
d-i mdadm/boot_degraded boolean true
#----------------------------------------------------------------------#
# Boot Loader Installation
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
# Install grub to multiple disks:
# oh look, it seems they changed the command to do this..
d-i grub-pc/install_devices multiselect /dev/sda, /dev/sdb
d-i grub-installer/bootdev string /dev/sda /dev/sdb
#----------------------------------------------------------------------#
# Partitioning
d-i partman-auto/method string raid
d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto/expert_recipe string multiraid :: \
900 10000 -1 raid $primary{ } $lvmignore{ } method{ raid } .\
96 512 200% raid $primary{ } $lvmignore{ } method{ raid } .
# specify how the previously defined partitions will be
# used in the RAID setup.
d-i partman-auto-raid/recipe string \
1 2 0 ext4 / /dev/sda1#/dev/sdb1 . \
1 2 0 swap - /dev/sda2#/dev/sdb2 .
d-i passwd/root-password-crypted password <CRYPTED PASSWORD GOES HERE>
d-i passwd/user-fullname string User Account
d-i passwd/username string useraccount
d-i passwd/user-password-crypted password <CRYPTED PASSWORD GOES HERE>
d-i passwd/user-default-groups string dialout cdrom floppy sudo audio video plugdev
d-i popularity-contest/participate boolean false
tasksel tasksel/first multiselect none
d-i pkgsel/include string ssh snmpd vim sudo rsync sysstat ntp ntpdate resolvconf puppet
d-i tzconfig/gmt boolean false
d-i time/zone string US/Eastern
d-i clock-setup/utc boolean true
d-i grub-installer/with_other_os boolean true
d-i grub-installer/only_debian boolean true
d-i grub-installer/password string
#----------------------------------------------------------------------#
# Finish up the installation
d-i finish-install/keep-consoles boolean true
d-i finish-install/reboot_in_progress note
# workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666974
d-i preseed/late_command string chroot /target grub-install /dev/sdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment