Você está na página 1de 5

MONTAR THINCLIENT CON WDS 2008 (arranque PXE)

Antes de empezar:
Yo acabo de hacerlo as, pero con los archivos que utilizamos para arranque PXE desde
TFTP, en lugar de los propuestos desde la imagen de SYSLINUX para descargar.
Seguir texto marcado. Y en lugar de montar el sistema de carpetas
(RemoteInstall\Boot\x86\knl y RemoteInstall\Boot\x86\img\) dejar los archivos de estos
pasos en el raz de ".\RemoteInstall\Boot\x86".

Today I decided to setup automated installations for Linux distros (RHEL, Fedora,
CentOS), similar to how we deploy our Windows installations via PXE. Since
we already had WDS running for installing Windows, it was just a matter of
reconfiguring WDS, setting up the necessary structure and kickstart files for our
automated Linux installations. While I do not cover the initial WDS installation
process, I will attempt to go over the steps performed after the basic WDS install (native
or mixed).
What you will need:
Windows server running WDS (and working via DHCP).
A recent copy of SYSLINUX (extracted to a folder somewhere on the WDS
server).
An HTTP or anonymous FTP server to hold your installation media.
Currently when I boot my computer with PXE enabled, I am prompted to hit F12 for
network boot. When I press F12, I am prompted by Windows Boot Manager to select
my boot images that I setup in WDS. Since I cant install Linux images directly using
the WDS interface, an alternative boot image is necessary. That is where
SYSLINUX/PXELINUX takes over.
Pre-Setup
Create the necessary directory structure inside the WDS RemoteInstall directory
(this was specified during the WDS installation).
o Inside the x86 folder (RemoteInstall\Boot\x86\), create the following
folders (including pxelinux.cfg):
conf
img
knl
pxelinux.cfg
Preparing Installation Media
Setup an FTP server to hold your installation media (HTTP works also):
Currently the average size of a Red Hat distribution is about 5GB, so make sure
the server you select will have the necessary disk space. You will need separate
installation media for both distribution specific 32bit and 64bit installs. If you
want Fedora 9, CentOS 5.2, and RHEL 5.2 images (both 32bit and 64bit), that
will be about 30GB. As long as youre not archiving old distributions, this
should not be an issue.
o On my FTP server in the root/path, I created a directory for each of my
installation media. Also, creating a standard naming convention will
help with editing the configuration files later and any case sensitivity
issues. Example: My directory names are DistroVersion_arc
(Fedora9_32bit), as you will see later on.
o Copy the entire installation dvd media to the corresponding directories
you created (not the .iso, extract its entire contents).
In the FTP root directory for the media you copied, create a kickstart
file (ks.cfg). (Example: ftp://ftpserver.domain.com/Fedora9_32bit/ks.cfg) I
have included example kickstart files at the bottom of this article.
Once you have copied the installation media for a distro to your FTP server, you
need to copy 2 files from that specific distro media to your WDS server.
o From the (installation media\images\pxeboot) directory, copy the
following:
Copy vmlinuz to the following directory on the WDS server
(RemoteInstall\Boot\x86\knl\). Rename the file to an identifying
name such as vmlinuz-fedora9-32bit.
Copy initrd.img to the following directory on the WDS server
(RemoteInstall\Boot\x86\img\). Rename the file to an identifying
name such as initrd-fedora9-32bit.
When it comes time to configure your option menus, you will need to specify these files
for each version/distro you plan on making available.
Configuring WDS
From inside the downloaded SYSLINUX archive, copy the following files:
o pxelinux.0 from the (syslinux\core) directory to your
(RemoteInstall\Boot\x86\) directory on the WDS server.
o menu.c32 and vesamenu.c32 from the (syslinux\com32\menu) directory
to your (RemoteInstall\Boot\x86\) directory on the WDS server.
Inside the (RemoteInstall\Boot\x86\) directory, create copies of the following
files, rename them accordingly (you can copy paste then rename):
o Make a copy of pxeboot.n12, save it as pxeboot.0
o Make a copy of abortpxe.com, save it as abortpxe.0
Inside (RemoteInstall\Boot\x86\pxelinux.cfg\), create a file called default. This
will be the initial menu you see during PXE boot, edit the file and give it the
following contents:
# File: wdspath\RemoteInstall\Boot\x86\pxelinux.cfg\default
# Default boot option to use
DEFAULT menu.c32
TIMEOUT 50
# Prompt user for selection
PROMPT 0
# Menu Configuration
MENU WIDTH 80
MENU MARGIN 10
MENU PASSWORDMARGIN 3
MENU ROWS 12
MENU TABMSGROW 18
MENU CMDLINEROW 18
MENU ENDROW 24
MENU PASSWORDROW 11
MENU TIMEOUTROW 20
MENU TITLE Main Menu

# Menus
# Windows
LABEL Windows
MENU LABEL Windows Installer
KERNEL pxeboot.0
# x86
LABEL x86
MENU LABEL Linux 32bit Installs (x86)
KERNEL menu.c32
APPEND conf/x86.conf
# x64
LABEL x64
MENU LABEL Linux 64bit Installs (x64)
KERNEL menu.c32
APPEND conf/x64.conf
# Windows
LABEL Exit
MENU LABEL Exit
KERNEL abortpxe.0
Now you need to create the sub-menu configuration files for your 32 and 64 bit
installs that you specified in your default file
(RemoteInstall\Boot\x86\conf\x86.conf and
RemoteInstall\Boot\x86\conf\x64.conf respectively). These files will list the
available distros to install, and the path to your copied kernel\image files,
including your kickstart file which contains the path for your FTP or HTTP
installation media. Each option needs to point to the specific kernel and image
that was created from the installation media earlier.
# File: wdspath\RemoteInstall\Boot\x86\conf\x86.conf
# Default boot option to use
DEFAULT menu.c32
# Prompt user for selection
PROMPT 0
# Menu Configuration
MENU WIDTH 80
MENU MARGIN 10
MENU PASSWORDMARGIN 3
MENU ROWS 12
MENU TABMSGROW 18
MENU CMDLINEROW 18
MENU ENDROW 24
MENU PASSWORDROW 11
MENU TIMEOUTROW 20
MENU TITLE Linux32Bit (x86) OS Selection
# Return to Main Menu
LABEL MainMenu
MENU DEFAULT
MENU LABEL ^Main Menu
KERNEL menu.c32
#
# Blank boots
#
LABEL Fedora 9 32bit
MENU LABEL Fedora 9 32bit
KERNEL knl/vmlinuz-fedora9-x86
APPEND initrd=img/initrd-fedora9-x86.img
ks=ftp://ftpserver.mydomain.com/Fedora9_32bit/ks.cfg
# File: wdspath\RemoteInstall\Boot\x86\conf\x64.conf
# Default boot option to use
DEFAULT menu.c32
# Prompt user for selection
PROMPT 0
# Menu Configuration
MENU WIDTH 80
MENU MARGIN 10
MENU PASSWORDMARGIN 3
MENU ROWS 12
MENU TABMSGROW 18
MENU CMDLINEROW 18
MENU ENDROW 24
MENU PASSWORDROW 11
MENU TIMEOUTROW 20
MENU TITLE 64Bit (x64) OS Choice
# Return to Main Menu
LABEL MainMenu
MENU DEFAULT
MENU LABEL ^Main Menu
KERNEL menu.c32
#
# Blank boots
#
LABEL CentOS 5.2 64bit
MENU LABEL CentOS 5.2 64bit
KERNEL knl/vmlinuz-centos52-x64
APPEND initrd=img/initrd-centos52-x64.img
ks=ftp://ftpserver.mydomain.com/CentOS52_64bit/ks.cfg
LABEL Fedora 9 64bit
MENU LABEL Fedora 9 64bit
KERNEL knl/vmlinuz-fedora9-x64
APPEND initrd=img/initrd-fedora9-x64.img
ks=ftp://ftpserver.mydomain.com/Fedora9_64bit/ks.cfg
LABEL RHEL 5.2 64bit
MENU LABEL RHEL 5.2 64bit
KERNEL knl/vmlinuz-rhel52-x64
APPEND initrd=img/initrd-rhel52-x64.img
ks=ftp://ftpserver.mydomain.com/RHEL52_64bit/ks.cfg
Lastly, set WDS to use the pxelinux.0 boot image. If you need to get to the
normal WDS boot image, you can use the Windows Installer option created in
your default menu.
o Open Windows Deployment Services on your WDS server. Right click
your server -> Properties. Under the Boot tab, set the Default boot
program for x86 architecture (Boot\x86\pxelinux.0), or browse to the
pxelinux.0 file we created earlier. You may leave the other architectures
alone or change as you see fit.

**For Windows 2008 R2 installations you must set the bootimage via command-line as
followed:
wdsutil /set-server /bootprogram:boot\x86\pxelinux.0 /Architecture:x86
wdsutil /set-server /bootprogram:boot\x86\pxelinux.0 /Architecture:x64
wdsutil /set-server /N12bootprogram:boot\x86\pxelinux.0
/Architecture:x86
wdsutil /set-server /N12bootprogram:boot\x86\pxelinux.0
/Architecture:x64

Você também pode gostar