Showing posts with label Thin Clients. Show all posts
Showing posts with label Thin Clients. Show all posts

Saturday, March 30, 2013

LTSP On Fedora 18 using client created on Ubuntu 12.10

Exploration of LTSP turned out to be a very interesting challenge. My motivation was to write a monthly column for Linux For You.

My primary system runs Fedora 18. I thought that I would be able to get the scripts to run on Fedora 18 in spite of the explicit caution that Fedora 15 onward is not supported. I haven't succeeded so far but I did succeed in getting an client image created on Ubuntu 12.10 to run on Fedora 18.

I installed the server scripts from the repository for experimental version of LTSP 5 for Fedora 18. This ensured that that the ldminfod version was compatible with the ldm version on Ubuntu 12.10 client.

Ubuntu uses nbd by default. Unionfs root was not working with NFS root on Ubuntu as well. So, nbd version 3.1.1 needed to be installed on Fedora. The version in Fedora repository is 2.9.20.

LTSP scripts run nbd server using xinetd while Ubuntu 12.10 runs nbd-server as a system service. Since the xinetd option did not work, nbd-server was started using a system service script. The key extract from nbd-server script is:

DAEMON="/usr/bin/nbd-server"
test -x $DAEMON || exit 0
case "$1" in
    start)
    daemon $DAEMON 10809 -C /etc/nbd-server/config
The port has to be 10809 to be compatible with the -N option used by ndb-client on Ubuntu client.

/opt/ltsp/amd64, /etc/nbd-server and  /var/lib/tftpboot/ltsp/amd64 directories was copied from Ubuntu to Fedora. The following were the final steps:

  1. Run ltsp-update-sshkeys
  2. Run ltsp-update-kernels
  3. Run ltsp-update-image amd64 -f
  4. Change the dhcpd configuration files to use the amd64 directory in tftpboot instead of i386. I modified the /etc/dhcp/dhcpd.conf file and did not use the ltsp-dhcpd script.
If all has gone well, you will get a LDM login screen with Ubuntu theme. The sessions available will be the ones on Fedora 18 and you should be able to login to a session using your Fedora 18 credentials!


Friday, February 22, 2013

Booting Porteus over the LAN from Fedora 18 server

Continuing my experiments with diskless options, I was going through RAM resident distributions on Wikipedia. Porteus appealed to me as it was able to run KDE desktop from RAM. The newly released version is packaged to boot off the network from a Porteus system with no additional effort.

I wanted to boot from my existing Fedora 18 system and I wanted to avoid using tftp. The recipe I used is as follows:

In order to make sure that both tftp and html could be used:
$ sudo ln -s /var/lib/tftpboot /var/www/html/tftpboot

