How I Spent My Summer Vacation: Bringing Linux to Nicaragua, Part II

Editor's Note: In Part I of this article, Kevin explained how he ended up spending his summer in Nicaragua and why Linux is finding an audience there. Here, he discusses some of the technical aspects of his work.

As for what I've actually been doing down here, the most significant project to date is getting diskless clients to run with our current install, SuSE 9.0. Diskless clients are important to us because it gives us a clear advantage over Windows when marketing to local businesses and schools. Instead of trying to roll it myself, I decided I might as well utilize the years of work that have been put into the LTSP project and chose the LTSP 4.0 release for this project.

Network Boot Process

The first part of understanding diskless clients is knowing how they boot. Because they have no hard drive, they have to access booting information over the network. The LTSP documentation covers the booting process in detail, but here's a summation:

  • Machine goes through its POST (power on self test) and then looks for ways to boot.

  • If the network card is capable of booting, the machine tries to boot off of it.

  • The card then sends a DHCP request out on the network. This request includes the MAC address of the network card. This is how the whole process really starts.

  • The dhcpd daemon on the server receives this request and looks through its configuration file for an entry matching the MAC address of the client.

  • The dhcpd daemon then responds to the client with the following information: IP address for the workstation; NETMASK setting for the local network; path name of the kernel to download; path name of the root filesystem to mount; and optional parameters to be passed to the kernel, using the kernel command line.

  • The network card receives this information and configures its TCP/IP appropriately.

  • Using TFTP (trivial file transfer protocol), the boot loader downloads the kernel, places it into memory at the correct location and hands control over to it.

  • The kernel then initializes the system and peripherals.

  • As part of how LTSP works, a filesystem image resides on the end of the kernel command line. The kernel grabs this image (again using TFTP) and decompresses it into memory.

  • We give a root=/dev/ram0 argument to the kernel such that it runs its root filesystem off of the image just decompressed into a RAM disk.

  • From there, the kernel continues booting. Once it's ready, it starts X, if you have the X package installed.

  • A request is sent to the login manager on the server (in my case, KDM), which then responds and allows the remote machine to log in.

  • When you're sitting in front of the diskless client, it appears as though you are using the server.

That's the basic idea of how this process works. The LTSP documentation goes into much more detail towards the end of the list, but for our purposes, this level of detail is sufficient. We now can configure each of the pieces in order; the machine will get closer and closer to functional as we go along.

Prerequisites

The first thing to do, as far as I'm concerned, is make sure the network card in your client is capable of booting from the network. This is accomplished in two main ways, either by PXE (Preboot eXecution Environment) or by etherboot. Because the network cards on my clients already were PXE-capable, I went that route. If your network card does not support booting off of the network, ROMs are available for purchase that enable your card to do so in most cases. Often, though, it's cheaper simply to buy a new network card. I recommend Realtek 8139 cards, as I've always had good experience with them. In my experience, however, any modern network card has a bootable ROM.

Also, it is imperative that you understand that all of this configuration is done on the server--not on the client. The client has no hard drive, so it can't store settings. The client will be more successful continually as you go along configuring the server.

Step 1 - DHCPD Configuration

Once you've established this setup is possible with your current equipment, the next step is to configure the dhcpd daemon. First, you need to make sure that dhcpd is installed on your system. It's usually installed with the Server group of packages or something akin to that. You can find out for sure if it's installed by typing whereis dhcpd on the command line. On my SuSE 9.0 system, it's installed as /usr/sbin/dhcpd.

You also want to make sure the daemon starts every time you boot. The way this is accomplished on every system is different, so I'll leave you to your distro's documentation. In SuSE 9.0, it is accomplished by utilizing the DHCP configuration module of YaST, under Network Services. Instead of talking about how to get all the correct values in the config file with YaST, I find it easier simply to edit the file by hand. If you're using SuSE, you must be careful not to re-run the DHCP module, as doing so overwrites your changes.

Here is the dhcpd.conf I currently have:


/etc/dhcpd.conf
ddns-update-style ad-hoc;
allow booting;
allow bootp;

subnet 198.186.207.0 netmask 255.255.255.0 {
    range dynamic-bootp 198.186.207.128 198.186.207.254;
    default-lease-time 21600;
    max-lease-time 43200;
}
group{
    next-server 198.186.207.124;
    filename    "pxelinux.0";
    option root-path "/opt/ltsp/i386/";

    host cieba {
        hardware ethernet 00:E0:4C:84:3E:58;
        fixed-address 198.186.207.127;
        option host-name "cieba";
    }

    host chilamate {
        hardware ethernet 00:E0:4C:84:9A:67;
        fixed-address 198.186.207.123;
        option host-name "chilamate";
    }
}

If you wanted to allow the clients to have dynamic IPs--it doesn't really matter, as they're merely thin clients--you should set up the file like this:


ddns-update-style ad-hoc;
allow booting;
allow bootp;

subnet 198.186.207.0 netmask 255.255.255.0 {
    range dynamic-bootp 198.186.207.128 198.186.207.254;
    default-lease-time 21600;
    max-lease-time 43200;
}

next-server 198.186.207.124;
filename    "pxelinux.0";
option root-path "/opt/ltsp/i386/";


Make sure the IPs your network uses are what you put in the range and fixed address areas, if you're using them. I wish I could give more direction in this area, but it really depends on your network setup. On most home networks, this is 192.168.1.1??.

The most important parts of this file are the next-server, filename and option root-path values. The Linux kernel as a whole is too large to be loaded directly by PXE on the network card. So, to accomplish this, we use a boot loader called PXE Linux. It's included with LTSP. This is the pxelinux.0 file that's referenced under the filename marker. The root path is standard for an LTSP implementation.

As for the clients, the hardware Ethernet option is the MAC address of the network card. This can be found using /sbin/ifconfig. I've elected to give the hosts static IPs, but this isn't mandatory.

Once you have your dhcpd.conf file edited appropriately for your network, it's time to restart the dhcpd daemon to apply the changes. On SuSE, rc<name of service> restart restarts any system-wide service, so go to a command line as root and issue the command rcdhcpd restart. On Red Hat-like systems, this is accomplished with service dhcpd restart. Once the daemon's restarted, start your client on network boot, configured in the BIOS, and see how far it gets.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

thanks

kamlesh's picture

it is working

From Panamá

Okke Ornstein's picture

I've read this story with great interest. I'm a Dutch journalist living in Panama and my wife owns an internet cafe. I spent the last two weeks looking at Linux solutions to the Microsoft nightmare, and had already done a test with Skolelinux. But I think we'll go for Ltsp. It's not that I specifically like the weird commands and sometimes strange and incomprehensible installation procedures that come with Linux - I'm actually a happy Apple user but that is a too costly option for a cyber cafe in this part of the world, unfortunately.

That said, I must say that the developers for these school systems have done a great job to make everything as easy as possible even for illiterates like me. This really is great stuff for countries like ours.

And, I found a billing solution for cyber cafe's using thin clients at http://www.silentcoder.co.za/tiki/tiki-index.php?page=DireqCafe

Okke Ornstein

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Good work.

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

It's fine to meet same people interest in an altruistic mision ..... why don't you try:

Thinstation.sf.net

No NFS needed

all pre-processed ....No need to install compile....etc an best of all

a la carte prebuilt iso images ......

Ask 4 more .... pxes.sf.net .... looks alike

Karlitros

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

We decided to use LTSP because we wanted the users to be able to just sit down and use it like it was a normal computer. No VNC, no starting other programs, just sit down and use it.

That said, LTSP doesn't involve any compiling. And especially with the release of 4.1, the installer is cake (albeit English Language Cake), by following their documentation and/or this article, thin clients are easy. Just a few steps, that's all. (But that's what YaST is for, right?) :-D

Kevin

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

My question is, was Suse speaking Spanish to these people or did
they have to learn enough English to know what's happening?

Installing in Spanish

Anonymous's picture

You can install in any of about 40 different languages. You can also configure KDE on a per-user basis. SuSE offers distributions with the manuals in Spanish.

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Most linux come in different languages. I am in Mexico and I have SuSE but mostly running in english however I remember that I could enable the spanish module.

I used to have mandrake, and they run on a wide array of languages including some not so popular african and indian dialects.

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

It'd be worth looking at Skolelinux. It does all this setup straight out of the box and is aimed directly at schools.

GMc

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

K12LTSP is better in my opinion. It is the most popular LTSP + OS solution out there. It is based on Redhat, has a whole bunch of educational software included and is a turnkey solution if you have a pci nic and video card. They have also been arround a long time.

How do you get a job like this?

Anonymous's picture

I'd be very much interested in how to get a job installing Linux systems in rural areas and Southern countries. I'm a CS student and part-time Linux professional in Germany and I'm looking for something like this.

Are there any job offers on the Internet? I'm especially interested in jobs in South America.

Any hints?

PS: My Spanish is better than my English... ;-)

