home | projects | about

Sunday, January 25, 2009

Installing Debian on a MSI Wind PC

I've been putting together a new backup box using the MSI Wind PC. I ran into a couple of issues that I'll mention here - maybe it will save someone else some time!

My approach was to boot from a USB key, and install the appropriate network install (netinst) .iso. This installs a basic system, and from there you're off to the races. The first set of issues for me was discovering how to create a bootable USB key, and what to put on the key. The second set of issues surround the RealTek 8111C network controller. The default Lenny kernel (2.6.26-1) has a driver r8169 built in, but it just doesn't work reliably, most notably the network device would hang for me when doing large transfers. I ended up going to the Realtek website, and getting the source code for the latest driver, which is r8168 (they clearly rolled back the driver), compiling it and modifying my install to use it. This is very easy to do. I'll list the key points below.

To boot from USB key and install the latest Lenny netinst.iso:

1. Follow these instructions:


But for boot.img.gz, use this image:


and for the netinst.iso, use this image:


2. Mark the USB partition as bootable, if it isn't already. You can do this with /sbin/parted.

3. Install a master boot record:

install-mbr /dev/xxx (where xxx is the usb device)

install-mbr is part of the mbr package on Debian.

Now plug your USB key into your Wind PC, and boot. If the hard drive does not have a bootable image on it yet, the bios will boot from your USB key. If it does, you'll need to go into bios setup and tell it to boot from USB first, before the hard drive.

2.6.26-1 has the r8169 driver built in, so Debian installer will detect your network and get an IP address over DHCP. I was able to go through the install without problems (including installing software from the repository). However if you use it for any length of time, you will encounter this bug where the network device simply stops working. You need the latest version of the driver. Once you are done with your install, follow the directions listed here:


I suggest a small modification to the instructions: build the driver before removing the old one, because you'll find you will need to install components to build correctly, like kernel headers, and possibly make. After building and before installing, remove the current r8169 driver, install the new one, and proceed as usual.

Cheap backup box vs. Drobo

Recently I needed to add another backup destination to my pool. On the search for how to build a cheap Linux box, I found these components and have put one together:

- MSI Wind PC, comes with Intel Atom cpu, for $140 from newegg
- 2gig memory for $27 from newegg
- 1T drive for $120 from newegg

For a total of $287. For comparison, the cheapest standalone, network addressable drobo is $430 (for the drobo, which is a USB device), and $190 for the droboshare (a network device that the drobo plugs in to). That comes to $620. Clearly when it comes to the drobo, you're paying a hefty premium.

Why use a drobo? I have borrowed one that I am experimenting with to understand the tradeoffs. It has hung i/o on my Linux box twice(!), so I am now trying it with a droboshare. It specializes in ease of use and handling hard drive failure gracefully, at the tradeoff of higher cost, less flexibility, and less transparency (it is a magic box and your files are stored in an opaque format, for example).

An advantage of the Linux box over the drobo is flexibility. I can install the necessary software on it to use it remotely in a secure way, for example. Drobo has added "droboapps" but the capability is limited, requires building tools with a special toolchain, and there are hardware limitations, like not a lot of memory to play with. With my Linux box, I have 2gig for $27.

Another advantage of the Linux box is use of a standard file system for storing files (ext3 for example). If I run into trouble with a corrupt disk, it is comforting to know it is in a public format. With drobo, the file system is opaque.

From my point of view, the Linux box with a single drive is also simpler than a drobo. The drobo is emulating a hard drive, with private firmware and 2+ drives. It's a neat idea, but it is more complex, and there are more things to go wrong that are less easy to troubleshoot. A linux box with a single drive is a very standard set up.

The biggest selling point of a drobo (for backup) in my opinion, is the ease of use. No hats with propellers on them required. However if you're evaluating ease of use that highly and you're on a Mac, Time Machine is even easier.