Create Citrix Thin Client Live CD


To make the Citrix Thin Client (I call it TC-Citrix) more flexible, I created a live CD which can be used to run TC-Citrix from the bootable CD or install TC-Citrix to the local hard disk.

Take a  quick look, here are two snapshots:

image

 

image

As always, below is my step by step How To: (I compiled the CD under Ubuntu 11.10)

1) Create your project folder, I call it ‘tc-citrix-liveCD’.

2) Create ‘boot’, ‘cde’, ‘tce’, ‘PING’ four subfolders in ‘tc-citrix-liveCD’ folder.

3) Mount the CorePlus.iso installation CD, and copy all files from ‘boot’ to ‘tc-citrix-liveCD/boot’ .

4) Copy all files in the ‘/mnt/sda1/tce’ folder from your running TC-Citrix to ‘tc-citrix-liveCD/cde’.

5) Copy ‘mydata.tgz’ from ‘tc-citrix-liveCD/cde’ to ‘tc-citrix-liveCD/tce’.

6) Mount PING.iso (the image tool), and copy all files to ‘tc-citrix-liveCD/PING’.

7) Copy the tc-citrix PING image files you created before to ‘tc-citrix-liveCD/’. Now the project folder should look like this:

jchen@dominos:~/Downloads/tc-citrix-liveCD+PING$ ls -alhR
.:
total 108M
drwxrwxr-x 6 jchen jchen 4.0K 2012-03-17 17:19 .
drwxr-xr-x 20 jchen jchen 4.0K 2012-03-17 17:45 ..
dr-xr-xr-x 3 jchen jchen 4.0K 2012-03-17 18:02 boot
drwx—— 4 jchen jchen 4.0K 2012-03-17 15:28 cde
-rw-r–r– 1 root root 1.7K 2012-03-17 17:09 HDD_Look.txt
dr-xr-xr-x 2 jchen jchen 4.0K 2012-03-17 17:20 PING
-rw-r–r– 1 root root 32K 2012-03-17 17:09 sda
-rw-r–r– 1 root root 108M 2012-03-17 17:09 sda1.000
-rw-r–r– 1 root root 10K 2012-03-17 17:09 sda1.first_sectors
drwxrwxr-x 2 jchen jchen 4.0K 2012-03-17 15:28 tce

./boot:
total 7.7M
dr-xr-xr-x 3 jchen jchen 4.0K 2012-03-17 18:02 .
drwxrwxr-x 6 jchen jchen 4.0K 2012-03-17 17:19 ..
-rw-r–r– 1 jchen jchen 5.3M 2012-03-17 15:28 core.gz
dr-xr-xr-x 2 jchen jchen 4.0K 2012-03-17 18:15 isolinux
-r–r–r– 1 jchen jchen 2.4M 2012-03-17 15:28 vmlinuz

./boot/isolinux:
total 100K
dr-xr-xr-x 2 jchen jchen 4.0K 2012-03-17 18:15 .
dr-xr-xr-x 3 jchen jchen 4.0K 2012-03-17 18:02 ..
-r–r–r– 1 jchen jchen 2.0K 2012-03-17 15:28 boot.cat
-r–r–r– 1 jchen jchen 24K 2012-03-17 18:15 isolinux.bin
-r–r–r– 1 jchen jchen 959 2012-03-17 18:14 isolinux.cfg
-r–r–r– 1 root root 60K 2012-03-17 15:33 menu.c32

./cde:
total 24K
drwx—— 4 jchen jchen 4.0K 2012-03-17 15:28 .
drwxrwxr-x 6 jchen jchen 4.0K 2012-03-17 17:19 ..
-rw-r–r– 1 jchen jchen 134 2012-03-17 15:28 onboot.lst
drwx—— 2 jchen jchen 4.0K 2012-03-17 15:28 ondemand
drwx—— 2 jchen jchen 4.0K 2012-03-17 15:28 optional
-rw-r–r– 1 jchen jchen 800 2012-03-17 15:28 xwbar.lst

