Debian preseeding

From Wildsong
Revision as of 21:15, 24 March 2016 by Brian Wilson (talk | contribs)
Jump to navigationJump to search

Because installs are too long and complicated.

  1. Answer all the questions and put the answers in a file.
  2. Set up DHCP so it feeds the file to the target machine when it boots.

http://hands.com/d-i/

Contents of preseed file for Jessie: http://d-i.alioth.debian.org/manual/en.i386/apbs04.html

# Depending on what software you choose to install, or if things go wrong
# during the installation process, it's possible that other questions may
# be asked. You can preseed those too, of course. To get a list of every
# possible question that could be asked during an install, do an
# installation, and then run these commands:
#   debconf-get-selections --installer > file
#   debconf-get-selections >> file

DHCP / Web set up

Set DNS to resolve "autoserver" to be my Apache server.

Put the preseed file into d-i/jesse/preseed.cfg

I also set up the server to be a Squid proxy which really speeds things up.

Booting from CD image

When the system boots, hit TAB and add this to the kernel boot line:

install keymap=skip-config locale=en_US auto url=autoserver

It's still prompting for hostname/domainname. It even does this when I pass the name on the boot line.

Everything else is good.

PXE boot

Generic instructions are here: https://wiki.debian.org/PXEBootInstall

I installed tftpd-hpa on the server and from a debian mirror, I downloaded and unpacked netboot.tar.gz into /srv/tftp. I used openwrt as the DHCP server with these lines added to /etc/config/dhcp to tell the client what TFTP server to use and what file to grab.

config 'boot'
   option 'name' 'lan'
   option 'filename' 'pxelinux.0'
   option 'servername' 'bellman'
   option 'serveraddress' '192.168.1.2'