Adding Tools to our Linux Deployment

Adding Parted Magic to your WDS Server.

Read prior to configuring the server to have an idea of what you are doing and gain an understanding prior to commencement.

If you are reading​​ this, then I assume (good or bad) that you have read my guide on setting up a Windows 2012R2 WDS Server and played with deploying Linux as described in the article.

There is nothing special about using WDS as all we are basically providing is a PXE Boot server that has been configured to allow us to deploy Windows based images or a couple of Linux flavours.

Now, some may like other types of things, so this is where the “Tools” come in.

Parted Magic as we all know is a disk partitioning tool that actually runs GParted. It also contains a Disk Imaging tool based on Clonezilla.

I was going to include adding Clonezilla but Parted Magic is a little easier to get going and doesn’t rely on NFS shares or the like, as all the required bits will be situated in the​​ 

RemoteInstall\boot\x64\linux path.

OK, let’s begin, what’s needed; PMagic_2016_03_02.iso from​​ http://getintopc.com/softwares/utilities/parted-magic-2016-iso-free-download/​​ or anywhere else. This is the latest copy I could find that was free.​​ This page also has information on Computer requirements for running Parted Magic.

If this PMagic_2016_03_02.iso is not the one used, changes must be made to the section of the tools menu that loads the ISO.

This line INITRD LINUX/PMagic/pmagic_2016_03_02.iso​​ in the tools.menu must be edited to reflect the ISO used

Setting up the PMagic folder.

Drill down to the RemoteInstall\boot\x64 folder, and we should already have a sub folder called Linux where we set up Ubuntu and Centos. Make a folder called PMagic and extract the downloaded PMagic_2016_03_02.iso. Also place a copy of the ISO in this folder as shown

The PMagic Folder under Linux



Contents of the PMagic Folder

NOTE:​​ Prior​​ to booting up into Parted Magic, we need to edit the Syslinux.cfg located in the PMagic\boot folder. Open in notepad and replace vmalloc=512Mib with vmalloc=600MiB. I just did all instances.

The first time I booted into PMagic I was presented with an error along the lines of Increase vmalloc in the syslinux.cfg to​​ equal​​ the ISO size plus 32MiB. 600MiB is a nice round figure

From the previous post on deploying Linux from WDS, we should have 2 files in the RemoteInstall\boot\x64\pxelinux.cfg folder. The default file and the tools.menu

When the client PC or VM is PXE booted we are presented with the new Boot menu as previously configured.​​ 

Selecting =DISK TOOLS= gives us the Disk Tools Menu

From here we can select Part’d Magic Full ISO tool.

Selecting​​ Part’d Magic Full ISO will start the process of booting the ISO to a​​ live​​ environment

​​ As Clonezilla is in the menu, I will cover it quickly.​​ 

What’s​​ required?

Clonezilla-live-20161024-yakkety-amd64.zip​​ or ISO or *20161212-zesty-amd64.zip. I had a version​​ earlier​​ than the 20161024 and had no mouse, it just sat in the middle of the screen.​​ 

Create a Clonezilla folder in the following location RemoteInstall\boot\x64\linux

Create a Clonezilla folder in the {drive:\Linux-distributions}
Extract the ISO or zip file to the Clonezilla folder. Copy the Live folder to the​​ RemoteInstall\boot\x64\linux\Clonezilla folder.

Copy the vmlinuz file from the live folder back up to the​​ RemoteInstall\boot\x64\linux\Clonezilla folder

This needs to be done as kernel load line for clonezilla looks like this: Kernel Linux/Clonezilla/vmlinuz

OR

Edit the tools.menu to this: Kernel Linux/Clonezilla/live/vmlinuz and it will work.

 

Good luck

 

Linux Deployment from Windows Server 2012 R2

Files required for this guide located here

If you haven’t already, read this post first for pre-assumptions

This is configured on Windows server 2012 R2

 

 Read this guide before starting the operation

 

This Guide is based on the following assumptions;

  • WDS is installed to the default folder of RemoteInstall.

  • The server has a second drive or Partition, in our configuration a D drive for the storing the distributions.​​ Can be done on a single drive server.

 

What you will need:

 

  • Windows server running WDS (and working via DHCP).​​ Able to deploy Windows images.

  • A recent copy of SYSLINUX (Syslinux-6.03 was used in this build, extracted to a folder somewhere on the server for later use), available here

 ​​ ​​ ​​​​ 
https://www.kernel.org/pub/linux/utils/boot/syslinux/6.xx/

 

or use the files supplied in the​​ WDS-LinuxFiles.zip

 ​​ ​​ ​​​​ 

  • An NFS Share configured on [Drive]\{Folder} eg D:\Linux-Distributions (after sorting out the syntax in the default file, this worked like a charm)​​ *Add Server for NFS Server Role if not already installed.​​ See the picture at the end of this guide for the NFS share settings

  • Ubuntu-16-04-Desktop-x64 ISO, plus the Netboot_x64 files (downloadable) Extract to Temp location for later use.​​ 

  • Centos-7-x64, plus the ​​ Centos07-x86_x64-NetInstall.iso (downloadable)Extract to Temp location for later use

  • Parted Magic ISO 2016_03_02

  • Clonezilla Live 20161024-yakkety-amd64

 

Pre-Setup

NOTE We have only configured the x64 Images for deployments. If x86 is required repeat the instructions substituting (RemoteInstall\Boot\x86\)​​ 

for (RemoteInstall\Boot\x64\)

 ​​ ​​ ​​​​ 

Create the necessary directory structure inside the WDS RemoteInstall directory (this was specified during the WDS installation).

 ​​ ​​ ​​​​ Inside the x64 folder (RemoteInstall\Boot\x64\), create the following folders (including pxelinux.cfg):  ​​ ​​ ​​​​ 

 ​​​​ 

 ​​​​ 

 

RemoteInstall\boot\x64\Linux\

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Centos

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ centos-7-x64

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Ubuntu

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ Ubuntu-16-04-Desktop-x64

 ​​​​ casper

 ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ pxelinux.cfg

 

Machine generated alternative text:
This pc 
Linux 
centos 
ce ntos- 7- x64 
Ubuntu 
WDS (E) 
Remotelnstall Boot 
Name 
centos 
Ubuntu 
xE4 
Linux 
Ubuntu- 16-u- Desktop-x64 
casper

 

Machine generated alternative text:
This pc 
pxelinux.cfg 
qps ploc 
ro-RO 
WDS (E) 
Remotelnstall Boot 
Name 
default 
default 
xE4 
pxelinux.cfg 
- Copy working 8jun16

 

Preparing Installation Media

 ​​​​ ​​ Ubuntu

Extract​​ the Ubuntu-16-04-Desktop-x64 ISO (Magic ISO can do this) to the D:\Linux-Distributions\Ubuntu\Ubuntu-16-04-Desktop-x64Machine generated alternative text:
This pc 
GNS3 WorkBench 5.4 
CD Projects 
Inetpub 
JAVA 
Linux- Distributions 
centos 
KAL 
ubuntu 
FILE SHARE 
Linux- Distributions 
Name 
. disk 
casper 
dists 
install 
isolinux 
p ICS 
pool 
preseed 
KS. cfg 
md5sum.txt 
ubuntu 
Ubuntu- 16-04- Desktop-xE4 
Date modid 
8/06/2016 ' 
8/06/2016 
so 
Ubuntu- 15-10-Desktop x64 
Ubuntu- 16-04- Desktop-x64 
.disk 
casper 
dists 
install 
isolinux 
p ICS 
pool 
preseed 
README.diskdefines

 ​​ ​​​​ 

Centos-7

Extract the CentOS-7-x64 ISO (Magic ISO can do this) to the D:\Linux-Distributions\Centos\centos-7-x64

NOTE​​ Also place the ISO into this directory. (During installation testing, once we had it deploying, no package were available for installation​​ 

 ​​ ​​ ​​ ​​ ​​ ​​ ​​​​ even though the packages directory existed and was populated. It appears the install process can "see" into the ISO for the required files...go figure, made no sense to​​ me​​ but it worked.)

 

Machine generated alternative text:
Linux-Distributions 
centos 
centos-7-xN 
t:' LL images 
isolinux 
Live0S 
p ackages 
u buntu 
Ubuntu- 15- ISO 
U bu ntu- 16—04- 
.disk 
t' boot 
Name 
images 
isolinux 
Liv eOS 
P adages 
L.j discinfo 
.treeinfo 
centos BuildTag 
centos-7-x86 a-DVD-1511.iso 
EULA 
Lj RPM-GPG-KEv-Cent0S-7 
RPM-GPG-KEY-CentOS-Testing-7 
TRANS.TBL

 

Configuring WDS​​ (The long way)

From inside the downloaded SYSLINUX archive, copy the following files:

syslinux-6.02/bios/core/pxelinux.0
syslinux-6.02/bios/com32/menu/vesamenu.c32
syslinux-6.02/bios/com32/chain/chain.c32
syslinux-6.02/bios/com32/elflink/ldlinux/ldlinux.c32
syslinux-6.02/bios/com32/lib/libcom32.c32
syslinux-6.02/bios/com32/libutil/libutil.c32

To the boot\x64\ or boot\x86

Rename pxelinux.0 to pxelinux.com​​ 

Inside the (RemoteInstall\Boot\x64\) directory, create copies of the following files, rename them accordingly (you can copy paste then rename):

Make a copy of pxeboot.n12, save it as pxeboot.0

Make a copy of abortpxe.com, save it as abortpxe.0

From <https://www.nbalonso.com/deploy-linux-windows-server/>​​ 

 

OR

Configuring WDS The short way

The short way,​​ just copy​​ all​​ the​​ files​​ supplied​​ in the wds-linuxfiles.zip\ reminst-bootx64 folder​​ to the​​ RemoteInstall\Boot\x64​​ folder

 

Inside (RemoteInstall\Boot\x64\pxelinux.cfg\), create a file called default. (or copy the supplied​​ one​​ in the wds-linuxfiles.zip\pxelinux.cfg folder NOTE also place the tools.menu​​ file here) This will be the initial menu you see during PXE boot, and provide options for Windows Deployment Services or Linux deployments.​​ Ensure "view file extensions of know file types"​​ is selected in Windows explorer)​​ If this file has an extension of any type it will not work

 

 

Configuring the Distributions (Ubuntu)

Under the previously created Linux folder in the RemoteInstall\Boot\x64\ create a subfolder for the distribution,​​ e.g.
RemoteInstall\Boot\x64\Linux\ubuntu\Ubuntu-16-04-Desktop-x64

 ​​ ​​ ​​​​ 

Copy the Casper directory from the D:\Linux-Distributions\Ubuntu\Ubuntu-16-04-Desktop-x64 to​​ 

RemoteInstall\Boot\x64\Linux\ubuntu\Ubuntu-16-04-Desktop-x64.

From the extracted ubuntu NetBoot_64\netboot\ubuntu_installer\amd64 files copy the "Linux" file to RemoteInstall\Boot\x64\Linux\Ubuntu-16-04-Desktop-x64

Or use the linux file from the​​ one​​ supplied​​ in the wds-linuxfiles.zip\ bootx64-ubuntu folder

Machine generated alternative text:
This pc 
Linux 
centos 
ce ntos- 7- x64 
Ubuntu 
WDS (E) 
Remotelnstall Boot 
Name 
centos 
Ubuntu 
xE4 
Linux 
Ubuntu- 16-u- Desktop-x64 
casper

 

 

 

Configuring the Distributions (Centos)

Under the previously created Linux folder in the RemoteInstall\Boot\x64\ create a subfolder for the distribution,

e.g. RemoteInstall\Boot\x64\Linux\Centos\centos-7-x64

From the extracted Centos07-x86_x64-NetInstall.iso From the isolinux folder, copy​​ the vmlinuz​​ file to​​ 

RemoteInstall\Boot\x64\Linux\Centos\centos-7-x64

From the D:\Linux-Distributions\Centos\centos-7-x64\isolinux copy the initrd.img to RemoteInstall\Boot\x64\Linux\Centos\centos-7-x64.

Or use the​​ vmlinuz​​ file from the​​ one​​ supplied​​ in the wds-linuxfiles.zip\ bootx64-centos folder

 

 

Machine generated alternative text:
This pc 
pxelinux.cfg 
qps ploc 
ro-RO 
WDS (E) 
Remotelnstall Boot 
Name 
default 
default 
xE4 
pxelinux.cfg 
- Copy working 8jun16

 

Lastly

set WDS to use the pxelinux.com​​ 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. ​​ From an Elevated Command Prompt run the following

 

wdsutil /set-server /bootprogram:boot\x86\pxelinux.com​​ /Architecture:x64

wdsutil /set-server​​ /N12bootprogram:boot\x86\pxelinux.com/Architecture:x64

 

If x86 versions of the software have been used run the follow as well

wdsutil /set-server /bootprogram:boot\x86\pxelinux.com​​ /Architecture:x86

wdsutil /set-server /N12bootprogram:boot\x86\pxelinux.com​​ /Architecture:x86

or run the supplied Linux-wdsutil batch file,​​ REBOOT THE SERVER

Side note

When Ubuntu loads, it will be the Live Image. From the desktop there is an option to Install Ubuntu.​​ 

 

The folder structure under the RemoteInstall\boot\x64 must match the structure shown in the default file.

 

The Linux-Distribution share, folder structure must match the default file.

 

EDIT the default file and replace​​ {server_ip}​​ with the IP Address of your server

 

 

 

 


Note: When Centos is installed, there is a good chance it will come up terminal mode complaining that the license agreement has not been accepted. To fix it and get into the GIU, follow the instructions here.

How to Fix GNOME License Not Accepted Issue on CentOS 7

Credits to the author of this article.

The next part will cover adding Clonezilla and Part’d Magic…

Adding Tools to our Linux Deployment