Scripts (download initrd, Linux kernels,…) and configurations files (PXE, preseed,…) for PXE server
Go to file
Jeremy Gardais 5bd59c2f05 Increase minimum size for LVM partition for cluster nodes. 2016-11-30 17:02:56 +01:00
config Correct the preseed path 2016-11-23 15:05:00 +01:00
preseed/debian Increase minimum size for LVM partition for cluster nodes. 2016-11-30 17:02:56 +01:00
pxelinux.cfg First commit. 2014-09-08 09:49:55 +02:00
scripts Ensure to use the NEW IP address ! 2016-09-20 12:13:32 +02:00
.gitignore Ignore installer directory 2016-07-20 12:09:21 +02:00
CHANGELOG.md Ensure to use the NEW IP address ! 2016-09-20 12:13:32 +02:00
README.md Add a new entry for cluster node with Debian Wheezy 2016-11-23 11:58:36 +01:00
chain.c32 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00
gpxelinux.0 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00
ldlinux.c32 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00
libcom32.c32 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00
libutil.c32 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00
menu.c32 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00
pxelinux.0 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00
reboot.c32 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00
vesamenu.c32 Upgrade pxe files from Debian Jessie packages 2016-07-26 14:35:26 +02:00

README.md

tftpboot

  1. Overview
  2. Description
  3. How to use it
  4. TODO

Overview

All needed files to set up a PXE server.

Description

PXE files

Use some bootloaders files provide by:

  • pxelinux debian package:
    • gpxelinux.0
    • pxelinux.0
  • syslinux-common debian package:
    • chain.c32
    • ldlinux.c32
    • libcom32.c32
    • libutil.c32
    • menu.c32
    • reboot.c32
    • vesamenu.c32

To get those files from the packages of your repositories:

mkdir -p temp_pxe_files
cd temp_pxe_files
aptitude download pxelinux syslinux-common
ar p pxelinux*.deb data.tar.xz | tar xJ -C . --strip-components=4 ./usr/lib/PXELINUX/{g,}pxelinux.0
ar p syslinux-common*.deb data.tar.xz | tar xJ -C . --strip-components=6 ./usr/lib/syslinux/modules/bios/{chain,ldlinux,libcom32,libutil,menu,reboot,vesamenu}.c32

The MD5 checksum can mismatch between the files from this repo and those from Debian's packages.

Configuration files

Contains the files which defines the PXE menu. The first one will:

  • Call all others menu.cfg from subdirectories (debian/, clonezilla/,…) as an entry.
  • Define a timeout (4 seconds).
  • Define the default entry (boot on local first disk).

config/debian/menu.cfg

  1. Provide PXE entries for:
  • Debian Jessie (Stable) amd64.
  • Debian Jessie (Stable) amd64 with additionnals firmwares (see make_debian_initrd_with_firmware.sh script).
  • Debian Jessie (Stable) amd64 with additionnals firmwares and preseed file.
  • Debian Jessie (Stable) amd64 for minions with preseed (Mate as default GUI).
  • Debian Jessie (Stable) amd64 for minions with preseed (Cinnamon as default GUI).
  • Debian Jessie (Stable) amd64 for minions with preseed (Gnome 3 as default GUI).
  • Debian Jessie (Stable) i386.
  • Debian Stretch (Testing) amd64 with additionnals firmwares (see make_debian_initrd_with_firmware.sh script).
  • Debian Stretch (Testing) amd64 with additionnals firmwares and preseed file.
  • Debian Stretch (Testing) amd64 for minions with preseed (Mate as default GUI).
  • Debian Stretch (Testing) amd64 for minions with preseed (Cinnamon as default GUI).
  • Debian Stretch (Testing) amd64 for minions with preseed (Gnome 3 as default GUI).
  • Debian Stretch (Testing) i386.
  • Debian Wheezy (oldStable) amd64 with additionnals firmwares (see make_debian_initrd_with_firmware.sh script).
  • Debian Wheezy (oldStable) amd64 with additionnals firmwares and preseed file.
  • Debian Wheezy (oldStable) amd64 with additionnals firmwares and preseed file for Cluster node.
  • Debian Wheezy (oldStable) amd64 with preseed (Gnome 3 as default GUI).
  • Debian Wheezy (oldStable) i386.
  • Debian Sid (unstable) amd64.
  • Debian Sid (unstable) amd64 with additionnals firmwares (see make_debian_initrd_with_firmware.sh script).
  • Debian Sid (unstable) i386.
  1. If you want to use with your own TFTPD server, you need te set your IP server! Replace all occurrences of 129.20.203.27 by the IP of your TFTPD server to be able to load the preseed files!

config/ubuntu/menu.cfg

Provide PXE entries for:

  • Ubuntu LTS (16.04) amd64.
  • Ubuntu LTS (16.04) i386.
  • Latest non-LTS Ubuntu (15.10) amd64.
  • Latest non-LTS Ubuntu (15.10) i386.

Preseed

A preseed file can be loaded by the Debian-Installer to answer all questions Preseeding provides a way to set answers to questions asked by the Debian-Installer, without having to manually enter the answers. This makes it possible to fully automate most types of installation and even offers some features not available during normal installations. More informations on Debian wiki.

Commons configurations

  • Localization:
    • Language: English
    • Country: France
    • Locale: en_US.UTF-8 (US English)
    • Keyboard: fr-latin9 (French)
  • Hardware:
    • Network configuration (IP, hostname, domain): automatic (from DHCP server)
    • Load additionnals firmwares if availables.
  • Account:
    • Create a root account.
    • root password: SHA-256 hash of the password
    • Don't create a normal user (be sure to allow remote connection for root! See late_command info).
  • Timezone
    • Timezone: Europe/Paris
    • NTP server: ntp.univ-rennes1.fr
  • Partitionning
    • Use the entire first disk (sda or vda aka virtual hdd) with LVM.
    • Purge all LVM, RAID,… partitions or informations already set on the first disk.
    • Partitionning:
Device Mount point Size (Min - Max) Description
/dev/sda1 /boot 200 - 250 Mb Bootloader (Grub)
/dev/sda2 LVM 16 Gb - 100% Physical Volume for LVM
lv_root / 1 - 2 Gb Root partition
lv_usr /usr 4 - 10 Gb Non-essential system resources (binaries, libraries, documentations,…)
lv_var /var 4 - 8 Gb Variable files (databases, cache, log,…)
lv_tmp /tmp 1 - 2 Gb Temporary files cleaned between system reboots
lv_home /home 2 - 3 Gb User's home directories (saved files, personnal settings,…)
lv_srv /srv 512 MB - 2 Gb Specific datas for this system
lv_opt /opt 512 MB - 4 Gb Optional application
lv_swap SWAP 512 Mb - 100% RAM size Swap sapce
lv_free /mnt/free free space See below
  • APT:
    • Installation from internet (repository: ftp.fr.debian.org)
    • Add a repository for Puppet (http://apt.puppetlabs.com) and the GPG key.
    • Select ssh-server and standard in tasksel for installation.
    • Add additionnals packages: tmux, puppet, zsh and tftp-hpa (to be able to download the latecommand archive from the PXE server).
  • Bootloader:
    • Install Grub on the MBR of the first disk.
  • late_command
    • Define ZSH as the default shell.
    • Permit root login via SSH with it's password.
    • Download and extract a latecommand archive from this repository.
    • Run the script from this archive.

lv_free - /mnt/free
The preseed's partitionning need to allocate all the disk space. If it's not define, it will put it in the last defined partition all extra free space. So lv_free is a temporary LV that you can destroy and use the space to resize any other LV.

Specific configurations

  • You can choose a desktop environment:
    • Debian Stable (aka Jessie): Cinnamon, Mate or Gnome3
    • Debian oldStable (aka Wheezy): Gnome3
  • Partitionning differences for Debian with a desktop environment:
Device Mount point Size (Min - Max) Description
lv_root / 1 - 3 Gb root partition
lv_home /home 2 - 10 Gb User's home directories (saved files, personnal settings,…)
lv_srv NOT PRESENT NOT PRESENT

Informations

  • You can use the command: mkpasswd -m sha-512 to generate a SHA-512 hash for a password.

Scripts

See the scripts's README.md file for more informations.

How to use it

  • Put the data of this repository on the PXE server:
    • Clone the repository with https URL or with SSH to /var/lib/tftpboot.
    • Download the last archive: wget https://git.ipr.univ-rennes1.fr/cellinfo/tftpboot/archive/master.tar.gz
  • Install a TFTP server (tftpd-hpa package for Debian's based systems or tftp-server for Redhat's based systems).
    • Start the tftpd's service:
      • sudo service tftpd-hpa start
      • sudo systemctl start tftpd-hpa
    • You can test if the TFTP server provide the files with a TFTP client (tftp-hpa) by downloading a file with the command: tftp $IP.SRV.TFTP -c get README.md /tmp/README.md_from_tftpd_server
  • Set your IP in some files instead of the default one 129.20.203.27:
    • In configurations files to be able to call Debian's Preseed files or download squashfs filesystem (for Clonezilla, GParted,…): sudo find config/ -iname "*.cfg" -type f -exec sed -i "s/129.20.203.27/111.222.333.444/g" {} \;
    • In Preseed files, to be able to download the late_command archive from your TFTPD server: sudo find preseed/ -type f -exec sed -i "s/129.20.203.27/111.222.333.444/g" {} \;
    • In scripts to generate examples configuration files with the right IP address: sudo find scripts/ -iname "*.sh" -type f -exec sed -i "s/129.20.203.27/111.222.333.444/g" {} \;
  • Run scripts to download needed PXE files (see the scripts's README.md for more informations):
    • 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
    • Diagnostic tools (Memtest86+, GParted Live,…): sudo ./scripts/download_diag_tools.sh
    • Clonezilla: sudo ./scripts/download_clonezilla.sh
    • Generate the late_command archive: cd scripts/ ; sudo tar czvf latecommand.tar.gz latecommand/

TODO

  • Add a tiny preseed file that could be loaded for a manual install.
  • Download the latecommand archive from this repository instead of the TFTPD server?
  • Add new tools #3