Sunday, May 20, 2012

Replacing hard drives in a Buffalo Linkstation Duo

I have trouble with the original disks within my Buffalo Linkstation Duo.  The two 500GB original hard drives that came with my drive failed one after another (luckily, not together!).  Be fair to Buffalo, their after sale service is good (well for the first replacement).  Emails were replied promptly - though I have problems with the second replacement, their customer services team is good, but their RMA team is dreadful.  I had waited for over two months for a reply from them.

Anyway, the reason I wrote this post is that I was fed up the waiting for the replacement and decided to use two spared 250GB drives I have to safe keep my files.  I need the fail-safe provided by RAID1.

Unfortunately, it is not easy as putting two empty drives into the unit and configure the NAS.  It seems Buffalo stores the OS of the NAS on the hard drive rather than on the drive's ROM.  Hence, if you have replaced both drives, the NAS will not know what to do at the boot time.

If you really need to replace both drives at the same time, you need to use TFTP to transfer essential files to the NAS to make it operative.  Step can be found at: http://forums.buffalotech.com/t5/Storage/FAQ-3-of-5-TFTP-boot-procedure-please-read-this/td-p/68094 .  There is a point you made want to note. You don't need to take the drive off your network. In fact, it is better to keep it in your network as after receiving the necessary files through TFTP for booting, it will try to obtain an IP from your DHCP server.  If the drive is still in your network, it can get an IP from your DHCP server.  All you need to do is to set you PC to the static IP 192.168.11.1 to allow the NAS to locate the files intially.

If everything went well, you should have your Buffalo drive in EM mode, and your PC is at static IP 192.168.11.1 . Now, you can put your PC back to your network, i.e. use your normal IP (from DHCP or a static IP within your subnet).

The next step is to run the firmware updater in debug mode, and the instructions can be found at this video:

http://www.youtube.com/watch?v=Pu4HI6XoSB8

With the debug mode, you can ask the NAS to rebuild the drives partition and put back all necessary files onto the hard drive for normal boot.


Monday, May 14, 2012

SSIS Tips and Tricks

Recently I have got myself involved in developing Sql Server Integrate Services (SSIS) packages.  While I was doing it I had picked up a few tips and tricks that I would like to share here.

First trick is to pass parameters from Job Agent into SSIS.  It is possible to assign values to your package on Agent Job's configuration tool.  Details can be found at:

http://www.buildingmeaning.com/?p=171

For example, if you are a package variable called Subject, then you can set (override) this variable with the steps decribed in the link by adding the property path \Package.Variables[User::Subject].Properties[Value] with the desired value.

Second trick is to connect to your data source setup in your package from Script Task.  For example, if you have a data source called "My Data Source" setup in your SSIS, and you can use it in Script Task by doing:-

SqlConnection conn = Dts.Connections["My Data Source"].AcquireConnection(Dts.Transaction) as SqlConnection;


http://msdn.microsoft.com/en-us/library/ms136018.aspx


Third is actually a tip for preventing SQL injection by using parameterized sql

SqlCommand command = new SqlCommand(commandText, conn);
command.Parameters.Add("@ID", SqlDbType.Int);
command.Parameters["@ID"].Value = customerID;

The above specifics the ID is an integer type, so it can prevent values that is not a valid integer.

Hope you find them useful.


Monday, April 23, 2012

Create Playlist for Android Device

Today, I stumble upon this blog on creating playlist for Android device.  What a life saver it is.  It is great to have large capacity memory card for your musics, however, it is can be a pain to create playlist.

Anyway, this blog (http://foss-boss.blogspot.co.uk/2009/11/create-mega-playlists-from-your-pc.html) just makes things so easy.

However, I would like to add some of my inputs to it.  The command

dir /b > playlist.m3u

works great if you have all your mp3 in a flat file structure, i.e. no directories.  However, if you have sub-directories, you need to do a bit more than running the command, and here are the steps:

1) dir /s /b > playlist.m3u
2) open the playlist.m3u with a text editor
3) use find and replace to remove any trace of parent directory path.  For instance, if you are in c:\media\mp3 and your playlist.m3u is within this directory, then you need to search for all trace of c:\media\mp3, and replace with blank.
4) use find and replace to look for backward slashes (\), and replace them with forward slashes (/)
5) Save the file, and you are good to go!

