May 26 2008

Next Paris ALT.NET Meeting

Tag: ALT.NETSymon Rottem @ 8:11 am

For those of you who can make it, the next ALT.NET Paris meeting is going to be held next week on Wednesday 4th of June at 3, Place des Deux Ecus, 75001 Paris. The event should be nice and informal and will cater to both Anglophones and Francophones if the last event is any type of yardstick. Bring your brain, your mouth and any other equipment required to transport or assist those two aforementioned items. Oh, and don’t forget a sense of humor… :)

Edit: It’s worth noting that the Paris ALT.NET Google Group is the best place to watch for updates or changes to any Paris ALT.NET meetings. I’ll do my best to post if there are any changes, but I wouldn’t want you to get caught out.

May 06 2008

ALT.NET Paris – Technical Talk and Beer

Tag: ALT.NETSymon Rottem @ 8:38 am

In my last post I completely forgot to include the other interesting thing that happened during the last week; I got a chance to catch up with other like minded ALT.NETers here in Paris!

It was a good evening – there were five of us; three Francophones and two Anglophones, so the group wasn’t too big and we all got to chat together. We met up at the Frog and Rosbif which is an expat bar for the British who want to relax with their own kind but it turned out to be too loud and crowded on a Wednesday evening for us to have a comfortable chat…who’d have thought? As it was we relocated to a quieter (and more classically Parisian) bar across the road and settled in to talk and sink a few beers.

We ended up talking about a pretty wide range of topics; F#, Spec#, IOC containers, TDD, Design Patterns and NHibernate to name but a few. Everything was fairly general this time around but we’re just starting to get to know each other. I suspect we’ll start digging deeper into each other’s knowledge bases and get into some stronger debates when we’ve met a few times. :)

As seems to be the way around us language crippled Anglophones the general discussion went forward in English, and that seemed to work out quite well for all involved. I’m hoping that next time we’ll have more people which will mean that any Francophones who aren’t comfortable in English can split off to talk to other Francophones and likewise for the Anglophones in the group – mix and match. Me, I think I can get by these days in either group as long as we stick to technical conversations…

Anyway, we’ve arranged to meet again on the first Wednesday of June; anyone who’s interested can drop me a line or watch on the Paris ALT.NET mailing list for updates. The more the merrier and all are welcome.

Finally, thanks must go out to Robert Pickering who was kind and organized enough to make the event happen at all, so thanks Robert!

May 05 2008

Mounting Removable Drives At Boot In eeeXubuntu

Tag: linuxSymon Rottem @ 10:53 pm

Now that was more interesting.

Today I managed to solve the question I asked in my last post, namely how does one set up a removable USB drive to automatically mount at boot. I was trawling around and not getting anywhere when I left you last.

My next course of action was to impose upon a colleague who has more Linux experience than I do and he pointed me to setting up mount commands to execute during start up and, more importantly gave me a quick overview of how the startup process works in Linux. He’s got himself an Eee PC too, so he’s been around the block, but he uses his as it was meant to be used – as a portable unit.

Anyway, based on his advice I found this page which provides an excellent overview of the startup process and scripting in Linux and that page gave me the idea of using the /etc/rc.local file to execute my mount commands.

Before that, however, I decided to clean up my /etc/fstab to use the UUID of the drive to make things a little more reliable. To do that I needed to find out what the UUID actually was…fortunately in the Ubuntu Linux disks can be found under /dev/disk/by-label which shows the label of the disk (useful for identifying a drive for a human being) and /dev/disk/by-uuid (which is better for computers to identify a disk).

By executing…

 ls -la /dev/disk/by-label

…I get the list of disk labels and the corresponding device it’s mounted as for the moment:

total 0
drwxr-xr-x 2 root root 100 2008-05-05 23:13 .
drwxr-xr-x 6 root root 120 2008-05-05 22:58 ..
lrwxrwxrwx 1 root root  10 2008-05-05 22:58 Big\x20Disk -> ../../sdb1
lrwxrwxrwx 1 root root  10 2008-05-05 23:05 Media\x20Disk -> ../../sdd1
lrwxrwxrwx 1 root root  10 2008-05-05 23:13 PORTABLE -> ../../sde1