./cde/ondemand:
total 8.0K
drwx—— 2 jchen jchen 4.0K 2012-03-17 15:28 .
drwx—— 4 jchen jchen 4.0K 2012-03-17 15:28 ..

./cde/optional:
total 57M
drwx—— 2 jchen jchen 4.0K 2012-03-17 15:28 .
drwx—— 4 jchen jchen 4.0K 2012-03-17 15:28 ..
-rw-r–r– 1 jchen jchen 120K 2012-03-17 15:28 advcomp.tcz
-rw-r–r– 1 jchen jchen 10 2012-03-17 15:28 advcomp.tcz.dep
-rw-r–r– 1 jchen jchen 46 2012-03-17 15:28 advcomp.tcz.md5.txt
-rw-r–r– 1 jchen jchen 156K 2012-03-17 15:28 atk.tcz
-rw-r–r– 1 jchen jchen 23 2012-03-17 15:28 atk.tcz.dep
-rw-r–r– 1 jchen jchen 42 2012-03-17 15:28 atk.tcz.md5.txt
-rw-r–r– 1 jchen jchen 504K 2012-03-17 15:28 cairo.tcz
-rw-r–r– 1 jchen jchen 28 2012-03-17 15:28 cairo.tcz.dep
-rw-r–r– 1 jchen jchen 44 2012-03-17 15:28 cairo.tcz.md5.txt
-rw-r–r– 1 jchen jchen 1.1M 2012-03-17 15:28 curl.tcz
-rw-r–r– 1 jchen jchen 43 2012-03-17 15:28 curl.tcz.md5.txt
-rw-r–r– 1 jchen jchen 176K 2012-03-17 15:28 cyrus-sasl.tcz
-rw-r–r– 1 jchen jchen 18 2012-03-17 15:28 cyrus-sasl.tcz.dep
-rw-r–r– 1 jchen jchen 49 2012-03-17 15:28 cyrus-sasl.tcz.md5.txt
-rw-r–r– 1 jchen jchen 104K 2012-03-17 15:28 dbus-glib.tcz
-rw-r–r– 1 jchen jchen 21 2012-03-17 15:28 dbus-glib.tcz.dep
-rw-r–r– 1 jchen jchen 48 2012-03-17 15:28 dbus-glib.tcz.md5.txt
-rw-r–r– 1 jchen jchen 412K 2012-03-17 15:28 dbus.tcz
-rw-r–r– 1 jchen jchen 13 2012-03-17 15:28 dbus.tcz.dep
-rw-r–r– 1 jchen jchen 43 2012-03-17 15:28 dbus.tcz.md5.txt
-rw-r–r– 1 jchen jchen 56K 2012-03-17 15:28 dosfstools.tcz
-rw-r–r– 1 jchen jchen 49 2012-03-17 15:28 dosfstools.tcz.md5.txt
-rw-r–r– 1 jchen jchen 76K 2012-03-17 15:28 expat2.tcz
-rw-r–r– 1 jchen jchen 45 2012-03-17 15:28 expat2.tcz.md5.txt
-rw-r–r– 1 jchen jchen 24K 2012-03-17 15:28 ezremaster.tcz
-rw-r–r– 1 jchen jchen 30 2012-03-17 15:28 ezremaster.tcz.dep
-rw-r–r– 1 jchen jchen 49 2012-03-17 15:28 ezremaster.tcz.md5.txt
-rw-r–r– 1 jchen jchen 20M 2012-03-17 15:28 firefox.tcz
-rw-r–r– 1 jchen jchen 48 2012-03-17 15:28 firefox.tcz.dep
-rw-r–r– 1 jchen jchen 46 2012-03-17 15:28 firefox.tcz.md5.txt
-rw-r–r– 1 jchen jchen 288K 2012-03-17 15:28 fltk-1.10.tcz
-rw-r–r– 1 jchen jchen 48 2012-03-17 15:28 fltk-1.10.tcz.md5.txt
-rw-r–r– 1 jchen jchen 28K 2012-03-17 15:28 flwm_topside.tcz
-rw-r–r– 1 jchen jchen 14 2012-03-17 15:28 flwm_topside.tcz.dep
-rw-r–r– 1 jchen jchen 51 2012-03-17 15:28 flwm_topside.tcz.md5.txt
-rw-r–r– 1 jchen jchen 132K 2012-03-17 15:28 fontconfig.tcz
-rw-r–r– 1 jchen jchen 13 2012-03-17 15:28 fontconfig.tcz.dep
-rw-r–r– 1 jchen jchen 49 2012-03-17 15:28 fontconfig.tcz.md5.txt
-rw-r–r– 1 jchen jchen 304K 2012-03-17 15:28 gcc_libs.tcz
-rw-r–r– 1 jchen jchen 47 2012-03-17 15:28 gcc_libs.tcz.md5.txt
-rw-r–r– 1 jchen jchen 264K 2012-03-17 15:28 gdk-pixbuf2.tcz
-rw-r–r– 1 jchen jchen 31 2012-03-17 15:28 gdk-pixbuf2.tcz.dep
-rw-r–r– 1 jchen jchen 50 2012-03-17 15:28 gdk-pixbuf2.tcz.md5.txt
-rw-r–r– 1 jchen jchen 80K 2012-03-17 15:28 glib1.tcz
-rw-r–r– 1 jchen jchen 44 2012-03-17 15:28 glib1.tcz.md5.txt
-rw-r–r– 1 jchen jchen 1.4M 2012-03-17 15:28 glib2.tcz
-rw-r–r– 1 jchen jchen 12 2012-03-17 15:28 glib2.tcz.dep
-rw-r–r– 1 jchen jchen 44 2012-03-17 15:28 glib2.tcz.md5.txt
-rw-r–r– 1 jchen jchen 356K 2012-03-17 15:28 gmp.tcz
-rw-r–r– 1 jchen jchen 42 2012-03-17 15:28 gmp.tcz.md5.txt
-rw-r–r– 1 jchen jchen 460K 2012-03-17 15:28 gnutls.tcz
-rw-r–r– 1 jchen jchen 50 2012-03-17 15:28 gnutls.tcz.dep
-rw-r–r– 1 jchen jchen 45 2012-03-17 15:28 gnutls.tcz.md5.txt
-rw-r–r– 1 jchen jchen 772K 2012-03-17 15:28 graphics-libs-1.tcz
-rw-r–r– 1 jchen jchen 54 2012-03-17 15:28 graphics-libs-1.tcz.md5.txt
-rw-r–r– 1 jchen jchen 2.8M 2012-03-17 15:28 gtk2.tcz
-rw-r–r– 1 jchen jchen 66 2012-03-17 15:28 gtk2.tcz.dep
-rw-r–r– 1 jchen jchen 43 2012-03-17 15:28 gtk2.tcz.md5.txt
-rw-r–r– 1 jchen jchen 68K 2012-03-17 15:28 gtk-vnc.tcz
-rw-r–r– 1 jchen jchen 36 2012-03-17 15:28 gtk-vnc.tcz.dep
-rw-r–r– 1 jchen jchen 46 2012-03-17 15:28 gtk-vnc.tcz.md5.txt
-rw-r–r– 1 jchen jchen 376K 2012-03-17 15:28 libasound.tcz
-rw-r–r– 1 jchen jchen 48 2012-03-17 15:28 libasound.tcz.md5.txt
-rw-r–r– 1 jchen jchen 20K 2012-03-17 15:28 libattr.tcz
-rw-r–r– 1 jchen jchen 46 2012-03-17 15:28 libattr.tcz.md5.txt
-rw-r–r– 1 jchen jchen 36K 2012-03-17 15:28 libcap.tcz
-rw-r–r– 1 jchen jchen 12 2012-03-17 15:28 libcap.tcz.dep
-rw-r–r– 1 jchen jchen 45 2012-03-17 15:28 libcap.tcz.md5.txt
-rw-r–r– 1 jchen jchen 12K 2012-03-17 15:28 libffi.tcz
-rw-r–r– 1 jchen jchen 45 2012-03-17 15:28 libffi.tcz.md5.txt
-rw-r–r– 1 jchen jchen 288K 2012-03-17 15:28 libgcrypt.tcz
-rw-r–r– 1 jchen jchen 17 2012-03-17 15:28 libgcrypt.tcz.dep
-rw-r–r– 1 jchen jchen 48 2012-03-17 15:28 libgcrypt.tcz.md5.txt
-rw-r–r– 1 jchen jchen 24K 2012-03-17 15:28 libgpg-error.tcz
-rw-r–r– 1 jchen jchen 51 2012-03-17 15:28 libgpg-error.tcz.md5.txt
-rw-r–r– 1 jchen jchen 20K 2012-03-17 15:28 libnotify.tcz
-rw-r–r– 1 jchen jchen 23 2012-03-17 15:28 libnotify.tcz.dep
-rw-r–r– 1 jchen jchen 48 2012-03-17 15:28 libnotify.tcz.md5.txt
-rw-r–r– 1 jchen jchen 840K 2012-03-17 15:28 libssl-0.9.8.tcz
-rw-r–r– 1 jchen jchen 51 2012-03-17 15:28 libssl-0.9.8.tcz.md5.txt
-rw-r–r– 1 jchen jchen 84K 2012-03-17 15:28 libtasn1.tcz
-rw-r–r– 1 jchen jchen 47 2012-03-17 15:28 libtasn1.tcz.md5.txt
-rw-r–r– 1 jchen jchen 108K 2012-03-17 15:28 libxcb.tcz
-rw-r–r– 1 jchen jchen 45 2012-03-17 15:28 libxcb.tcz.md5.txt
-rw-r–r– 1 jchen jchen 680K 2012-03-17 15:28 libxml2.tcz
-rw-r–r– 1 jchen jchen 46 2012-03-17 15:28 libxml2.tcz.md5.txt
-rw-r–r– 1 jchen jchen 20K 2012-03-17 15:28 libxp.tcz
-rw-r–r– 1 jchen jchen 44 2012-03-17 15:28 libxp.tcz.md5.txt
-rw-r–r– 1 jchen jchen 452K 2012-03-17 15:28 mkisofs-tools.tcz
-rw-r–r– 1 jchen jchen 52 2012-03-17 15:28 mkisofs-tools.tcz.md5.txt
-rw-r–r– 1 jchen jchen 132K 2012-03-17 15:28 nettle.tcz
-rw-r–r– 1 jchen jchen 8 2012-03-17 15:28 nettle.tcz.dep
-rw-r–r– 1 jchen jchen 45 2012-03-17 15:28 nettle.tcz.md5.txt
-rw-r–r– 1 jchen jchen 1.3M 2012-03-17 15:28 openmotif-lib.tcz
-rw-r–r– 1 jchen jchen 17 2012-03-17 15:28 openmotif-lib.tcz.dep
-rw-r–r– 1 jchen jchen 52 2012-03-17 15:28 openmotif-lib.tcz.md5.txt
-rw-r–r– 1 jchen jchen 1.4M 2012-03-17 15:28 openmotif.tcz
-rw-r–r– 1 jchen jchen 35 2012-03-17 15:28 openmotif.tcz.dep
-rw-r–r– 1 jchen jchen 48 2012-03-17 15:28 openmotif.tcz.md5.txt
-rw-r–r– 1 jchen jchen 864K 2012-03-17 15:28 openssh.tcz
-rw-r–r– 1 jchen jchen 30 2012-03-17 15:28 openssh.tcz.dep
-rw-r–r– 1 jchen jchen 46 2012-03-17 15:28 openssh.tcz.md5.txt
-rw-r–r– 1 jchen jchen 1.3M 2012-03-17 15:28 openssl-1.0.0.tcz
-rw-r–r– 1 jchen jchen 52 2012-03-17 15:28 openssl-1.0.0.tcz.md5.txt
-rw-r–r– 1 jchen jchen 28K 2012-03-17 15:28 p11-kit.tcz
-rw-r–r– 1 jchen jchen 46 2012-03-17 15:28 p11-kit.tcz.md5.txt
-rw-r–r– 1 jchen jchen 528K 2012-03-17 15:28 pango.tcz
-rw-r–r– 1 jchen jchen 39 2012-03-17 15:28 pango.tcz.dep
-rw-r–r– 1 jchen jchen 44 2012-03-17 15:28 pango.tcz.md5.txt
-rw-r–r– 1 jchen jchen 13M 2012-03-17 15:28 perl5.tcz
-rw-r–r– 1 jchen jchen 44 2012-03-17 15:28 perl5.tcz.md5.txt
-rw-r–r– 1 jchen jchen 204K 2012-03-17 15:28 pixman.tcz
-rw-r–r– 1 jchen jchen 45 2012-03-17 15:28 pixman.tcz.md5.txt
-rw-r–r– 1 jchen jchen 448K 2012-03-17 15:28 shared-mime-info.tcz
-rw-r–r– 1 jchen jchen 23 2012-03-17 15:28 shared-mime-info.tcz.dep
-rw-r–r– 1 jchen jchen 55 2012-03-17 15:28 shared-mime-info.tcz.md5.txt
-rw-r–r– 1 jchen jchen 1.6M 2012-03-17 15:28 syslinux.tcz
-rw-r–r– 1 jchen jchen 47 2012-03-17 15:28 syslinux.tcz.md5.txt
-rw-r–r– 1 jchen jchen 172K 2012-03-17 15:28 tar.tcz
-rw-r–r– 1 jchen jchen 42 2012-03-17 15:28 tar.tcz.md5.txt
-rw-r–r– 1 jchen jchen 20K 2012-03-17 15:28 tc-install.tcz
-rw-r–r– 1 jchen jchen 38 2012-03-17 15:28 tc-install.tcz.dep
-rw-r–r– 1 jchen jchen 49 2012-03-17 15:28 tc-install.tcz.md5.txt
-rw-r–r– 1 jchen jchen 32K 2012-03-17 15:28 wbar.tcz
-rw-r–r– 1 jchen jchen 14 2012-03-17 15:28 wbar.tcz.dep
-rw-r–r– 1 jchen jchen 43 2012-03-17 15:28 wbar.tcz.md5.txt
-rw-r–r– 1 jchen jchen 3.2M 2012-03-17 15:28 Xlibs.tcz
-rw-r–r– 1 jchen jchen 44 2012-03-17 15:28 Xlibs.tcz.md5.txt
-rw-r–r– 1 jchen jchen 656K 2012-03-17 15:28 Xorg-7.6-lib.tcz
-rw-r–r– 1 jchen jchen 51 2012-03-17 15:28 Xorg-7.6-lib.tcz.md5.txt
-rw-r–r– 1 jchen jchen 132K 2012-03-17 15:28 Xprogs.tcz
-rw-r–r– 1 jchen jchen 24 2012-03-17 15:28 Xprogs.tcz.dep
-rw-r–r– 1 jchen jchen 45 2012-03-17 15:28 Xprogs.tcz.md5.txt
-rw-r–r– 1 jchen jchen 364K 2012-03-17 15:28 Xvesa.tcz
-rw-r–r– 1 jchen jchen 44 2012-03-17 15:28 Xvesa.tcz.md5.txt