Friday, February 24, 2012

Moving from Ubuntu 11.10 to Kubuntu 11.10

When KDE moves to 4, I move to Gnome with Ubuntu mainly due to its file manager.  However, lately Gnome and Unity (not just Unity, in fact, it isn't that bad ... try Metro in Windows 8) gives me issues here and there.  These issues are all minor, but enough to annoy me.  Anyway, as you can guess what this post is about.  I move back to Ubuntu after gave KDE another go.  On the same hardware, it just runs better than Gnome.  It fews things are smoother, and things seem to work better.  For instance, simple thing as notifications.  With Compiz on, it gives me issues occasionally.  For instance, the transparency not display properly etc.

So far, my experience with KDE (Kubuntu) is much more pleasant than than Gnome 3 or Unity.

Update:
I had problem problems with DVD/CD writings with Gnome's bundled software.  On the same machine, K3b works perfectly.  I guess I am safely to say it is software issues.

Friday, January 27, 2012

After reading many online reviews on the Ainol Novo 7 Advanced, I decided to get its little brother Ainol Novo 7 Elf which shares similar hardware, i.e. both based on the Allwinner A10 SOC but with better screen and more memory.

The Elf comes with 4.0.1 and is without the full Google Market.  There are sellers selling a version of ELF that is claimed to come with Google Market.  I don't know if it is a after hack or not, as the Market is not on the official firmware.

Anyway, cut the story short.  Although Google's latest Android OS has received many praises from many technical website, personally with the version showing on the ELF (both 4.0.1 and updated 4.0.3) I don't feel it is ready at all.  Put the software compatibility issues aside, the OS itself seems to be buggy.  There were many times core services failed and resulted erratic behaviors in applications.

Luckily, it seems Ainol has also released a Gingerbread firmware with the tablet as suggested by http://www.slatedroid.com/topic/28614-ainol-novo-7-elf-234-gingerbread/

The downgrade (personally, it is an upgrade) is pretty straight forward with one minor exception.  All the references I have seen so far asks you to hold the volumn down button while plugging in a USB cable to your computer.  There is NO volume down button on the ELF.  What it should say is hold down the HOME button on the ELF.  Apart from this minor issue, everything is well illustrated in the upgrade guide (though it is in Chinese, BUT pictures).

Unlike the 4.0.x firmware, the Gingerbread version is clean and with full access to Google markets and applications.  No hack, fully working OS!  Hurray!  Also, it is far more stable to use too.  Only one minor issue I have with the Gingerbread version is the omission of Youtube application however, it can be easily fix by search for Youtube apk on Google.

So, my verdict on the Novo 7 ELF is it is a nice tablet for its price, but let down by the immaturity of the Google ICS.

Tuesday, January 3, 2012

Ubuntu ... where are you?!

I know Ubuntu 11.10 is not a LTS release, but it surely can't be this bad, can it?

One of the reason I upgrade to the new version of Ubuntu is the new version 3 Linux kernel.  However, I do not know where I should point my fingers to, many thinks works well in version 2.x are seriously broken.  For instance, ever since I have upgraded my machines to Ubuntu 11.10, both my laptop and my desktop (okay, both machines use Intel crappy graphics) fails to switch back on the screens after the screen goes into power saving.  I have tried different suggestions from different forums, at the end, I have to disable the power saving (for screen) at least completely (with little success).  Even after I have switched off the options to switch off the screen when idles for both machine, I still having problem at certain situations.  Now, I am really worry each time when I close my laptop lid as I do not know it will come back properly.  There are many time I need to restart the machine complete to regain the screen.

Another problem I have is the sound on my desktop.  It is still broken.  Although the new kernel is certainly running faster and seemingly lighter, I would advise you to stay on the old version of Ubuntu if you can.


Friday, December 16, 2011

Boot-Repair

If Windows power management is bad, Ubuntu's is even worse.  I have two computers which are unfortunate enough to run on Intel Graphics.  The graphics cards on both failed to resume after they went to sleep.

One way to fix it is to edit the GRUB options.  You can do it the hard way by looking up options for GRUB and editing the GRUB setting file.  Alternatively, there is a graphical utility to make you life easier.

https://help.ubuntu.com/community/Boot-Repair