Re: Linux volunteers wanted

Anonymous's picture

Hello,
I am working with a non profit organization in Tanzania-East Africa that is looking for volunteers to introduce linux in the region.
For more info,please contact:joseph@icarusnetworks.com
Thank you.

Re: How do you get a job like this?

Anonymous's picture

I got this job by responding to an online job posting on a local LUG. Just keep looking, it'll jump up and slap you in the face. :-)

Kevin

Re: How do you get a job like this?

Anonymous's picture

Try idealist.org, there might be something.

Re: How do you get a job like this?

Anonymous's picture

I think there was this organization called geek---sumthing... that were dedicated to bring IT to third world countries. They have rural areas in India and Ghana as well as other countries. I am sorry I dont have the name but it was a very similar name to another organization that brought education to third world coutries, but it wasnt geek-peace nor geek-unicef ... google might help you.

Re: How do you get a job like this?

Clay's picture

I think you are are talking about http://www.geekcorps.com/

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Boring.........................Show us some REAL Articles....

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Let's see. The poster is spreading Linux, is helping children with education, is making a cost savings argument for Linux, is helping the poor, and is donating his time to do something good. The author is giving back, so to speak.

The inspiration in this article is enough reason to justify writing and reading it. Not to mention, the author is also promoting LTSP, which is used in many a school.

The "Boring.........................Show us some REAL Articles...." rant was just a waste of bits and shows a complete lack of imagination and inspiration.

Thank you, Kevin Brandes, for donating your summer to the children of Nicaragua. I look forward to being inspired further! I feel challenged to do what you are doing.

OK, Anonymous, what are you going to do for the good of others? (In other words, put up or shut up.)

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

The fact of the matter is that this article should have been in Reader's Digest and not Linux Journal. I hate people who try to mix politics and humanitarianism with computing. If you want to save the world fine, I'll cast a vote for you to receive a Nobel Peace Prize. Computers are not about Race, Religion, Politics, Humanity or anything else. We're not trying to save the world, we're doing what we love. All I'm saying is that I would prefer technical articles to people who believe they made some type of real contribution to the world by setting up a Linux Server and feel they should get some type of recognition for it. Linus wasn't trying to change the world, neither were Dennis and Ken, they were just doing what they liked and weren't trying to get recognized by anyone.

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

It's silly that I'm even replying to this, but there is a good point to be made. How many times has Microsoft used helping the poor as a PR move?

Obviously, you haven't read Linux Journal for very long.... Linux Journal has *plenty* of these types of articles, over the past few years, but they could do even more. (Thank you, Linux Journal). Inspiring articles tend to motivate people, promote good will and humanity, and garner support.

I can't see how you justify your position. It sounds like all you want is a dull, dry technical journal, which is uninspiring, does not promote good will and humanity, and does not garner support. There are plenty of HOWTO's and man pages on the 'net, in this vein. See http://www.google.com/ for more information about how to do Linux Terminal Servers, if you don't like it.

It sounds like you are motivated by selfish motives -- what you want, not what can be done for the good of others. The author of the article, and most of the responders, so far, see the value in helping others, for its own sake. In addition, though, it was a good thing that Linux got the case study, got people into license compliance, and gave poor people tools they didn't have, wasn't it?

Obviously, the editors of Linux Journal see it that way, too. Heck, the LTSP thinks so, otherwise what's this K12 project they got going!?!?! Take a look at how LTSP helps schools. Get inspired by THEIR articles while you're at it.

If we can mix the technical side with the human side, there is no down side, correct? If you don't think so, then are you really human, or are you just somebody that doesn't want to face the world and help people with real problems? Chip in and help where you can, why don't you?

