tftpboot/scripts
Jeremy Gardais 87c22d65dc task-ssh-server is removed (see #18). 2017-12-08 16:06:42 +01:00
..
latecommand task-ssh-server is removed (see #18). 2017-12-08 16:06:42 +01:00
.gitignore Add a archive of latecommand scripts for some users which may prefer web 2017-08-20 15:53:36 +02:00
README.md Installation of aptitude, puppet, tmux and zsh move to latecommand script (post.sh). 2017-12-06 15:38:04 +01:00
download_clonezilla.sh Remove useless quotes. 2017-02-15 10:29:26 +01:00
download_debian.sh Update script to adapt to the new Debian Stable. 2017-06-23 14:49:33 +02:00
download_diag_tools.sh Upgrade to latest Gparted version 0.27.0-1 2017-02-15 10:03:15 +01:00
download_ubuntu.sh Ubuntu: replace wily (15.10) support with artful (17.10). 2017-12-05 15:25:47 +01:00
latecommand.tar.gz Manage packages before managing logs. 2017-12-06 15:52:51 +01:00
make_debian_initrd_with_firmware.sh The laptop (latitude 7480) needs the last version of firmware-iwlwifi. 2017-12-01 14:50:31 +01:00

README.md

Scripts

  1. Description
  2. Scripts list
  3. Update

Description

Set of scripts to download and generate necessary files to allow differents GNU/Linux distributions to boot through the network.

Scripts list

download_debian.sh

The script will provide netboot installers for all Debian (>=oldStable) for both i386 and amd64:

  • Store the files to /var/lib/tftpboot (default).
  • Download Debian Linux kernel and initrd files for all Debian distributions (Stable: Stretch; Testing: Buster; oldStable: Jessie; oldoldStable: Wheezy; Unstable: Sid) and for i386 and amd64 architectures.
  • Offer an example menu file to use with a TFTP server (default_path/installer/debian/menu.cfg.example).

download_ubuntu.sh

The script will provide netboot installers for the latest LTS and latest advanced Ubuntu distribution for both i386 and amd64:

  • Store the files to /var/lib/tftpboot (default).
  • Download Ubuntu Linux kernel and initrd files for the two lasts Ubuntu distributions (LTS-16.04: Xenial; 15.10: Wily) and for i386 and amd64 architectures.
  • Make a symlink to access to the LTS (default_path/installer/ubuntu/lts) instead of it's codename.

make_debian_initrd_with_firmware.sh

The script will provide Debian's netboot installers with additionnals firmwares for all Debian (>=oldStable) for amd64 only:

  • Store the files to /var/lib/tftpboot (default).
  • Store temp files to /tmp/tmp.XXXXXXXXXX (with mktemp).
  • Download Debian's initrd files for all Debian distributions (Stable: Stretch; Testing: Buster; oldStable: Jessie; oldoldStable: Wheezy; Unstable: Sid) for amd64 architecture only.
  • Download additionnals firmwares:
    • bnx2: For Broadcom NetXtremeII network adapters.
    • linux-nonfree: For Tigon network adapters.
    • myricom: For Myricom Myri-10G Ethernet adapters (IBM server).
    • qlogic: For QLogic Infiniband, SCSI, Fibre Channel/FCoE adapters.
    • iwlwifi: Binary firmware for Intel Wireless cards
  • Extract initrd and firmwares packages to build a new initrd.

Debian late_command

Description

Some useful configurations after a Debian installation:

  • Smarter log management (mainly for rotation and old logs).
    • Move rsyslog default configuration to two files (/etc/rsyslog.conf and /etc/rsyslog.d/99syslog.conf).
    • logrotate now rotate logs to specific directories (such as /var/log/syslog.d, /var/log/mail/,…) instead of /var/log/.
    • Create these new directories.
  • Packages:
    • Add minimal packages for a working system (aptitude, tmux and zsh).
    • Remove some useless packages (nfs rpcbind,…).
    • Ensure an openssh-server is available.
  • Permit root SSH login with password (no standard user…).

Specific to Debian Stretch:

  • Add python-apt (Ansible dependencie).

Specific to Debian Jessie and older:

  • Smarter rsyslog (more directories and less files in /var/log).
    • Shorter configuration file and use more files from /etc/rsyslog.d/
    • Move log files to directory:
      • kern logs from /var/log/kern.log to /var/log/kernel/kernel.log
      • user logs from /var/log/user.log to /var/log/security/user.log
      • mail logs from /var/log/mail.… to /var/log/mail/mail.…
      • daemon logs from /var/log/daemon.log to /var/log/syslog/daemon.log
      • auth logs from /var/log/auth.log to /var/log/security/auth.log
      • lpr logs from/var/log/lpr.log to /var/log/lpr/lpr.log
      • cron logs from /var/log/cron.log to /var/log/cron/cron.log
      • localX logs from /var/log/localX.log to /var/log/syslog/localX.log
      • syslog logs from /var/log/syslog.log to /var/log/syslog/syslog.log
      • authpriv logs from … to /var/log/security/authpriv.log
  • Add puppet package.

How-to use it

  • First, make an archive of the script and directories:
cd scripts/ ;
tar czvf latecommand.tar.gz latecommand/
  • Then, it can be use at the end of a Debian preseed file:
d-i preseed/late_command string in-target /usr/bin/tftp ${IP.SRV.TFTP} -c get ${PATH/TO/TFTPD/ROOT}/scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh

download_diag_tools.sh

download_clonezilla.sh

  • Download PXE files for Clonezilla live from OSDN. A Sourceforge repository is also available but…; see the Clonezilla download page for more informations.
  • Download for both amd64 and i686.
  • Make a example configuration file.
  • More informations on the Clonezilla website.

Update

The netboot's installers, at least for Debian, need to be update after each point realease. Just think about it if you got any issue during any installation from PXE.

  • Debian: sudo ./scripts/download_debian.sh
  • Debian's initrd with additionnals firmwares: sudo ./scripts/make_debian_initrd_with_firmware.sh
  • Ubuntu: sudo ./scripts/download_ubuntu.sh

Some tools depends of a static version in their script. So this is the list i check to got their new version: