Friday, July 31, 2009

A Test Drive of Moblin 2 Beta

Yesterday I was finally able to test drive Moblin, Intel's Linux distribution for netbooks. Moblin has received acclaim for its fast boot time and its innovative GUI, and I have been eager to try it out. Since Intel has tailored the distribution to run only on systems with a SSE3-capable Intel processor and an Intel GPU, my only choice was to let my Atom-powered home server double as a desktop system for a while.

Installing the Moblin Live on a USB stick was a breeze, with clear instructions available on the site. Booting into the desktop was fast, though not as fast as demonstrated on Phoronix, where Moblin has been tested on a Samsung NC10 with a very fast SSD.

As for the user interface, I cannnot but agree with the reviewer mentioned, that it is very appealing and easy to navigate. On my system, animations were slightly choppy, which might have been due to my relatively slow USB flash drive, or the high resolution at which I was running the system (1920 x 1080).

Moblin is a very promising distribution for netbooks. Even during my very brief testing, I found quite some points where improvements could be made, I'm sure in time these minor flaws will be corrected. It seems like quite some OSes are intending to compete for netbook dominance (Cloud, Google Chrome OS, etc). It will be interesting to follow the development.

Thursday, July 30, 2009

A Word of Caution When Connecting Multiple Drives to the D945GSEJT On-Board Power Connector

Some caution has to be taken when connecting storage devices to the on-board power connector of the D945GSEJT. Credit goes to mcnels1, who made a very observant comment yesterday, on my D945GSEJT home server setup with two 1TB Western Digital Caviar Green (1TWDCG) hard drives.

As mcnels1 pointed out, it seems hazardous to connect two 1TWDCG, which possibly require more than double the power that the board is able to deliver. The maximum power draw of a 1TWDCG is, according to the specifications (last page), 1.671A at 12VDC (which translates to ~20W). The D945GSEJT specifications however state (page 19, last paragraph) that the on-board power connector delivers a maximum of 1.5A at 12V (18W).

However, I have so far experienced no problems with the setup, that could be referred to the power supply being inadequate to power the hard drives. I performed numerous reboots (which is when the hard drives would be expected to draw the most power), due to the complications with the setup concerning the Ethernet controller, without any failures. Also, massive read/write operations have been performed without any problems. For example, due to a defective sector on one of the hard drives, the drive was taken offline from the RAID1, after which I tested every sector on the drive, and then resynced the entire 1TB of the encrypted LVM volume. Also, the drives undergo weekly SMART testing, lasting for almost 4 hours, which has so far always succeeded.

This apparent contradiction between theory and practice might be due to the power consumption of the 1TWDCG being far less than the stated maximal 20W. In a product review that I found yesterday, the reviewer has a D945GSEJT system with an IDE flash drive and one 1TWGCG, and states (translated with some modifications for better conformity with English):

... I have an AC-DC adapter from Seasonic which is supposed to have 80% efficiency and, measured before the AC-DC adapter, the system draws about 20W with only the mother board and the flash drive connected. With the 1TB WD Green added, the computer idles at 23W, which rises to 25-28W when it reads/writes.
This would indicate that the maximum power consumption of the 1TWDCG is really 80% of 8W, which is 6.4W. If this is indeed the case, the on-board power connector should have no problems supplying the hard drives.

Nevertheless, a word of caution is in order. As a late reply to one of my readers who considered connecting four drives to his D945GSEJT, I would advise against using the on-board power connector, taking the above information into account.

Tuesday, July 28, 2009

By Request: a Look Inside the Intel D945GSEJT Server

I received a request today to snap a picture of the D945GSEJT board mounted inside the mini-ITX case, so here it is:

In the picture above, I have marked some of the connectors (and left some out, e.g. the USB ports):
  1. Ethernet port
  2. DVI connector
  3. 12VDC power connector
  4. SODIMM connector
  5. Power switch
  6. SATA connectors
  7. On-board power connector for hard drives
The lower third of the machine as shown in the picture is occupied by the mini-ITX PSU, which I do not use. Because of the design of the case, with the hard drives attached to the lid of the case (the lid is flipped on its side in the picture), there is no room for a PCI card. It would be possible to have a PCI card though, if the machine only needs one hard drive. In that case, the PCI card would be attached to a PCI riser attached to the PCI slot on the board.

Sunday, July 19, 2009

Update: Debian Lenny 5.02 Installer and Intel D945GSEJT

When I installed Debian Lenny on my Intel D945GSEJT home server, I reported that the Debian installer did not recognize the network adapter. With the latest version of the installer (5.02), the r8169 module is loaded, and at least on my system, DHCP autoconfiguration of the network connection succeeds. This is a step up from the previous installer, but r8169 is in fact the wrong kernel module, as reported in this post. What you want is the r8168 module, and you can find instructions on compiling that module in the previous link.

Sunday, July 12, 2009

Retrieving a List of User/Manually Installed Packages in Debian/Ubuntu

If you are like me and have been running a Linux system for a while, you inevitably come to a point sooner or later where you would really like to know what packages you have been installing - yourself. In the case of Debian (and friends like Ubuntu), the installer pulls in a lot of packages, and there is no special indication (AFAIK) which packages were installed by the installer, and which packages were installed manually by the user. You might want the list in order to quickly get up to speed on a new installation, or, even more probably, clean up a bit among all those packages that you installed because you thought you needed them, or needed them only once or twice.

I have seen quite a lot of suggestions that you should work with the entire list of installed packages, but that is extremely cumbersome if your intention is to clean up, and if you are dealing with a new installation, you risk pulling in obsolete or conflicting packages. What I wanted was a list with just the packages that I had chosen to install myself.

My solution is a bit brute force, but it works very well. Using a virtual machine manager (I use VirtualBox since it is free), I set up a virtual machine with a similar installation as the one for which I wanted to get the list of installed packages, only in the case of the virtual machine installation, I will never install any packages myself, only keep the base installation up to date. On the virtual machine, I created a list of installed packages with the following command (borrowed from here with slight modification):

aptitude search ~i | grep -v "^i A" | cut -d " " -f 4 > clean.txt

aptitude search ~i lists the installed packages, grep -v "^i A" removes the lines starting with "i A" (automatically pulled in dependencies), and cut -d " " -f 4 > clean.txt filters out the package names (starting at position four and ending with a space). The result is written to the file clean.txt. Perform a similar command on the machine for which you want to retrieve the list of installed packages, substituting clean.txt with another file name, say modified.txt. With the two files in the same directory (on whichever machine), perform the following command to get the list of packages that are listed in modified.txt, but not in clean.txt (here is a reference to set operations available from the command line, and other useful commands):

join -v1 modified.txt clean.txt

If anyone has a simpler solution to the problem, please let me know, but once set up, this works like a charm.

Saturday, July 11, 2009

Lessons from the D945GSEJT Server

I was very happy to discover a comment on the setup of my Intel D945GSEJT home server today. I am glad to hear that my post helped you, Jules.

The home server works very well. I have learned a lot in the few days that the system has been running, and I felt it was time to share some of the knowledge I have gathered so far.

My choice of building the system in a fanless case with a built-in power supply was not the best. A power supply inevitably produces some heat, and with the whole setup being fanless, the harddrives reported temperatures close to 60 degrees Celcius. The specifications of the drives said that this was slightly above the upper safe temperature limit for operation. I changed to an external 12VDC adapter, and got the temperature of the harddrives down to about 40 degrees Celcius, which is perfectly acceptable.

The D945GSEJT board offers two power connectors, a 12VDC connector on the back panel, and a 4-pin 12V ATX internal connector. The Technical Product Specification of the board says that the 12VDC connector is "preferred", but does not in any way explain why that would be so, which is very strange. Connecting a mini-ITX power supply (with one 4-pin connector and one 20-pin connector) requires you to short two pins on the 20-pin connector, since this is the signal that the motherboard normally gives to the power supply to make it start and deliver the correct voltages on all pins. This is not anything I recommend in any way, but it was what I had to do to be able to use the built-in power supply of my mini-ITX case. I suspect that Intel had the idea that you would use some special power supply which is always on and only has the 4-pin connector, but I have not found any such supplies. My case gave me small electrical shocks using the internal power supply, which might have been caused by my unorthodox solution, but it might just have been the power supply that was dodgy. I am glad I switched to the external power supply, which has none of these worries.

Getting acquainted with mdadm for managing the RAID, and smartmontools for monitoring hard drive health was an essential first step in learning to administer my new home server. It turned out that one of my hard drives had a bad sector, and I got to apply this knowledge almost immediately. Emails from smartd started pouring in, telling me about the problem on the drive. The selftests that I had scheduled for the hard drives had fortunately located the error to a sector which was towards the end of the drive, which was probably not occupied by any data. The solution I ended up using was hdrecover, an extremely simple (293 lines of C code) program that tests the readability of each sector on a drive. If an unreadable sector is found, the program writes some data to it, forcing the drive to mark the sector as bad, an relocate it. In my case, being fairly certain that the defective sector was not occupied by any file, this was a solution as good as any. If you want to locate the file that occupies a certain sector, this can be a bit tricky. I found a howto on this subject, but I am not sure how I would get it to work in my case, with partitions on an encrypted LVM partition.