Desktop Guerrilla Tactics: a Portable Thin Client Approach
We based our thin client boot floppy on BusyBox (www.busybox.net), which provides a complete bootable system on a floppy disk. It originally was created by Bruce Perens and currently is maintained by Erik Andersen. For a full explanation of each step, however, we would refer you to the three articles written by Bruce Perens and published in LJ, as well as the documentation from the BusyBox Web site (see www.linuxjournal.com/article/4335, www.linuxjournal.com/article/4395 and www.linuxjournal.com/article/4528).
Below, we outline the most elaborate part of our thin client approach. If you want to go straight to setting up your thin client network, skip this section and use the floppy image available on our Web site (cng.ateneo.net/cng/wyu/software). You have to modify only the network.cnf and libvga.config files to suit the circumstances of your network.
Step 1: we first created a filesystem with the appropriate nodes and configuration files for our system. We did this first on a Linux workstation. To simplify and automate the process, we wrote a script called genfilesys.sh. You can download this script from cng.ateneo.net/cng/wyu/software. We adapted this script from Bruce Perens' script (also available from the LJ FTP site at ftp.linuxjournal.com/pub/lj/listings/issueXXX/7109.tgz) and added configuration files for SVGALIB and UDHPC:
mkdir svilinux-filesystem ./genfilesys.sh ./svilinux-filesystem
In genfilesys.sh, we also set parameters for the video mode and mouse types, defined in libvga.config. You may want to modify this to suit your environment.
Step 2: build uClibc. uClibc is a C library with supplementary routines that we needed in order to run our VNC viewer. We downloaded the source package uClibc-0.9.20.tar.bz2 from www.uclibc.org and compiled it into our preparatory filesystem:
tar xvjf src/uClibc-0.9.20.tar.bz2 cd uClibc-0.9.20 make make install make PREFIX=../svilinux-filesystem install_target export PATH=/usr/i386-linux-uclibc/bin:$PATH cd ..
Step 3: build BusyBox. We downloaded the BusyBox source package, busybox-1.00-pre2.tar.gz, from www.busybox.net and built it in our workstation:
tar xvzf src/busybox-1.00-pre2.tar.gz cd busybox-1.00-pre2 make config make dep make make PREFIX=../svilinux-filesystem install cd ..
For the configuration, we chose to enable CONFIG_AWK, CONFIG_TELNET, CONFIG_UDHCPC and CONFIG_FEATURE_INITRD; we disabled CONFIG_SYSLOGD.
Step 4: configure SVGALIB. Because we were using VNC, at the very least we needed to incorporate SVGA support into our small distribution. To do this, we downloaded SVGALIB from www.svgalib.org and compiled it:
tar xvzf src/svgalib-1.4.3.tar.gz cd svgalib-1.4.3 vi Makefile.cfg (defaults are okay) make install make prefix=../svilinux-filesystem installsharedlib ln -s libvgagl.so.1.4.3 \ ../svilinux-filesystem/lib/libvgagl.so.1 ln -s libvga.so.1.4.3 \ ../svilinux-filesystem/lib/libvga.so.1
Do not use the experimental version of SVGALIB, as it uses a kernel helper for the frame buffer. Using this would mean recompiling the kernel to include this support, further bloating the kernel.
Step 5: configure the SVGA VNC viewer. We needed to configure our own VNC viewer that would work with SVGA, so we downloaded sources from www.tightvnc.com and packages.qa.debian.org/s/svncviewer.html. This VNC viewer still works with the stock VNC server from Red Hat.
tar xvjf src/tightvnc-1.2.9_unixsrc.tar.bz2 cd vnc_unixsrc xmkmf cd libvncauth xmkmf make cd ../.. tar xvzf src/svncviewer-0.1.1.tar.gz gzip -dc src/svncviewer_0.1.1-5.diff.gz | \ patch -p0 cd svncviewer-0.1.1 vi Imakefile
(Add -I/usr/local/include to INCLUDES and -L/usr/local/lib -L../vnc_unixsrc/libvncauth to SVGALIB.)
rm makefile xmkmf make strip -s -x -X svncviewer install svncviewer ../svilinux-filesystem/bin
Step 6: generate a ROM filesystem. We generated a ROM filesystem could load onto our boot floppy:
genromfs -f initrd -d ./svilinux-filesystem gzip -9 initrd
Step 7: build a small kernel. To minimize the size of our kernel, we decided to build a statically linked bzImage-style kernel. We removed all unnecessary items, such as unneeded drivers and features. The features we need to include are:
RAM disk support (in the Block Devices menu).
Initial RAM disk (initrd) support (also in the block devices menu).
ROM filesystem support (in the File Systems menu).
DOS FAT filesystem (in the File Systems menu).
VFAT (Windows 95) filesystem (in the File Systems menu).
We configured and compiled the kernel by invoking in our kernel source directory:
make menuconfig make dep clean bzImage
Step 8: create a bootable floppy with SYSLINUX. SYSLINUX is a bootloader for Linux that operates off MS-DOS floppies. It is part of a standard Red Hat 9 install. Thus, with our prepared floppy in the drive, we invoked:
This altered the boot sector of our floppy and also copied the second-stage bootstrap ldlinux.sys file to it.
We then copied our RAM disk initrd.gz and the compiled kernel bzImage to the floppy:
mount -t msdos /dev/fd0 /mnt cp initrd.gz /mnt/initrd.gz cp /usr/src/linux/arch/i386/boot/bzImage /mnt/linux
Step 9: create a SYSLINUX configuration file. We created a file called syslinux.cfg in our floppy that contains the following lines:
TIMEOUT 20 DEFAULT linux LABEL linux KERNEL linux APPEND root=/dev/ram0 initrd=initrd.gz
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- Stunnel Security for Oracle
- The Firebird Project's Firebird Relational Database
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- Managing Linux Using Puppet
- My +1 Sword of Productivity
- Non-Linux FOSS: Caffeine!
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide