Sunday, August 1, 2010

Ubuntu Experiment

I've been interested in learning about embedded system programming especially as it relates to real-time software and operating systems. This has all been spurred by my interest in the software in used by various areas of our space program ( see post Exploring the Milky Way, May 15, 2010). I did a brief search around job postings for aerospace and NASA type software eng. openings, found very little Ada, the language used to program Cassini, did find a few related VxWorks, real-time C++, POSIX C, so thought it would be worth my while to go back to programming in C/C++ on Linux environments, especially as Embedded Linux is growing in popularity[Yaghmour, Building Embedded Linux Systems, 2003].

To move towards that goal, I needed a Linux development system. I didn't want to dual boot one of my existing Windows machines and possibly deal with driver hell.

Got a machine the other day. Nothing cutting edge. AMD Athlon II X2 215 (Dual cores, ~2.70 GHz). 4GB Memory, 500GB hard disk, NVIDIA® GeForce® 6150 SE. Good thing is that the case has a slim profile, 10.4" H x 3.9" W x 14.6" D. I wanted something small and quiet so I could leave running as a server and work on remotely. It came with Windows 7 and the obligatory set of crappy trial software and spyware. Also bought a book for some programming practice: GNU/Linux Application Programming

I went with the Ubuntu Linux distribution. Created an installer CD with the 10.04 LTS 64 bit Server Edition.

Installing was a simple(!) process, the installation documentation on the Ubuntu site is pretty good, if verbose. No snags were hit, though because I chose the Server edition it didn't come with the Graphical Installer option, though its not like there were any shell commands you had to run during the install. Since I didn't care about the pre-installed Win 7 OS, I didn't have to bother with creating any partitions, I just overwrote the whole drive as one big Linux partition.

Once it booted up after install it came to the default shell prompt. There is no desktop in the Server edition. A quick google search gave me the command to install the Gnome desktop. This was plugged in

$ sudo apt-get install ubuntu-desktop

That probably took longer than the install itself. In any case it loaded up fine with a snappy new purple themed Ubuntu desktop. From start to end it was probably around 4 hours of time.


Ubuntu Gnome desktop

One odd thing is that during the server install you are prompted for what kind of "server package" you want to set up. I chose Java/Tomcat, though I may not even use it. I can find no evidence that Java was installed so I am not sure what that was supposed to do.

Startup now takes under 10 seconds I would say, it is incredibly smooth.

I tried to connect remotely from my windows PC using PuTTy, but no luck, there was no SSH listener running on the server. You have to enable it by installing the SSH packages.

$ sudo apt-get install ssh

That worked and I could connect via PuTTy SSH over port 22. Trouble is you needed to connect by the IP address of the box, you apparently can't resolve the Linux server's machine name from Windows. Fine, so I had to add an entry into my Hosts file, C:\Windows\System32\Drivers\etc\hosts. Its funny that Windows to Windows doesn't require this to resolve the machine name, but Windows to Linux doesn't work. I noticed that the Linksys router administration site did recognize the Linux server's name in the DHCP Clients Table.

In any case minor issue.

The other thing I've found is that Adobe Flash plugins doesn't seem to install, I tried the .apt and the .deb versions offered by Adobe, neither worked, getting "Architecture Not Supported 'I386'" errors. Great job Linux! I would guess it may have to do with 64-bit vs 32 as I believe Flash doesn't have any native 64 bit versions, at least not on Windows.

Next step is to try to set up VNC in order to make a remote desktop connection from my laptop to the new server. We do this at work with our Linux Oracle database host, so I know it works well.

No comments:

Post a Comment