Obviously, httpd and dhcpd are enabled. There is no need to enable tftp in /etc/xinetd.d/tftp. The following steps were needed in the tftpboot directory:
$ sudo mount -o loop Downloads/Porteus-v2.0-x86_64.iso /mnt
$ sudo mkdir /var/lib/tftpboot/porteus
$ sudo cp -r /mnt/boot/syslinux/* /var/lib/tftpboot/porteus
Now, we need to edit /etc/dhcp/dhcpd.conf. It's content (for my network) will be:
# dhcpd.conf
#
# configuration for pxe from http://docs.fedoraproject.org/en-US/Fedora/17/html/Installation_Guide/s1-netboot-pxe-config.html
#
  option space pxelinux;
  option domain-name-servers 192.168.1.1, 8.8.8.8;
  option pxelinux.magic code 208 = string;
  option pxelinux.configfile code 209 = text;
  option pxelinux.pathprefix code 210  = text;
  option pxelinux.reboottime code 211 = unsigned integer 32;

  subnet 192.168.2.0 netmask 255.255.255.0 {
          option routers 192.168.2.1;
          range 192.168.2.200 192.168.2.210;

          class "pxeclients" {
                  match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
                  next-server 192.168.2.1;
                  option pxelinux.pathprefix "http://192.168.2.1/tftpboot/porteus/";
                  filename "http://192.168.2.1/tftpboot/porteus/pxelinux.0";
          }
  }
 Finally, we need to copy the base os files into the http root, i.e.
$ sudo cp /mnt/porteus/base/* /var/www/html

We need to disable the welcome screen for Porteus to successfully boot from the apache server. So, comment all lines in
/etc/httpd/conf.d/welcome.conf.

Now, restart the httpd and dhcpd servers.

On the client machine, I am using grub2. The client is configured as follows:
  1. Download ipxe.iso
  2. Extract ipxe.krn from the iso and copy it in /boot of the client.
  3. Edit /etc/grub.d/40_custom and add the following lines:
    menuentry "ipxe"{
          linux16 /boot/ipxe.krn
    }
  4. Create a new grub.cfg
    Fedora:  /boot/grub2/grub.cfg using grub2-mkconfig
    Ubuntu: /boot/grub/grub.cfg using grub-mkconfig
Reboot the client. Choosing the ipxe option should bring up the Porteus boot menu and it should boot into kde or lxde depending upon the option selected.



Sunday, March 21, 2010

Weird Keyboard Malfunction

It was a weird experience. I was working on Arch Linux in a VM( Sun VirtualBox) in a remote X session from a thin client. Suddenly, the keyboard seemed to have stopped working. Function and control keys seemed to work partially. But normal keys were totally ignored. Ctrl-alt-Fn also did not behave correctly.

I naturally assumed that the VM must have caused the problem.

I rebooted the thin client - same behaviour. I switched from LXDE to Gnome. Same behaviour. Rebooted the main machine - still the same scene.

The same user worked fine on the main system; however, I realised later that the desktop was KDE.

I then tried KDE and keys worked fine.

I assumed that I must have updated some package which caused the problem. But the last update was four days ago. Hence, that was not a likely cause. Also, I could use the gnome desktop using an alternate account.

After quite a bit of struggle, I found the problem to be related to SCIM. I must have pressed some short-cut keys which caused the keyboard to seem to be abnormal! At least, I assume so because after using the input pad with the mouse and exiting from SCIM, the keyboard has been working fine.

Hopefully, I will find time to reproduce the problem and add an update to this post.

Saturday, February 13, 2010

Working in the Winter Sunlight

Winter sun in North India really feels nice. It seems silly to be sitting in a cold, dark room when I could be enjoying the final few days of sunlight before it gets miserably hot.

I tried using my netbook but it was virtually invisible. There seems to be hope - OLPC-like hybrid screens on commercial netbooks. "Put simply, we've never seen a laptop display look as good in broad daylight as Pixel Qi's display"

My next netbook will have to have such a screen!

Monday, September 14, 2009

LXDE on Fedora 11 Diskless Machine

I have a five year old machine without a hard disk which I boot using a liveusb.

I have been creating a custom livecd by adding a multimedia components from the rpmfusion repository. I decided to explore the option of lxde on the liveusb after reading an article on Lubuntu in Linux Magazine. I modified the fedora-livecd-multimedia.ks replacing @gnome-desktop group by @LXDE group. As before, I retained mplayer and the gstreamer bad and ugly plugins.

The creation of the livecd and the liveusb was smoothe.

Booting created one problem. Instead of gdm, slim was used as a simple login manager, which would not give me the option to switch from gnome-session to LXDE session. I just created a file /home/liveuser/.xinitrc with one line -
startlxde

That was it.

Anyway, I normally use this machine in init 3 setting, and usually use it start a remote X session on my main desktop.

Icewm is restrictive. Advantages of XFCE has been diminishing as it has become more functional. So, LXDE does seem to be a very good compromise. I am now also using it as the default session for remote X sessions. The snappiness of the desktop is impressive and ideal for the work I do from the diskless machine.