2016-07-04 17:06:00 +02:00
# Scripts
1. [Description ](#description )
2016-07-21 16:33:03 +02:00
2. [Scripts list ](#scripts-list )
* [Download Debian ](#download_debiansh )
2016-07-26 14:50:17 +02:00
* [Download Ubuntu ](#download_ubuntush )
2016-07-21 16:33:03 +02:00
* [Make Debian Initrd with Firmware ](#make_debian_initrd_with_firmwaresh )
* [Debian late_command ](#debian-late_command )
2016-07-26 17:14:22 +02:00
* [Download diag tools ](#download_diag_toolssh )
* [Download Clonezilla ](#download_clonezillash )
2017-02-15 10:15:55 +01:00
3. [Update ](#update )
2016-07-04 17:06:00 +02:00
## 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
2016-07-29 12:15:03 +02:00
The script will provide netboot installers for all Debian (>=oldStable) for both **i386** and **amd64** :
2018-02-14 10:58:02 +01:00
* Store the files to ** /srv/tftp** (default).
2021-05-03 09:17:01 +02:00
* Download Debian Linux kernel and initrd files for all Debian distributions (Stable : **Stretch** ; Testing : **Buster** ; oldStable : **Jessie** ; Unstable : **Sid** ) and for **i386** and **amd64** architectures.
2016-07-06 14:51:38 +02:00
* Offer an example menu file to use with a TFTP server (default_path/installer/debian/menu.cfg.example).
2016-07-04 17:06:00 +02:00
### download_ubuntu.sh
2016-07-06 15:10:21 +02:00
The script will provide netboot installers for the latest LTS and latest advanced Ubuntu distribution for both **i386** and **amd64** :
2018-02-14 10:58:02 +01:00
* Store the files to ** /srv/tftp** (default).
2016-07-20 12:02:56 +02:00
* 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.
2016-07-06 14:51:38 +02:00
* Make a symlink to access to the LTS (default_path/installer/ubuntu/lts) instead of it's codename.
2016-07-04 17:06:00 +02:00
### make_debian_initrd_with_firmware.sh
2016-07-29 12:15:03 +02:00
The script will provide Debian's netboot installers with **additionnals firmwares** for all Debian (>=oldStable) for **amd64** only :
2018-02-14 10:58:02 +01:00
* Store the files to ** /srv/tftp** (default).
2016-07-27 14:09:20 +02:00
* Store temp files to ** /tmp/tmp.XXXXXXXXXX** (with `mktemp` ).
2021-05-03 09:17:01 +02:00
* Download Debian's initrd files for all Debian distributions (Stable : **Stretch** ; Testing : **Buster** ; oldStable : **Jessie** ; Unstable : **Sid** ) for **amd64** architecture only.
2016-07-06 15:10:21 +02:00
* Download additionnals firmwares :
2016-07-20 12:02:56 +02:00
* **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.
2017-12-01 14:17:25 +01:00
* **iwlwifi** : Binary firmware for Intel Wireless cards
2016-07-06 15:10:21 +02:00
* Extract initrd and firmwares packages to build a new initrd.
2016-07-11 16:44:26 +02:00
2016-07-21 16:33:03 +02:00
### Debian late_command
2016-07-11 16:44:26 +02:00
#### Description
Some useful configurations after a Debian installation :
2017-09-06 12:04:23 +02:00
* 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.
2017-12-06 15:31:20 +01:00
* Packages :
* Add minimal packages for a working system (aptitude, tmux and zsh).
* Remove some useless packages (nfs rpcbind,…).
* Ensure an openssh-server is available.
2017-09-06 12:04:23 +02:00
* Permit root SSH login with password (no standard user…).
* …
2017-12-06 15:31:20 +01:00
Specific to Debian Stretch :
* Add python-apt (Ansible dependencie).
2017-09-06 12:04:23 +02:00
Specific to Debian Jessie and older :
2016-07-11 16:44:26 +02:00
* Smarter rsyslog (more directories and less files in ** /var/log**).
2016-07-11 16:50:29 +02:00
* 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__
2016-07-20 12:02:56 +02:00
* _lpr_ logs from/var/log/lpr.log to __ /var/log/lpr/lpr.log__
2016-07-11 16:50:29 +02:00
* _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__
2017-12-06 15:31:20 +01:00
* Add puppet package.
2016-07-11 16:44:26 +02:00
#### How-to use it
* First, make an archive of the script and directories :
```
2016-07-25 10:52:52 +02:00
cd scripts/ ;
tar czvf latecommand.tar.gz latecommand/
2016-07-11 16:44:26 +02:00
```
* Then, it can be use at the end of a Debian preseed file :
```
2017-12-06 15:31:20 +01:00
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 ; \
2016-07-25 10:52:52 +02:00
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
2016-07-11 16:44:26 +02:00
in-target /bin/sh /tmp/latecommand/post.sh
```
2016-07-27 14:09:20 +02:00
2016-07-26 17:14:22 +02:00
### download_diag_tools.sh
2016-07-27 14:09:20 +02:00
- The script will download some diagnostic tools :
2016-07-26 17:14:22 +02:00
* memtest86 from [memtest86's official website][memtest official website].
2016-07-27 14:09:20 +02:00
* GParted Live from the [sourceforge's repository][gparted sourceforge] for both amd64 and i686. See the [official documentation][gparted pxe] for more informations.
- Provide an example of configuration file.
2016-07-26 17:14:22 +02:00
### download_clonezilla.sh
* Download PXE files for Clonezilla live from [OSDN][OSDN url]. A Sourceforge repository is also available but…; see the [Clonezilla download page][clonezilla download] for more informations.
* Download for both **amd64** and **i686** .
* Make a example configuration file.
* More informations on the [Clonezilla website][clonezilla via pxe server].
2016-07-11 16:44:26 +02:00
2017-02-15 10:15:55 +01:00
## Update
2017-02-15 11:06:45 +01:00
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.
2017-06-23 14:49:33 +02:00
* 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`
2017-02-15 11:06:45 +01:00
2017-02-15 10:15:55 +01:00
Some tools depends of a static version in their script. So this is the list i check to got their new version :
* [Clonezilla download page][clonezilla download]
* [Gparted sourceforge's repository][gparted sourceforge]
* [Memtest86's official website][memtest official website] (quite useless, last update was ~3 years ago ^^)
2016-07-26 15:34:30 +02:00
[memtest official website]: http://www.memtest.org/#downiso "Memtest86+ download"
2016-07-26 17:14:22 +02:00
[OSDN url]: https://osdn.jp/projects/clonezilla/
2016-07-27 14:09:20 +02:00
[gparted sourceforge]: https://sourceforge.net/projects/gparted/files/gparted-live-stable/ "Gparted on sourceforge"
[gparted pxe]: http://gparted.org/livepxe.php "GParted Live on PXE Server"
[clonezilla download]: http://clonezilla.org/downloads/download.php?branch=stable
2016-07-26 17:14:22 +02:00
[clonezilla via pxe server]: http://clonezilla.org/livepxe.php "Clonezilla Live on PXE server"