./PING:
total 34M
dr-xr-xr-x 2 jchen jchen 4.0K 2012-03-17 17:20 .
drwxrwxr-x 6 jchen jchen 4.0K 2012-03-17 17:19 ..
-r–r–r– 1 jchen jchen 27M 2011-11-28 09:45 initrd.gz
-r–r–r– 1 jchen jchen 7.0M 2011-11-28 09:44 kernel
-r–r–r– 1 jchen jchen 71K 2011-11-28 09:45 logo.16

./tce:
total 7.8M
drwxrwxr-x 2 jchen jchen 4.0K 2012-03-17 15:28 .
drwxrwxr-x 6 jchen jchen 4.0K 2012-03-17 17:19 ..
-rw-r–r– 1 jchen jchen 7.8M 2012-03-17 15:28 mydata.tgz

8) Now let’s hack the core.gz file. Move the ‘tc-citrix-liveCD/boot/core.gz’ file to a temp folder. Then in that temp folder run ‘zcat boot/core.gz | sudo cpio –idum’.

9) Still in that temp folder, run ‘sudo vi etc/init.d/tc-config ’, and comment out the restore scripts and add your one.

# If restore then also pass TCE directory for quick look of mydata.tgz backupfile
#if [ -n “$MYDATA” ]; then
# echo “$MYDATA” > /etc/sysconfig/mydata
#else
# echo “mydata” > /etc/sysconfig/mydata
#fi
#if [ -n “$NORESTORE” ]; then
# echo “${GREEN}Skipping restore as requested from the command line.${NORMAL}”
#else
# TCEDIR=`readlink /etc/sysconfig/tcedir`
# /etc/init.d/tc-restore.sh “$TCEDIR”
#fi
# This forces it restore from the CD
/etc/init.d/tc-restore.sh “/mnt/sr0/tce”

