The Clarke Side
Do not under-estimate the power of the Clarke side.
Saturday, 9 August 2008
Keeping track of the time
A couple of days ago I made a change to the config on my ME1 server to tidy the samba setup. I'm going to call it a server now, as it's working with all my kit, both Mac and PC. Though to get to that point I had to make a fair few changes.

I used to have a PC running Ubuntu 6.06 LTS but I've retired that now. This PC used to be my samba server but it was not something I wanted sitting in the lounge. It was too large and too noisy. The samba config did work with my Mac, so it was just a case of applying the samba config I used on ubuntu to the ME1 and all should have been fine.

Firstly I noticed that the clock on the ME1 was not set correctly. I had fixed this on Ubuntu by using an NTP server, so I set about applying that. So I needed ntpdate installing on the debian image.

apt-get install ntpdate

That didn't work! after a little scratching around I checked that I had the correct source information.

apt-get update --fix-missing

That downloaded a shed load of updates to the sources lists. Issued the install command again and after a while (the ME1 is not the fastest at installing apps) I had the ntpdate command available.

ntpdate pool.ntp.org

That command takes the ntp time from the pool of ntp servers on the Internet. Time was set Ok, so I carried on. I'll see about updating the crontab in the debian image to fire this command off every so often.

So back to samba.
I located the ubuntu samba install on the howtoforge and set about applying the new smb.conf file. All when well until I needed to run an smbclient check to verify the setup. smbclient is not installed in the debian image we have for the ME1. so

apt-get install smbclient

whoa! that did a massive update as the whole samba installation got upgraded to the latest versions. still even though it took a long while to complete (and did look like it had frozen at a couple of points) I'm happy that its got the latest patches installed.

smbclient -L localhost -U%

Displays the information for the server and also finds the windows machines on my network too but no Mac!

I tried hooking up the Mac to the ME1 samba shares but they failed using smb://server/share. more digging required. I found that you need to specify the workgroup and the username when connecting to the share, so mounting drive as smb://domain;user@server/share works a treat!

So now samba works for all my devices, which was annoying my wife as she could get at her music or photos for a while.

Update
Thanks to stoobs for point out this on the ME1 Google Group.

Friday, 8 August 2008
I filled it up to the brim.
Yes, that's right I filled up the debian image last night on my ME1. Serves me right for trying to download a 3.5Gb Linux ISO. The fix was quite simple but I had a few spare minutes to tinker a bit and ended up reconfiguring my Samba shares to make it look tidier. The ME1 can be configured to run a debian image that is preloaded with Samba, SSH and an mldonkey client. Take a look here for more information on how to do that.

So here goes, a quick look at the fix.

With the d3g.ext2 debian image filled, I had to first clear some space to allow me to tinker. The MLDonkey client software is configured to write all of it's temporary files to /var/lib/mldonkey/temp. Since this is inside the debian image you're not only limited by the 4Gb Fat32 file limit, you're going to be short a few megs for the rest of the operating system and apps that the image holds.

The HDD I have in the enclosure is mounted as /mnt/hda, so after SSHing to the device I made a work folder.

#mkdir /mnt/hda/work
The mldonkey server had died by this point, due to lack of disk space but if you find yourself in need of this fix you'll have to make sure you stop the server
#/etc/init.d/mldonkey-server stop
Next we take a look in the mldonkey temp folder
#cd /var/lib/mldonkey/temp
#ls -l
The complete contents of this folder need to be moved to the work folder on our HDD.
#mv * /mnt/hda/work
Don't worry about the preservation of permissions on the files being moved, the HDD is Fat32 so they all become rwx for all users and owned by root anyway. Then we remove the folder and create a pointer to our HDD, the mldonkey server software will never know the difference
#cd ..
#rmdir temp
#ln -s temp /mnt/hda/work
Lastly restart the mldonkey server and you'll be up and running again.
#/etc/init.d/mldonkey-server restart
Now then, I mentioned that I tidied up my hdd after I did this tinkering. That was a simple case of moving the debian image to a debian folder and all of my other content to a folder named store.
The debian image needs to be moved from the main telnet login rather than the ssh console (as you'd be trying to move the operating system that you're currently running, and that would never work). Telnet onto the device, edit the file /usr/local/etc/auto and comment (with a #) the lines that mount and chroot the d3g.ext2 image. save that and reboot. I then moved the debian image into a folder named debian, altered the auto file to show the new filepaths and rebooted again. Et Voila! back up and running again with my HDD root folder clear of files (Did I mention I was a digital neat freak).
Lastly I mentioned that my media was moved to a folder named store. This was so I could edit the samba config in /etc/samba/smb.conf to change the path of the shared volume to use the store folder. That way you can't get at my debian image or the mldonkey work folder over samba. one less thing to go wrong!
Next setting the time automatically and fixing the samba shares, so I can access them from my mac.
Thursday, 7 August 2008
Five minutes to tell you about...

...my new toy.
It's an Emprex ME1, the ME bit being a media enclosure. I'd love to get all techie at this point but since this is my first real post i'll reign myself in and say that it's basically a hard drive that I can plug into my TV and watch the programs that I've recorded onto it.
Those of you that know me already will know that I never settle for the simple things, so that fact that this little box also runs a linux environment is a real bonus for me.
I've already flashed it with the latest firmware, installed a debian image onto the drive and now it's not only networked hard drive (Did I mention that it has an RJ45 socket on the back?) but its also a samba server and bittorrent client too.
There's more information on this product at http://www.emprex.com/02_products_02.php?id=210 and I found it in the sale at Maplins, so now you know where to get one for yourself.

Labels: , , , , ,

Monday, 4 August 2008
Do not underestimate the power
Ha! What a completely geeky way to open my blog.

Nevermind, eh?! I'm sure the geekfest will continue as I stick more stuff in here.