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.



Thursday, February 21, 2013

Booting over network - Use ipxe and forget etherboot/gpxe

I was playing around with diskless options and decided to see if I could boot Puppy Linux over the network. As usual, it was easy to find a recipe on the net. I got the gpxe boot linux kernel image for forcedeth driver.

The surprise was the terrible performance I got on a 100mbps network. I did not wait for it to finish booting! On a 1GB network, the performance was 'merely' bad. I did not expect tftp to be so bad!

Searching the net, I realized that gpxe allows html as the protocol instead. There was no change if I used pxelinux.0 and it was even worse if I used gpxelinux.0! I tried pxelinux.0 and gpxelinux.0 from version 5.01 of Syslinux with no improvement. However, the performance was better on my lenovo netbook which needed the r8169 driver. The performance using html protocol was still not any better.

The search for an answer led to the ipxe project. Mercifully, the ipxe.krn from the iso file worked for both the cards. Now, the performance over html was significantly better. It took half the time to boot Puppy Linux using html protocol.


Friday, January 18, 2013

Upgrading to Fedora 18 using Yum - Nouveau causes system freeze?

The documentation for upgrading fedora using yum seems to be much better than before. A very nice script which automates the instructions was terrific. The upgrades of my desktop and the netbook were very smooth. After the upgrade, I installed the Cinnamon desktop as well. It is very nice though I will stick to KDE as I am now comfortable with it.

There was, however, a surprise on the desktop. On booting into Fedora 18, the display vanished and the system hung. The system came up in muti-user mode but not in graphical interface. Gdm was the problem. I switched to kdm. The login screen came and was fine in KDE. However, the system again froze when I tried Cinnamon or Gnome desktops. LXDE worked but the system froze as soon as I started Firefox!

KDE desktop was working with desktop effects disabled. If I enabled them, the desktop froze.

The desktop worked fine with the nomodeset option for booting the kernel. However, it was using the vesa driver. So, the problem is with nouveau driver on "GeForce 6150SE nForce 430" hardware.

Another curious result. The system is working fine with the kernel 3.6.11-1.fc17.x86_64 from fedora 17, which has made it possible to continue with Fedora 18 on the desktop.

Need to reconfirm the problems I faced on the desktop as I did not find a bug report with similar issues.

On Lenovo S10-3, I have so far not faced any issues related to the upgrade.

Monday, December 31, 2012

FBReader on Android

Finally, I used the FBReader on an Android tablet. It is far easier to read on it than I had expected. The 7inch screen is a very convenient alternate to the paperback.

I ended the year 2012 by reading two stories - perhaps symbolic for the last day of the year.

Kurt Vonnegut's 2BR02B and Kafka's Metamorphosis.

I had read Metamorphosis 40 years ago and its impact had been so strong and saddening that although I had downloaded the book months ago, I had been hesitating to read it again. Yesterday, I heard Kafka's A Hunger Artist and overcame my hesitation. Rereading it was an amazing experience even on a tablet.

Saturday, November 3, 2012

Renewing and speeding up my desktop

I had decided to buy a new desktop as the current one seemed too slow. It just did not seem useful to buy more cpu cores for primarily browsing the web.

I had been looking for solid state disk options for the last few months after reading about their prices crashing. Unfortunately, this was not reflected in the prices of these disks in my area. However, recently I found an online store offering a reasonably attractive price for a 60GB SSD. It was delivered to me the day I read Linus Torvalds"Get thee behind me, Satan" comment . A very nice coincidence.

Indeed, my desktop's performance now is terrific. I can save it from a landfill for another few years :)

Saturday, August 11, 2012

VBA Macros of Indian Income Tax forms failed on current LibreOffice

I had experimented with filing Indian tax returns using OpenOffice earlier. Last year, I had used LibreOffice and filed my return. The effort was minimal as I had not felt the need to document it.

This year, the result was painful. The simplest of forms failed with LibreOffice 3.5 and I could not even make any sense of the problems. I tried older versions (3.4) that I found on some of my partitions and those failed as well.

In desperation, as the deadline was approaching, I downloaded OpenOffice and, surprisingly, that worked on ITR1 (simplest return). However, editing the macros needed for the other forms was a pain. Running the macro from within the editor started the execution from the first line of the file and not from the selected macro. I found the behavior confusing in comparison to LibreOffice and preferred to give up :)

I realized that I had used version 3.3 last year and I had an old partition with an old version of ArchLinux - which had the 'right' version of LibreOffice. The process of filling the tax return forms was very tedious. I had to find the password for the sheets, unlock them and make some manual changes to the cell formulas. However, at the end of it, I did manage to submit the returns using the open source tools.

I had planned to experiment and see if I can find out what changed from LibreOffice 3.3 to 3.4 to cause this 'regression' but now I will wait till the 3.6 version is available through ArchLinux or Fedora.

Meanwhile, I plan to preserve the old ArchLinux partition for next year and, hopefully, thanks to this entry, I won't struggle too much.