10) Generate a new core.gz file by running ‘find . | cpio –create –format=’newc’ | gzip > ../core.gz’ in the temp folder.

11) Go to the up level of the temp folder and copy the core.gz file back to  ‘tc-citrix-liveCD/boot/’.

12) Run ‘sudo vi /tc-citrix-liveCD/boot/isolinux/isolinux.cfg’ to edit the new boot menu.

DEFAULT menu.c32
PROMPT 0
TIMEOUT 600
ONTIMEOUT live

MENU TITLE Citrix Thin Client Live CD developed by Jackie Chen
MENU VSHIFT 3
MENU ROWS 2
MENU TABMSGROW 15
MENU TABMSG Press ENTER to boot
MENU HELPMSGROW 17
MENU HELPMSGENDROW -3
MENU Automatically Run live CD in # second{,s}…

LABEL live
MENU DEFAULT
MENU LABEL 1) Run TC-Citrix from live CD
TEXT HELP
Live CD is for temporary use only.
Don’t remove the media while the system is running.
ENDTEXT
KERNEL /boot/vmlinuz
APPEND initrd=/boot/core.gz quiet cde showapps desktop=flwm_topside

LABEL ping
MENU LABEL 2) Install TC-Citrix on local hard disk
TEXT HELP
Restore TC-Citrix image to local hard disk.
WARNING: All exisiting data will be wiped!
ENDTEXT
KERNEL /PING/kernel
APPEND vga=normal devfs=nomount pxe ramdisk_size=60000 load_ramdisk=1 init=/linuxrc prompt_ramdisk=0 initrd=/PING/initrd.gz root=/dev/ram0 rw noapic nolapic lba combined_mode=libata ide0=noprobe nomce pci=nomsi irqpoll quiet

13) Return to ‘tc-citrix-liveCD’ root level. Now let’s generate the Live CD iso file ‘sudo mkisofs -r -V tc-citrix-liveCD -cache-inodes -J -l -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../tc-citrix-liveCD.iso .’

14) Go to the up level of the ‘tc-citrix-liveCD’ folder and find your tc-citrix-liveCD.iso.

15) Burn the iso file to a CD. That’s all about it, enjoy Angel

 

More info about the menu settings can be found at: http://www.syslinux.org/wiki/index.php/Comboot/menu.c32

Advertisements

2 thoughts on “Create Citrix Thin Client Live CD

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