Slackware 已經在 13.37 版的安裝程式加入了 PXE 伺服器。 它的目的是提供一種簡單的方法,只要你有一台備用電腦與網絡卡(不是無線網卡!)這篇文章描述使用內建的PXE伺服器來進行 Slackware 網路安裝的程序,這裏使用Slackware的13.37 當作一個例子(但它之後的版本一樣可以使用):
一個 Slackware DVD 或 可開機的 USB 姆指碟包含了 完整的軟體安裝包的所有集合 。 一個 net-boot “mini-ISO” 或一個可開機的 CDROM 是不足夠的,因為它們沒有包含所有的 Slackware 軟體安裝包。 在安裝程式中的 PXE 伺服器無法使用一個外部的軟體安裝包來源 - 所有的軟體安裝包必需存在於開機媒體裏。
usbimg2disk.sh
” script which you will find in the Slackware release's “usb-and-pxe-installers/
” directory
The “pxesetup” script will load a main dialog which is modeled after the Slackware setup:
There are four relevant main selections (apart from EXIT
which will drop you back to the prompt): HELP
, NETWORK
, SOURCE
and ACTIVATE
. An explanation for these choices follows from the screenshots below, and you will see that there is surprisingly little for you to configure… it is very user-friendly.
Use the NETWORK
and SOURCE
sections of the main menu to configure your PXE server.
SOURCE
section uses the exact same dialog screens as you know from the Slackware installer. The only correct selection is “Use a Slackware DVD
” (There is one exception which I will explain in more detail all the way down, and that is when you used the “usbimg2disk.sh
” script to create a complete Slackware installer on a bootable USB stick): dnsmasq
” program which provides most of the netboot functionality. The first screenshot is the case where your network provides a DHCP server, while the second screenshot shows the situation where the Slackware PXE server has started its own internal DHCP server: ACTIVATE
entry.There is no fun with a PXE server if you do not have PXE clients that use it to boot from so that you can install Slackware on them! Make sure that the computer that you want to install Slackware on is connected to the network with a cable, and power it up. In the BIOS (or using whatever method is available for that machine) select “LAN boot” and watch what happens when the computer boots. You will see a prompt that says:
Press [F8] for a boot menu…
Actually pressing the F8 key gives you two choices: continue with netbooting, or fallback to boot-up from the local hard disk. Or if you don’t do anything at all (takes 2 seconds only) your network card will start looking for a PXE server and the communication starts. This can be witnessed on the PXE server’s screen:
What happens next should all look pretty familiar: the Slackware welcome screen will appear and you can either press ENTER for the default kernel or make your own choice of parameters. The noteworthy part is where you get to select the package SOURCE
. There is only one working option, and that is “Install from FTP/HTTP server
“. After selecting this option, your computer’s network card will be configured using DHCP, and then you will notice that the questions for “URL of the ftp or http server where the Slackware sources are stored
” and “What is the Slackware source directory?
” have default values already filled-in! You should accept these values, since they are supplied by the PXE server!
The remaining steps should be familiar if you have ever tried installing from a HTTP server before.
The “usbimg2disk.sh
” script which you find in the “usb-and-pxe-installers/
” directory on the DVD or any Slackware mirror, contains some functionality for making it easier to run the PXE server off the USB stick.
You need to create a full USB installer for this to work (“full” meaning that the USB stick is made bootable and all Slackware packages are copied to the stick).
If you boot this USB installer, the vfat partition on the USB stick (which contains the Slackware packages) will be automatically mounted on the installer's directory “/usbinstall
”.
If you run “pxesetup
” (or even if you run the normal “setup
” by the way) and get to the point of selecting the package location in the SOURCE
menu, you must pick option “3: Use a pre-mounted directory
“. Actually, that item will be the default choice! When you select that option, you will notice that a value for that directory name has already been filled in.
All you have to do is to accept that directory name and you are in business.