📜 ⬆️ ⬇️

How to install Linux from a network

Just yesterday, the habrayuser Arceny told us about installing a debian with USB-flash . In the article, he mentioned the possibility of installing "With the help of network boot ( PXE boot)", so I finally decided to write material on the creation of the pxe boot server.

The narration will be conducted on the example of the same OS - Debian (so your paths and commands may differ).
For a start, we will install a tftp server. See available options ( apt-cache search tftp | fgrep server ):
At first I put tftpd-hpa, because I was told about it in the manual with which I started creating the server. Then I switched to atftpd, because I needed logging. Consider both options:
Now we have a tftp server. One step we did :)
Next - configure dhcp:
Step two is completed. Further - directly setup pxe-boot.
Go to ftp.debian.org , select the installer- * directory corresponding to the required architecture. Then go to the directory current / images / netboot inside we find the files netboot.tar.gz and gtk / netboot.tar.gz - these are text and graphic installation files, respectively. Choose the one you like, download it and unpack it in / var / lib / tftpboot .
It remains to make sure that access to the 69 UDP port is forbidden, and you can use the charms of a network installation.

As a bonus, I am attaching a menu that came out of me as a result of several days of bullying:
In the current configuration, it is possible to install multiple OSes (Debian installation is possible both in text and in graphical mode), boot xUbuntu (via nfs), SystemRescueCD (via http-boot), memtest86 (via tftp). Installation of all operating systems is possible for 2 architectures - x86 and x64. Because I have an intranet mirror of the repositories Ubuntu 8.10 and Debian 5.0, then the installers do not offer a choice of repository, but automatically merge everything from it.
Screenshots:
the start screen , after clicking the button , the distribution selection menu , the second part of the distribution selection menu , the installation of Ubuntu , Debian , Fedora , SuSE is selected .
The / var / lib / tftpboot archive (almost 200 MB), as well as the configuration files for the Ubuntu and Debian installers: they contain repositories + Ubuntu is split into Ubuntu, kUbuntu, xUbuntu, edUbuntu.
In this configuration, there is one big drawback, which I am too lazy to fix: when you open the menu, about 70 files are loaded, most of which are not needed by the user. To get rid of this - the display of the submenu needs to be transferred from the connection of the menu by inclusions to their call through the kernel vesamenu.c32 , which comes with pxeboot. Also, it doesn’t hurt to clear duplicates of menu directories - most configs for the x64 and x86 menus are the same.

Source: https://habr.com/ru/post/53276/


All Articles