And then by executing…

ls -la /dev/disk/by-uuid

I can see the UUIDs of the disks and the same corresponding device.

total 0
drwxr-xr-x 2 root root 140 2008-05-05 23:13 .
drwxr-xr-x 6 root root 120 2008-05-05 22:58 ..
lrwxrwxrwx 1 root root  10 2008-05-05 19:31 22dc6988-36c5-4e98-976b-321aa3f04cba -> ../../sda1
lrwxrwxrwx 1 root root  10 2008-05-05 22:58 2C300B22300AF31E -> ../../sdb1
lrwxrwxrwx 1 root root  10 2008-05-05 23:13 584C2EE74C2EBF9C -> ../../sde1
lrwxrwxrwx 1 root root  10 2008-05-05 19:31 d32d39d4-cbac-41ba-b9c5-b08b95ef5286 -> ../../sda5
lrwxrwxrwx 1 root root  10 2008-05-05 23:05 EC00D02C00D0000E -> ../../sdd1

So, since I now know that the disk with the label PORTABLE is corresponds to device sde1 and that sde1 also corresponds to the UUID EC00D02C00D0000E…I think you get the idea.

Now I want to mount each of these drives under a single folder so I can expose that folder as a Windows share to access all of these disks from across the network, so first I’ll create a new folder on my root filesystem – /storage. Next I’ll create a subfolder for each of the disks I want to mount; I’m going to base the names on the labels of the disks:

sudo mkdir /storage
sudo mkdir /storage/big
sudo mkdir /storage/media
sudo mkdir /storage/portable

Next, by adding each of these to the /etc/fstab file I can configure the system with some information about how these filesystems should be accessed and mounted. Executing…

sudo nano /etc/fstab

…opens the fstab file for editing (I’d recommend making a backup first to be safe) and then I can add the new lines for the new mountpoints at the end of the file:

# USB disk mounts
/dev/disk/by-uuid/584C2EE74C2EBF9C /storage/portable ntfs nls=utf8,umask=0222 0 0
/dev/disk/by-uuid/2C300B22300AF31E /storage/big ntfs nls=utf8,umask=0222 0 0
/dev/disk/by-uuid/EC00D02C00D0000E /storage/media ntfs nls=utf8,umask=0222 0 0

Each of these lines is made up of the device path (using the UUID version we determined earlier), followed by the folder to mount it to and some additional information about the filesystem which I won’t go into right now; you can do some research of your own if you need to know!

Once the file has been saved you can test the mounts by executing…

sudo mount -a

…which will mount the filesystems using the fstab file. At this point if I get a directory listing for /storage/portable I can now see the contents of the USB disk! Woohoo!

So, on to the final step – getting the drives to mount during the boot process. I did this using the /etc/rc.local file. In a default Ubuntu installation this file does nothing but it’s a good point for adding some final steps of your own during the boot process.

The file ends with an exit 0, so before that line I added my mount commands to mount each of my drives:

#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.

mount /dev/disk/by-uuid/584C2EE74C2EBF9C /storage/portable
mount /dev/disk/by-uuid/2C300B22300AF31E /storage/big
mount /dev/disk/by-uuid/EC00D02C00D0000E /storage/media
exit 0

After that’s saved, reboot and voila! Auto mounted removable disks!

May 05 2008


Tag: linuxSymon Rottem @ 8:45 am

Well that didn’t take long.

Continuing on my last post about setting up an Eee PC as a server I’ve gone ahead and replaced the existing software on my Eee PC with a fork of Xubuntu called, funnily enough eeeXubuntu that has built in support for all the Eee PC hardware and is optimized for for it’s itty-bitty screen.

Not too hard, I must say. The folks at have been good enough to set up a wiki with simple instructions for putting the LiveCD image onto a USB key to install (since the Eee PC doesn’t have a CDROM) and the installation was smooth sailing. Everything good, everything easy, no exceptions. In about 30 minutes I had a desktop login, wireless and wired network connectivity, everything.

The next step was to get a LAMP install on the machine. After a little searching around I discovered that there’s a utility provided with the distro called tasksel that provides a simple set of check boxes to set up LAMP, SAMBA, alternate desktops and more. There appears to be a bug with tasksel that causes it to hang when the install gets to 100%, but everything seems to install OK. At least I know Apache is running; I can reach it from the other machines on my network through a browser.

Wow – I’m well underway.

Next step was to get printer sharing working. I plugged in the printer – it was auto-detected. The printer control dialog offered me the option to share the printer…done. Then I added the printer to my Windows notebook using the add printer wizard – things were a little different there; I had to use the internet network printer approach rather than the way I normally would; that took about 10 minutes research.

Hmm. This is all too easy. Am I actually going to learn anything here?

Now to connect my real storage. Since the Eee PC only has 4Gb of onboard storage I’m going to supplement it with removable USB drives and I’m going to expose that using Windows shares. Since I installed SAMBA when running tasksel above I should be able to plug in and share….

Ok. Now I’m learning.

After about 6 hours of persistent stuffing around I’ve managed to get it so that the USB drive will always appear in the same device location and I’ve managed to edit the /etc/fstab file so I can get it mounted to a known location using sudo mount -a and I’ve shared that I’ve shared with SAMBA. Woohoo!

But as with all learning (especially when the curve is steep) there’s a point where you get stuck; I can share the folder, but I can’t get the removable USB disk to re-mount itself on reboot. I can manually mount it by executing sudo mount -a again, but it won’t happen automatically and I don’t want to have to log into a console to get it going again after a reboot.

Since it’s now after midnight I’m going to pack it in for the day, but if anyone’s got any ideas on how to get the drive to mount automatically on boot I’d love to hear them.

May 04 2008

Using an Eee PC as a Server

Tag: linuxSymon Rottem @ 6:50 pm

Well, it’s been an interesting week this week; visited Dublin (good beer, good music, crazy stag/hen’s groups), lost a camera (oh, I’ll miss you my digital SLR!) and bought an Eee PC to use as a server.

Huh? An Eee PC as a server?!? I know – it sounds a little weird, but there’s logic behind the choice.

We like having a file and print server around the house and it’s good to have a LAMP and Mono development environment we can expose to the internet as a staging environment through our router. We had a nice little ASUS Barebones machine doing that job for the last couple of years but the motherboard gave up the ghost recently and we had to go out and find a replacement.

Since we live in a very small apartment (jeez, it’s in the middle of Paris, OK?) running a server running around the clock it can make it difficult to sleep, so the logical location is the room farthest from the bedroom which, in our case, happens to be the kitchen. The only place there that we can safely put a machine in there is under the kitchen bench so it’s out of the way and protected from splashes and other little accidents (it’s an inch or so off the floor too so it’s safe from spills). Small apartment, small kitchen; the maximum size of machine we can fit in there is 41cm x 41cm x 15cm, hence the Barebones I mentioned earlier.

Replacing the Barebones has turned out to be more painful than you’d expect; since our other machines are notebooks we don’t have a screen, so setting up a new machine requires lugging it to the office and back or buying a screen that will see 20 minutes use when setting up and then never again. Same goes for a keyboard. Also, the local computer shops sell plenty of PCs and parts to build your own system, but nothing that fits into the form factor required. So I started thinking…

An Eee PC, is tiny – it fits easily into the space required. It’s doesn’t have too much grunt, but it’s certainly plenty to run a LAMP install, file server and print server. It has a built in screen and keyboard and although the built in ‘disk’ is only 4Gb we can expand the storage through external USB drives to our heart’s content.

What’s more, since it’s designed as a portable unit it’s also designed to run of batteries, so if the power fails we also have a built in battery backup for a couple of hours.

I don’t know how long the machine will last running 24×7, but it was cheap at 300 Euros and it’s a nice little experiment.

Now the really interesting part begins; I have to set up the OS and have chosen to go the linux route – something I know little about, so it’s a great learning experience.

I’ll post more on that as I make progress.