Add commands to replace the IP ADDRESS

This commit is contained in:
Jeremy Gardais 2016-07-27 14:45:04 +02:00
parent 719deb4160
commit 6751b5bacd
1 changed files with 19 additions and 14 deletions

View File

@ -29,7 +29,7 @@ Use some bootloaders files provide by:
* reboot.c32 * reboot.c32
* vesamenu.c32 * vesamenu.c32
To get those files from the packages of APT repositories: To get those files from the packages of your repositories:
``` sh ``` sh
mkdir -p temp_pxe_files mkdir -p temp_pxe_files
cd temp_pxe_files cd temp_pxe_files
@ -100,7 +100,7 @@ Preseeding provides a way to set answers to questions asked by the Debian-Instal
|-----------|-------------|------------------------|------------------------------------------------------------------------| |-----------|-------------|------------------------|------------------------------------------------------------------------|
| /dev/sda1 | /boot | 200 - 250 Mb | Bootloader (Grub) | | /dev/sda1 | /boot | 200 - 250 Mb | Bootloader (Grub) |
| /dev/sda2 | LVM | 16 Gb - 100% | Physical Volume for LVM | | /dev/sda2 | LVM | 16 Gb - 100% | Physical Volume for LVM |
| lv_root | / | 1 - 2 Gb | root partition | | lv_root | / | 1 - 2 Gb | Root partition |
| lv_usr | /usr | 4 - 10 Gb | Non-essential system resources (binaries, libraries, documentations,…) | | 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_var | /var | 4 - 8 Gb | Variable files (databases, cache, log,…) |
| lv_tmp | /tmp | 1 - 2 Gb | Temporary files cleaned between system reboots | | lv_tmp | /tmp | 1 - 2 Gb | Temporary files cleaned between system reboots |
@ -120,11 +120,11 @@ Preseeding provides a way to set answers to questions asked by the Debian-Instal
* Define ZSH as the default shell. * Define ZSH as the default shell.
* Permit root login via SSH with it's password. * Permit root login via SSH with it's password.
* Download and extract a _latecommand_ archive from [this repository][debian latecommand description]. * Download and extract a _latecommand_ archive from [this repository][debian latecommand description].
* Run the script from * Run the script from this archive.
------ ------
lv_free - /mnt/free **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. : 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 #### Specific configurations
@ -148,15 +148,21 @@ See the [scripts's README.md][scripts readme.md] file for more informations.
* Clone the repository with https URL or with SSH to **/var/lib/tftpboot**. * 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` * 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). * 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: * Start the tftpd's service:
* `sudo service tftpd-hpa start` * `sudo service tftpd-hpa start`
* `sudo systemctl start tftpd-hpa` * `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: * 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`
* `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.27.239_:
* Set your IP in some files instead of the default one *129.20.27.239*: * 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.27.239/111.222.333.444/g" {} \;`
* [debian menu.cfg][debian menu.cfg] to be able to load the preseed files (**preseed/url=tftp://SRV.IP.AD.DR/**) * 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.27.239/111.222.333.444/g" {} \;`
* [Jessie preseed file][preseed jessie] to download the postinstall script from your TFTPD server (**in-target /usr/bin/tftp SRV.IP.AD.DR**) * 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.27.239/111.222.333.444/g" {} \;`
* [Wheezy preseed file][preseed wheezy] to download the postinstall script from your TFTPD server (**in-target /usr/bin/tftp SRV.IP.AD.DR**) * Run scripts to download needed PXE files (see the [scripts's README.md][scripts 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 ## TODO
* Add a tiny preseed file that could be loaded for a manual install. * Add a tiny preseed file that could be loaded for a manual install.
@ -165,7 +171,6 @@ See the [scripts's README.md][scripts readme.md] file for more informations.
[main menu.cfg]: ./config/menu.cfg [main menu.cfg]: ./config/menu.cfg
[debian menu.cfg]: ./config/debian/menu.cfg [debian menu.cfg]: ./config/debian/menu.cfg
[preseed informations]: https://wiki.debian.org/DebianInstaller/Preseed [preseed informations]: https://wiki.debian.org/DebianInstaller/Preseed