Saturday, December 04, 2010

Tech of the day: Dockstar w/ Debian file sharing

Before we could share anything, we need to mount the drive(s) first!

I have some NTFS as well as FAT32 formatted drives in USB Enclosures. To mount them, first find out the "name" (sdb1 or sdc5) of your attached drives by:
fdisk -l

For NTFS, I installed NTFS-3G:
apt-get install ntfs-3g

Then mount as:
mount -t ntfs-3g /dev/sdb1 [dir name]

For FAT32, simply mount as:
mount -t vfat /dev/sdc1 [dir name]

Next, install and configure samba following these steps. Basically we need to add a user to the server (useradd) and add a SMB password for this user (smbpasswd -a) Then edit the followings accordingly:
/etc/samba/smb.conf
/etc/samba/smbusers

[Update] After the above steps, I was unable to move/add/delete any file on the USB drive if I'm not logon as root to Dockstar, which isn't very useful. I google quite a bit and got many suggestions:
- chmod 777 [the mount point]
- add writeable = yes to smb.conf
- add the mount point to fstab with umask=000 in the 4th column
Well, I did all 3 and it works for me now (not sure which one is the key though)

Friday, December 03, 2010

Tech of the day: Debian on Dockstar

I bought a Seagate Dockstar (for fear of it being discontinued soon! Amazon is pushing its newer replacement) last week. I have no intention to use the remote file sharing service PogoPlug (requires payment after the 1st year) And Dockstar cannot be used without PogoPlug unless you modify the firmware. I might as well run Debian (or OpenWRT) on it. Here are my steps:
0) Connect it to a PC running Linux (e.g. booted from a Live Ubuntu CD) with an Ethernet cable. Turn off internet on the PC.

1) Find out its IP by following Alexander Holler's instructions.

2) Plug in a flash drive and mount it
mount /dev/sda1 /mnt

3) Backup the stock image to /mnt
Using the instructions from the same link as (1)

4) Disable PogoPlug's daemon so that it won't attempt to phone home
killall hbwd
killall hbplug
mount -o remount,rw /
vi /etc/init.d/rcS
press "i" (to get into insert mode)
change the line "/etc/init.d/hbmgr.sh start" to "#/etc/init.d/hbmgr.sh start"
[esc] and ":wq" (write & quit)

After shutting the Dockstar down, it would be a good time to copy the backup images by unplugging the flash drive and plug to the PC.

5) Now the Dockstar is ready to be connected to the internet (by plugging the Ethernet cable to the router)

6) Follow Jeff Doozan's guide to install Debian (on a flash drive)
In case you couldn't find fdisk, it is under /sbin. Delete any existing partition. Hit 'n' to add the first Linux partition as primary partition 1. Accept the default first cylinder and +512M for the last cylinder.
Make it bootable.
Hit 'n' again to add the 2nd partition as primary partition 2. Also accept the default first cylinder but +256M for the last cylinder.
Hit 't' to change the system type of the 2nd partition. The Hex code is 82 (for Linux Swap)
Finally hit 'w' to write the partition to the drive (and wipe out everything you had originally!)
Now the drive is ready for Debian installation (just follow the rest of Jeff's steps)

Next I'll configure it for Samba and file sharing.

Sunday, November 28, 2010

Music of the day: David Tanenbaum & SFCM Guitar Ensemble

I went to this concert today. Judging from the description and the organizer (San Francisco Chamber Orchestra), I expected a program of old and new classical guitar materials, probably from the likes of Fernando Sor and Leo Brouwer. What a surprise I was in! First of all, I saw the co-host holding a Samick acoustic (folk) guitar. Then another performer (turns out to be Mr. Tanenbaum) holding a resonator guitar (best known for its appearance on the cover of Dire Straits' classic album: Brothers In Arms) Also, the show was not in the format of your traditional concert. Instead, it was in the style of a variety show, with music-related games in between performances, not to mention detailed explanation given by performers/composers. Mr. Tanenbaum told the story of his resonator guitar. This type of guitar originated in 20s and is made of steel and consists of "speaker cones" to make it sound loud. The brand of his is National and it came from National's factory in the lovely city of San Luis Obispo. And his is not your "ordinary" National Steel Guitar but one custom fretted in Just Intonation (the alternative to equal temperament, which most musicians are more familiar with. You could see how unique the guitar frets look) Tanenbaum teaches classical guitar at conservatories. You might wonder why he didn't play it at the concert. It was because he has asked composer Lou Harrison to write a piece for him for a long time. Finally Harrison wrote one, not for classical guitar but a National Steel guitar with Just Intonation. He wanted to write something special and it turned out to be his last work before he passed away. It's called "Scenes from Nek Chand" which is based on the sculpure and architecture of Nek Chand in northern India and was indeed very Eastern sounding.

Another guest on the program was violinist Jeremy Cohen. I didn't know he was the founder of Quartet San Francisco, of which the music I really enjoyed! He played a violin solo piece and a viola duet (Tango #8, with himself and Ben Simon, SFCO's director, both on viola) piece from his etude books and also the jazz standard Honeysuckle Rose (with himself and Julian Smedley both on violin) What a versatile player! (in terms of instruments and styles)