Some day, when you die, what do you want people to say aboubt you, during this life? I'd certainly rather people say something like, "He was a humanitarian. He helped uneducated people learn how to read and write and use computers," than to hear people say, "He sure liked reading his technical manuals." Wouldn't you? (In case you think I'm being overly dramatic, think again and reread the main article.)

If LJ isn't a place for this, could you name a place for it? (The correct answer, of course, is "No.")

It was so nice to see yet another article in LJ where somebody uses Linux to help people. Thanks again for promoting good will, Linux Journal. I can't wait to see plenty more of these articles. (Remember, too, that LJ is running a MAGAZINE with a corresponding web site, not a FAQ/HOWTO site....)

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Like I said, if you want a Nobel Peace Prize I'll cast a vote for you, but I doubt you'd win. I hate these posers trying to turn computing into some type of Noble Cause mainly due to the fact that they have nothing else to do. This article was dull because it lacked any insightful information, which most people come to expect from Linux Journal. With all the heart felt reasons you gave in your last post, you should go work for the UN and stay away from the Computer Industry.

My $0.02

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

what a jerk!

I am willing to bet you're a Script Kiddie wanna-be that sits at home and runs linux because it is L33T, not because you actually care about supporting the Open Source cause or anything that the GNU or GPL Licenses embody.

I agree with the rest of the people who had comments to make about your original post, I enjoyed reading this article, and I think what this person is doing is great. What you are failing to see is that People like this are the ones who will help us ultimately bring Linux to a position where it is as well known as Windows, or MacOS.

and for the record No I don't want a Nobel Peace Prize.

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Also, for the record, I wrote this article because it was asked of me by my boss, the publisher of Linux Journal. I was not attempting to attract attention, but rather, to fulfill my commitment to my employer.

That being said, it was a wonderful experience, and I'm sure many will enjoy reading about it.

Kevin

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

I'm pretty sure that Linus Torvalds would be delighted to hear that what he started is making a difference in other people's lives. He started Linux as a pet project, probably partly to see whether it could be done, but then he did something amazing: he set it free for all to use and modify, enhance and distribute.

The fact that it makes its way into the third world and enables people over there will eventually mean that it will be improved even further. This will ultimately benefit Linus and all of us as we constantly get better software to use. All this inspires other people to start projects like Wikipedia and Wiktionary. So it doesn't remain confined to computing either.

Nothing boring about that. Interesting things are happening all around us and all of that has become possible thanks to the existence of the Internet. Describing what he is doing and how he goes about it is another great way for the author of this article to give back to the community.

Muchas gracias, (No, mi idioma natal no es el castellano) desde Europa

Jo

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

I my opinion, it's a GREAT article my friend, I'm on Mexico and in our rural areas we're in the same situation as Nicaragua .

We have a goberment's big project called emexico, but most of it is hooked to M$, just because nobody with the guts has showed the goberment that giving rural people access to IT can be made easy and cheap with Linux.

When I was a student I taught computer basics to kids on a very far town in Queretaro with only a 486, MS-DOS, Works and Banner (can you remember those things?)... it's really amazing how this "trash technology" made a difference in their lifes and education.

I'm training my self to do the same project again but using Linux, so maybe in the future you'll see another boring article "Linux in Mexican rural areas".

Greetings from Queretaro, Mexico.
Quetzalli

PS.. not all of the people in the world does clustering, broadband projects, space research and so on... on my opinion, the beauty of Linux is the power to help people.

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Do you have any constructive suggestion to the author, who is giving his time & effort to share information? Or perhaps you want to show us your real articles?

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Hello Kevin,

I am wondering if you found or heard of a good place to find Java programmers in nicaragua. I am looking to develop a small application and I was thinking of nicaragua as a place to do it.
Sherif6@sympatico.ca

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

Hello Kevin,

I am wondering if you found or heard of a good place to find Java programmers in nicaragua. I am looking to develop a small application and I was thinking of nicaragua as a place to do it.

Re: How I Spent My Summer Vacation: Bringing Linux to Nicaragua,

Anonymous's picture

In a sense, he's right. It is, after all, really just a recap of the LTSP docs - so it'll be dead boring to someone who already uses and understands network booted linux thin clients, especially LTSP.

That said, it's well written, concise, clear, and a heck of a lot better than merely a pointer to LTSP. I think the article is well worth while, and certainly doesn't deserve the less than helpful criticism of the OP.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState