The Developer's Tidbit

October 29, 2009

Windows 7 64bit and Sigma Tel High Definition Audio CODEC Problems

Filed under: 7, windows — Ben @ 9:00 am
Tags: , , , , , , ,

I recently upgraded my work laptop to the latest and greatest edition of Microsoft’s primary operating system Windows 7, 64bit. Seeing this is the first time I am migrating fulltime to a 64bit Windows system I have decided to keep my old 32bit Windows Vista partition on the same laptop using dual partitions. Everything with the installation of Windows 7 has worked flawlessly accept for one major problem has an easy fix.

My Dell XPS M1330 laptop uses an audio device referred to as the Sigma Tel High Definition Audio CODEC. Unfortunately after installing a fresh copy of Windows 7 64 bit no audio could be heard, even though the volume was up at full and all the device drivers reported did not any problems.

If you search the internet for Sigma Te High Definition Audio there is not much in the way of helpful results. Thankfully I found a simple solution; you simply have to manually install the Windows Vista, Sigma Tel HD Audio drivers onto your 64bit Windows 7. It seems the default drivers included in Windows 7 are maybe only 32 bit compatible? Dell thankfully offers set of Windows Vista drivers from their website that supports both 32bit and 64bit. And while they are dated 13th August 2007 they work fine in Windows 7.

As mentioned in this article’s comments some people have been expiriencing problems with the combination of Skype, Windows 7 and the Sigma Drivers. Skype seem to be aware of the problem but currently do not offer a solution other than to suggest that you make sure Skype and your drivers are up to date.

Why am I experiencing sound/video problems when using Skype with Windows 7? We are aware that not all sound and/or video drivers are compatible with Windows 7 when using Skype.

Device Driver

September 7, 2009

Windows File Junctions, Symbolic Links and Hard Links

Filed under: 7, vista, windows — Ben @ 9:08 am
Tags: , , , ,

Linux and Unix for a long time have had the marvellous ability for you to create hard links. For Window users unfamiliar with hard links, they not are unlike file/folder shortcuts. Except for one critical difference, they are sorted and registered by the operating system’s file partition just like real files and directories. This means that unlike a shortcut, any program or application (including Windows Explorer and the Command Prompt) that looks that the hard link will always treat it like it is the original file or folder the symbolic link is pointing to.

Now this is advantageous for a number of reasons, especially if you use multiple partitions on your computer. I for example keep all my work related files on a separate partition labelled with the W: drive. This allows me to optimise searches and backups, as well as keeping the partition more secure from problems arising from operating system errors.

Part of my work involves web development, and often that requires the files I am working on to be located on the web server’s root directory. This can be a problem if the web server application is installed on the C: drive. This is where a hard link comes in as with it I can simply create a link from the web server’s root directory and point it to the folder containing the HTML files on my work drive (W:). With the link though the web server is none the wiser and once I have finished developing, testing and troubleshooting. I can remove the hard link and the web server will then assume the directory with the work has been removed. But this has been done without any directory refactoring or moving.

The Windows NTFS file system has supported some form of symbolic linking since Windows 2000. But unfortunately each revision of Windows up until Windows Vista has used a different method of implementing the links themselves. So for this article I will just focus on the Windows Vista and the identical Windows 7 implementation.

So in Windows what is the difference between a short-cut and symbolic link (sym-link) and a hard link?

Well a short cut is basically a file that points to another file. It is an antiquated, pointing system from the Windows 95 days. Shortcuts not only use up space on your hard drive, they also linger around after the item they are pointing to has been deleted and break if the item is renamed.

A symbolic link is like a short cut, but instead of being saved as a file, they are registered to the file system. This means they do not use hard disk space; all programs recognise and can read where the link is pointing to. A symbolic link can point to any file, folder either locally on the computer or over a network using a SMB path.

A file hard link and the directory junction are a little different. It not only points to the item but duplicates it, but does so without taking up the extra hard disk space required by a copied file. Also if you have a hard link pointing to a file then delete that original file, the hard link will still retain a copy. A limitation of the file hard link though is that the link can only be made on the same file partition as the file.

Finally a junction is a hard link for directories. To me they are the most useful and unlike file hard links, you can create junctions on different partitions to where the original folder is located. Again a junction is stored on the file system, does not take up space and is treated by the operating system and programs as a local folder.

Windows Vista/7 uses the command line program called mklink to create these symbolic links. It has 3 arguments and then requires both a link name and target.

mklink /D /H /J [LINK NAME] [TARGET]

Now there are 4 modes for mklink and they all counteract each other meaning you can only use one argument or none at all.

No arguments creates file symbolic link which is like a shortcut that is registered on the file system instead of stored in a file.

