Debian preseeding: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
Line 56: Line 56:
http://bellman.wildsong.biz/d-i/jessie/./preseed.cfg and off it goes!  You get one more prompt hit enter to get the default "American English".
http://bellman.wildsong.biz/d-i/jessie/./preseed.cfg and off it goes!  You get one more prompt hit enter to get the default "American English".


The base operating system plus whatever I chose in jessie.cfg will now be installed. Come back in a few minutes
The base operating system plus whatever I chose in jessie.cfg will now be installed.  
and there should be a login prompt on the console. At this point you can use Ansible to complete the server provisioning.
At completion the server powers down. Start it up and tell it to boot from the hard drive.
At this point you have a working server and you can use Ansible to complete the server provisioning.

Revision as of 21:44, 24 March 2016

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

Who cares about this when we have PXE boot. Use it. Next section. Skip this.

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'


This should get you to a Debian installer menu on the target machine's screen.

Select "Advanced options" and then "Automated Install". (There is a short pause here as the required files are downloaded and executed...) When it asks for a URL enter bellman. The installer will expand that to http://bellman.wildsong.biz/d-i/jessie/./preseed.cfg and off it goes! You get one more prompt hit enter to get the default "American English".

The base operating system plus whatever I chose in jessie.cfg will now be installed. At completion the server powers down. Start it up and tell it to boot from the hard drive. At this point you have a working server and you can use Ansible to complete the server provisioning.