How to build Thinstation thin client images and exploring config files – Part II


Part I – How to setup Thinstation 5.3 thin client for use with VMware Horizon View 5

Part II – How to build Thinstation images and exploring config files

Part III – How to add drivers to your Thinstation build

Part IV – How to configure Thinstation and Google Chrome for a true, thin client experience

image

So if you’ve been following since Part I, you now have a DevStation stood up.  You’re now ready to build images that your thin clients can boot from.  I didn’t mention it in the first post, but be sure you’ve configured a static IP address on your DevStation.  You can do this via the Network Manager GUI interface.  Just right-click the network icon in the system tray and select Edit Connections…

Image

This is the IP address you’ll configure on your DHCP server as Option 66, the Boot Server Host Name.  My DHCP configuration is shown here.  It’s important to realize that Option 67, the Bootfile Name, is relative to the root of the TFTP directory.  In the case of the DevStation and PXE booting, it needs to be configured as shown here.  The root TFTP directory can be found as a symlink in /var/lib/tftpboot which points to /thinstation/build/boot-images/pxe

image

So the full path to pxelinux.0 is /thinstation/build/boot-images/pxe/boot/pxelinux/pxelinux.0

Here’s a final note about setup before we get going: make sure you have a DHCP scope configured for your thin clients.  Common sense, right? It took me longer than I care to admit because I had placed my thin client in a different subnet than the scopes I had configured.  Obviously, once I added a scope for this subnet, my thin client started pulling an IP address.

How to build a basic image

Actually building the image is very simple once you’re this far.  Much of the fun and action, as you can imagine, comes with customizing your images.  So you can either double-click the Terminal Chroot icon on the desktop or, from standard terminal, change directories to /thinstation and execute

 DevStation_000c29d9e6e3:/thinstation# ./setup-chroot 

This brings up a short README.  This details exactly how to build your first and subsequent images.  You’ll find it’s quite simple.  It even identifies the main files you’ll be using to customize your images.  I’ve reproduced the most important bits below.

Installation
       Just run ./setup_chroot. The first time this is run, it will expand all
       binary  packages  into  the  right place. It will then populate all the
       packages that build will use to make images. Afterwards, it  will  just
       start the chroot session.

Running
       You  will  need to make sure you are in the chroot Development Environ-
       ment by running ./setup-chroot. You should then be able  to  cd  /build
       and  run  ./build  to start making images. Edit build.conf and thinsta-
       tion.conf.buildtime to make changes

At the bottom of the README window, it tells you to press ‘Q’ to quit.  Doing this puts you in the Development Environment.  This is where you execute the commands above to build your images.  The build process uses the configuration files, packages and binaries included in the /thinstation directory to build an image.  Changing the config files, packages, and binaries will change your image.  You’ll likely find that simply changing the config files is enough for your needs, though, as many standard options are included in this DevStation build.  You simply have to pick and choose what’s right for you.

Development Environment Active. Type 'exit' to leave when done.

[root@TS_chroot]/#  cd /build
[root@TS_chroot]/build# ./build

This kicks off the build process.  It takes a couple minutes for the build to complete.  Once it does, you’ll have an image and supporting files ready to go.  The TFTP and PXE boot services are running and you’re ready to PXE boot a thin client.

In addition to creating boot images for PXE clients, an ISO is also created during this process that can be used to create a LiveCD.  The ISO file can be found at /thinstation/build/boot-images/iso/thinstation.iso

build.conf

This config file should be your first stop for customizing your images.  You can use a CLI editor like vi or the GUI to edit these files, whichever you find more useful.  You can find this file in the /thinstation/build directory.  It’s worth your time to read through the comments in this file because it tells you how to use the file to modify your images.  Here are the first few comment sections:

################################################
### ---     Thinstation Build Config     --- ###
################################################
#
#
# This is Thinstation s basic setup file. In this file you decide which
# hardware, programs and features to be included in the Thinstation
# boot image generated by running "./build".
#
# You can customize/limit the possibilities in the thinstation.conf
# files later.
#
# Anything after a "#" is a comment. You activate "things" by removing
# the "#" and remove "things" by putting a "#" in front of them.
#
# First we define which modules to include. Modules are hardware
# drivers. NEVER include more than necessary - the more modules, the
# longer boot time.

########################################################
### --- Machine Modules to include in boot image --- ###
########################################################
# A machine profile is a set of modules for a specific set of hardware
# components like a thinclient with adapters. It does not include any
# filesystem modules, those need to be selected individualy. Making a
# a machine profile is a two step process. First you will need to make
# an allmodules build like "./build --allmodules" with the extensions-x
# package included. Once the client machine is booted with that image
# you can open and xterm or telnet in and run "hwlister.sh". hwlister.sh
# will compile some lists and attempt to post them to the pxe server assigned
# to the client. If the pxe server is this workstation and you are hosting
# files directly out of this build env, you can then run
# "./mkmachine SOME-MODEL" and the files will be put into the machine folder
# under that model name. Now all you have to do is add a line to this file
# like "machine SOME-MODEL" and you will no longer have to make
# allmodules builds. If this is not the pxe server, you will have to
# move stuff around on your own, but the most important files are
# modules.list and firmware.list.

################################################
### --- Modules to include in boot image --- ###
################################################
# Any modules may be added as "module" or "module_pkg".
# If defined as a "module", the driver is included in the boot image.
# If defined as a "module_pkg", the driver is added from outside the
# image, such as from a tftp server.  See note below for more details.
#
# Normally you should use "module".  Only use "module_pkg" if you want
# to dynamically load modules.
# Note: If you create a module_pkg network driver, and decide to load it
#       from a tftp server, it won t work.  This is because the image
#       won t have a network driver to get the module_pkg in the first
#       place.

You’ll use this file to define the location of drivers specific to your various thin clients.  In a later post, you’ll see me add the location of my Dell Inspiron 6000 laptop drivers.  By default, only VMware virtual machines have drivers included in the image build, though.  This is good for testing, as you can imagine.

Finally, there’s the packages section.  You’ll want to look through this line by line, as well, to determine what you want to include in your images.  By default, the image is pretty lightly loaded, but feel free to uncomment those lines that will include the packages you’ll need.  Modifying which packages are included can help you change the windows manager, for instance, enable sound, iptables support, or install Java, Flash, or an FTP client.  For instance, I included the VMware Open-View Client with PCoIP support.  Here’s the heading for the packages section to give an explanation.

#################################################
### --- Packages to include in boot image --- ###
#################################################

# A package is a program or utility.
# Any packages may be added as "package" or "pkg".
# If defined as a "package", the program is included in the boot image.
# If defined as a "pkg", the program is added from outside the image.
# Normally, you should use "package".  Only use "pkg" if you want to
# dynamically load programs.

thinstation.conf.buildtime

This file sets the default settings of the thin client OS and is built into the image.  It includes general options like NTP server, time zone, audio levels, and syslog servers, session-specific options like which programs will autostart on boot and how they’ll run, for instance, in console mode or windowed, in addition to any unique options associated with that program.  Networking options can be configured here, as well.  For details regarding how to configure this file, read thinstation.conf.sample in the same directory.

Horizon View HTML Access

One of the items you’ll likely want to change in this file is which programs autostart once the OS is fully up.  For example, I wanted to start Google Chrome automatically and set it to open my View Connection Server’s HTML Access Web Portal.  To do this, I added these lines:

SESSION_1_TITLE="chrome"
SESSION_1_TYPE=chrome
SESSION_1_CHROME_HOMEPAGE=https://192.168.0.25/portal/webclient/views/index.html
SESSION_1_CHROME_OPTIONS="--ignore-certificate-errors --test-type"
SESSION_1_AUTOSTART=on

The SESSION_1 is important here.  I believe SESSION 0 is reserved for the windows manager, if one is configured. Although I think I read this may have been changed in recent versions of Thinstation.  You might be able to experiment with this.  The HOMEPAGE option is obvious, but the OPTIONS may not be, mostly because they’re different for different applications.  I had to do a lot of googling to figure this out.  I used default, self-signed SSL certificates in my home lab Horizon View deployment so every time Chrome autostarted and opened up my Connection Server Web Portal, the browser stopped at the untrusted certificate error, prompting for user action.  I found the –ignore-certificate-errors option on the web and it worked.  The prompt was by-passed and the Web Portal opened.  The bad part was that a big yellow warning banner was added to the top of the browser window stating that the –ignore-certificate-errors option was no longer supported and that the browser may become unstable.  I could close the banner, of course, but that required user action.  It would be nice to not see the banner at all.  A lot more googling offered the solution: the –ignore-certificate-errors flag was, indeed, no longer supported, but adding the –test-type flag to the options removed the warning banner.  The –test-type flag is definitely not supported, though, because it’s used for internal testing, but it got the job done.

Horizon View Open Client

When you’re configuring Thinstation to use the View Open Client, you’ll want to uncomment the type of View Client you want to use in build.conf first (with PCoIP or without), then come to thinstation.conf.buildtime to focus on the SESSION lines for the View Client.  To see what options are available for the View Client, check out the 50vmviewpcoip file found in /thinstation/build/packages/vmviewpcoip/build/conf.  The contents of the file are shown below.  Feel free to copy all these lines into your build.conf for reference later, leaving any lines commented out that you don’t want to use.  Then simply change the lines pertinent to your build.

# VMWare View Global Options
# Connect to server without waiting for the user to click connect
#VMVIEW_AUTOCONNECT=TRUE
# Set the certificate verification mode
#VMVIEW_SSLVERIFYMODE=3
# Default server to connect to if none specified
#VMVIEW_DEFAULTBROKER=192.168.1.1
# Module to use for PKCS#11
#VMVIEW_PKCS11=

# VMWare View Session options
#SESSION_#_TITLE="VDI"
#SESSION_#_TYPE=vmview
#SESSION_#_AUTOSTART=On
#SESSION_#_VMVIEW_SERVERURL=192.168.1.1
#SESSION_#_VMVIEW_FULLSCREEN=true
#SESSION_#_VMVIEW_NONINTERACTIVE=true
#SESSION_#_VMVIEW_KEEP-WM-BINDINGS=true
#SESSION_#_VMVIEW_BACKGROUND=/etc/background.jpg
#SESSION_#_VMVIEW_DOMAINNAME=donaldduck.com
#SESSION_#_VMVIEW_DESKTOPNAME=mickey
#SESSION_#_VMVIEW_USERNAME=minnie
#SESSION_#_VMVIEW_PASSWORD=mouse
#SESSION_#_VMVIEW_REDIRECT1="disk:usb=/mnt/usbdevice/sda1"
#SESSION_#_VMVIEW_REDIRECT2="printer:usb='HP LaserJet 4'"
#SESSION_#_VMVIEW_USB1="????"
#SESSION_#_VMVIEW_USB2="????"
#SESSION_#_VMVIEW_MMRPATH=/usr/local/mmr
#SESSION_#_VMVIEW_RDESKTOPOPTIONS="-N"

Finally, I should point you to more resources within the Thinstation environment.  Check out /thinstation/build/Documentation for some short but useful READMEs.

Maybe most importantly, there’s support out there in various forms. From the README.IMPORTANT file:

Support
=======

There are several options available for support:

1. There are many useful contributed docs at
   http://thinstation.sourceforge.net/wiki/index.php/ThDocs.

2. "The FAQ" is an excellent source of useful information and is
   regulary updated.  The FAQ is available at
   http://thinstation.sourceforge.net/faq.html.

3. If the first two options don't help you solve your problem, you can
   write to the thinstation-general mailing list.  In the email,
   specify:

   - Which version of Thinstation you are using.  If it is a beta, be
     sure you are using the LATEST beta available.
   - Which boot method you are using (e.g. etherboot, pxe, cdrom, etc.).
   - Thin client specs (e.g. ram, video card, NIC, etc.).
   - Which software you are using on the server for dhcp/tftp.
   - Include the relevant details from your "build.conf" file.
   - Include the relevant details from your "thinstation.conf.network"
     file.

   You can subscribe to the thinstation-general mailing list here:
   http://lists.sourceforge.net/lists/listinfo/thinstation-general

Build
=====

1. Edit "build.conf" file.
2. Edit the files in conf/ that you'll be using in your Thinstation
   image.
3. Run "build".

Note: You can optionally edit packages/base/etc/thinstation.defaults
for any built-in defaults you want Thinstation to have.
Advertisements

21 Comments on “How to build Thinstation thin client images and exploring config files – Part II”

  1. Carlos says:

    Hi, I have the machines running Thinstation thanks to your guide and a lot of reading on the web. I confgured a Server with Windows which provides remote sesions (Via thinstation rdesktop)….

    Now I want to connect printers to those remote computers, but their remote windows session do not recognize the USB printers I connect.

    What should I do? How to make the remote TS sessions recognize their own local printers.

    Thank you

    • I’m sorry – I haven’t gotten around to testing printing with Thinstation. You might try some of the support options listed at the end of this post. I’d like to hear how you resolve it, so please post back here when you find out. Good luck!

    • Hey Carlos, Im in need of some help with building an image that I can use to pxe boot via WDS. Can you help me with the process of actually building an image that pxe boots and then loads to windows terminal server so all the user sees is the loggin prompt?

    • jejohnson83 says:

      Hey Carlos,

      Let me know if you can help me with actually building images to pxe boot via WDS server and linuxpxe I have linuxpxe working but I need help on building an image that boots the the terminal server and all the user would see is the loggin screen for server2k12. Can you help me with that portion? Like I said, I was able to get the actual linuxpxe working but just need to build a image and then see how to deploy it using the pxe.

  2. Kick Ass VPS says:

    Thank you very much for the detailed instructions, your recommendations helped me a lot.

  3. have you figured out how to put the drivers in the build.conf file and specify their location?

    • The short answer is yes, I have. To add to that, though, I haven’t yet put together a blog post about it. But it’s fairly easy and straight forward.

      Reading the top part of the build.conf file, you’ll see a section on Machine Modules. I’ve reproduced it here but it’s also in the blog post above. Follow these instructions and you’ll be able to add pertinent drivers to your Thinstation images.

      ########################################################
      ### — Machine Modules to include in boot image — ###
      ########################################################
      # A machine profile is a set of modules for a specific set of hardware
      # components like a thinclient with adapters. It does not include any
      # filesystem modules, those need to be selected individualy. Making a
      # a machine profile is a two step process. First you will need to make
      # an allmodules build like “./build –allmodules” with the extensions-x
      # package included. Once the client machine is booted with that image
      # you can open and xterm or telnet in and run “hwlister.sh.” hwlister.sh
      # will compile some lists and attempt to post them to the pxe server assigned
      # to the client. If the pxe server is this workstation and you are hosting
      # files directly out of this build env, you can then run
      # “./mkmachine SOME-MODEL” and the files will be put into the machine folder
      # under that model name. Now all you have to do is add a line to this file
      # like “machine SOME-MODEL” and you will no longer have to make
      # allmodules builds. If this is not the pxe server, you will have to
      # move stuff around on your own, but the most important files are
      # modules.list and firmware.list.

  4. […] How to build Thinstation thin client images and exploring config files – Part II Useful commands for Cisco Nexus zoning […]

  5. Bruce says:

    have you figured out how to add ssl certificates to your linux client so that it will work with out errors.

  6. steve says:

    Great post! In regards to getting the view client to execute automatically. Do I put all those lines in 50vmviewpcoip config to the default config file or do I just edit the 50vmviewpcoip config file and run a build? Thanks for your help!

    • I don’t think I was able to get the View client to execute automatically – just the Blast interface because I could manipulate the startup execution of a web browser.

  7. Bernie says:

    Great guide. Where is part 3?

  8. Alex says:

    How do I build a Windows Image with Thinstation?

    • Thinstation is not used to build Windows images. It’s thin client software that allows you to access existing Windows images elsewhere. You’ll want to use something like VMware Horizon View to manage your desktops. You could even just boot to Thinstation and then RDP to another desktop or server.

  9. Mervin says:

    HI

    Did you get vmview client to autostart? Mine does not startup automatically, it wants to reconnect.

    I tried everything. Does not seem to want to work.

  10. hbbst says:

    Hi!
    I have a HP T5630W thin client and I try to boot with PXE. But it hangs at “PXELINUX 6.03 xxxxx”
    When I use Live CD everything is OK, so the hardware is enough, I think. What is the problem, what do you think?

    • I would agree that if everything works as expected with the LiveCD, your hardware should be supported. Do you have any other endpoints that successfully PXE boot? I would verify the boot image you’re booting from – whether it’s an MD5 hash of the entire ISO or VM (if you’re using the Thinstation VM).

  11. […] How to build Thinstation thin client images and … – … How to setup Thinstation 5.3 thin client for use … images and exploring config files Part … thin client images and exploring config files … […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s