/D creates a directory symbolic link which is like a shortcut that is registered on the file system instead of stored in a file.

/H creates what Windows refers to as a hard file link. A hard file link is used where you need multiple copies of a file, but wish to save space by keeping only one physical copy on disk.

/J creates a Windows Junction which is a directory hard link. If you need duplicate copies of a directory but don’t wish to use up the extra hard drive space you can create a junction. Though be careful as any changes you make to a file or folder in one of the junction will affect all the others.

mklink /J WindowsVista C:\Windows

Would make a Windows Junction titled WinVista linking to the directory C:\Windows

Below is a screen capture of the 4 different types of symbolic and hard links. The yellow is a hard file link that doesn’t use up any extra hard drive space. The blue is a symbolic link to a file. The green is a symbolic link to a file. The read is a hard link to a directory which is known as a Windows directory junction.

Windows Vista MKLINK

September 1, 2009

How to manually transfer large directories from an external device to your QNAP device

Filed under: linux, qnap — Ben @ 3:22 pm

Recently I was forced to format my QNAP TS-109 and reinstall the firmware. For some reason the file partition holding all the data became so corrupt that the QNAP firmware would refuse to even mount the drive. No amount of partition fixing or recovering would enable it to mount. Eventually I gave up and restarted from scratch.

Lucky I had all the QNAP data stored on a secondary, dumb USB hard drive so no data was lost. This is something I would recommend to everyone do, even those with NAS devices which run with multiple drives.

One of the problems though was trying to work out an easy away to transfer the 750 GB of data from the USB device over to the NAS server without using the QNAP Backup feature. In the past I have found it unreliable and I also preferred the manual control of using the Linux command line.

Fortunately the QNAP server comes with the handy command known as rsync. This utility covered all my needs quite well and so below I will explain how to use it with an external USB device and a QNAP NAS server.

Part I, Telnet

  • Turn on your QNAS server and wait for it to boot.
  • Plug in your external USB device into a USB socket at the back of the QNAS server and turn the USB device on (if needed).
  • Web browse to your QNAP administration page, by default it is at http://169.254.100.100:8080. Login using your administrator (admin) account.
  • Go to External Device and then select USB Disk.
  • If everything is okay your USB disk should be shown in the web form.

QNAP USB Disk

  • Now we are going to turn on the Telnet remote log-in of the QNAP server. If you already are familiar with using Telnet or SSH to connect to your QNAP server you can skip this and go to Part II of this article.
  • In the QNAP administrator webpage select Network Services > Remote Login.
  • On the Remote Login make sure the Telnet connection is selected.

Remote Login

  • Now we will need to connect to your QNAP server using a Telnet client. I recommend the very popular client known as Putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/). So if you don’t have a client, download Putty and install it. From now on I will assume that is what you are using.
  • In Putty setup your Putty Configuration to look like this, but obviously replace the IP address with that of your QNAP server. Once you have setup Putty, open the session.

Putty Configuration

  • Once connected you should be prompted for a login in a screen that is not unlike the Windows Command Prompt. Login using your QNAP ‘admin‘ account, as this is the only account accepted by QNAP under Telnet.

Putty Login

Part II Rsync

Rsync is a Linux tool that allows you to synchronise directories together. Your QNAP device keeps symbolic links to all the folders within the /share/ directory. The external USB device will be located in the /share/USBDisk1/ directory.

Rsync comes with a number of option attributes but we will only list the ones of interest to our task.

Command: rsync [OPTIONS...] SOURCE… [DESTINATION]

OPTIONS
-v verbose output – displays syncing information
-vv verbose output with additional information
-r recursive scanning and copying – scans and copies all sub-directories
-h human readable output – recommended
–size-only – recommended otherwise rsync will use dates to check for file differences. If you have to abort and later resume your synchronisation, this option will enable you to skip the files that have already been copied to your QNAP server.
–progress displays live transfer details such as the percentage copied and the speed of the transfer
-n dry run – simulates the copy without actually transferring any files. This is good if you wish to play around with the options.

If you wished for example to copy the backed up /MyMedia/ folder onto your QNAP server under the /Qmultimedia/ folder you would run the following command. Remember Linux is caps sensitive.

rsync –v –r –h –size-only –progress /share/USBDisk1/MyMedia/ /share/Qmultimedia/

With this information you should be able to copy large amounts of data from external USB devices onto your QNAP server without any troubles. If you need to cancel your session during mid-transfer, simply abort the synchronisation using the Ctrl-C key combination or exit Putty. When you are ready to resume, reconnect using Putty and run the same command again and rsync will resume from the last copied file saving you valuable time and duplication.

Once you have completed all the file transfers you need to conduct, make sure you disable Telnet access from your QNAP administration.

Next Page »

Blog at WordPress.com.