Category Archives: Computers

Death of my SSD

My new SSD drive lasted about 6 weeks. It is the first one I ever bought (not counting the built-in one in my Eee 701). And I thought I had taken extra good care of it, not even using it for the pagefile.

If you run Windows 7, I recommend making a System Image Backup (Control Panel -> System and Security -> Backup And Restore) to a spare drive. When I did that I got the following error message:

The Backup Failed. New bad clusters were found on the source volume. These clusters were not backed up.

Before I ran the backup, I had noticed nothing suspicious about the drive. Now I checked the Windows Event log (System Log), and found Errors from Source=Disk, with ID=7.

Trying to fix
I tried to run chkdsk over and over again. First via right-clicking on c:, clicking Properties, Tools, and checking/fixing errors. I also tried running chkdsk /b from the command line. This reduced the number of errors in the event log down to one (when the computer started), but I could not get rid of the last error. The Image Backup kept failing. Days later I had several errors again. This made me definitely give up on the drive.

The Windows Backup Image
The Windows Backup Image feature is simple and nice. But as usual with Microsoft it is after all a half-crappy tool that works if you are lucky. I don’t like:

  • When the backup above failed, the tool anyway created a backup image. How am I supposed to know if I can use that backup or not?
  • When running the backup again, the tool obviously just read files/data that had changed, effectively avoiding the bad blocks. So when running again I did not even get an error, making me even more uncertain about the usability of the backup.
  • The recovery CD can only recover to a hard drive that is not smaller than the original hard drive. This applies even if the original backed-up Windows partition is smaller than the new drive. (I was afraid replacing my 128GB SSD with another brand/model 128GB SSD, because the new drive could very possibly be a few blocks smaller than the original one).

I recovered the system to an old non-SSD drive with success, but performance was so depressing.

New Drive
In the end I replaced my broken 128 GB OCZ Octane S2 with a 60GB Intel Series 520 drive. They were almost exactly the same price. I re-installed Windows from scratch. Online Windows Activation was OK this second time I used the same key – I did not have to call Microsoft and explain anything.

Conclusion
The performance of SSD on the system/root drive is fantastic. Booting and starting programs is so fast. I just could not go back to a normal drive. But I hesitate to store my own files on SSD, and I will think twice before getting a budget SSD drive again.

Recover scenarios to the new smaller drive
I will be honest and admit I never tried to restore the old system to my 60GB drive. My experience with not being able to restore to a smaller hard drive comes from another computer.

Intel has an SSD Toolbox, and I think it contains migration tools. Perhaps those tools could have handled the smaller (albeit large enough) destination Intel SSD drive.

There are ways to resize partitions, backup and restore them and make them bootable. But I did not trust the quality of my backup 100% (after all Windows said it failed). And I hesitate to use dd to write images to SSD drives.

Fixing the bad blocks?
Bad blocks are supposed to be more common on SSD drives than traditional drives, but firmware should handle it. I found no useful tools from the drive manufacturer, OCZ. My nice dealer allowed me to replace the drive after I explained that Windows failed to backup it, and chkdsk didn’t fix it.

Indications in Linux
I booted the Ubuntu 12.04 CD, and ran the following commands:

$ sudo md5sum /dev/sda
md5sum: /dev/sda: Input/output error
$ sudo badblocks -b 4096 -c 1024 -e 10 /dev/sdg
1312474
1312575
(and another 8 lines with bad blocks)

The system log or dmesg command gave more details.

Quickly and easily transfer files over network

You want to copy a file between two computers or Symbian phones, and the usual methods don’t feel that attractive? Network drives, scp and ftp requires configuring a server (that later might be a security risk). USB cables are never available when needed. DropBox and Bluetooth are too slow.

A while ago I described how to copy files with netcat, but that works best on *nix and is not so easy for people who do not like the command line. And, it does not work on mobile phones.

So, I wrote a little program that does what netcat does but is simple to use and has a GUI. And, I wrote it in QT, so it works in Mac OS X, Linux, Windows and Symbian. It is exactly the same on all platforms.

Do you want a simple way to copy files over the network? Download ParrotCopy and give it a try – instructions included:

ParrotCopy:

The Symbian version probably only works on Symbian^3 and has just been tested on Nokia N8. Let me know if you need a binary for an older Symbian device or a Maemo or Harmattan device.

Bugs
In server mode, the program tries to connect to www.google.com:80, to figure out its own IP. It is simply an ugly hack because I had problems with other methods. You may have problems if internet is not accessible. I will not release 1.0 until this is fixed.

Limitations
You have to manually name the file you receive, and you can transfer just one file at a time. These are not bugs, but future versions will probably do better. Netcat can be combined with tar, gzip etc. I hope to add at least tar in the future. For now, making a zipfile is a simple way to transfer many files.

Release 0.9.7
Now possible to copy contents of status field and file/folder fields (if you want to paste it into other application).

DOS flashing in 2011

Still BIOS updates and other firmware flash operations mostly need to be done from DOS. Seriously, DOS, in 2011?

I found a decent strategy. When you install your computer, make a small (256Mb) FAT partition with a FAT16 filesystem on it first on your harddrive (with some skills and luck you can use it also as linux /boot partition). Whenever you need to flash BIOS or anything else, put the DOS flash utility on this partition.

Make yourself a bootable FreeDOS CD. When you boot into freedos you just do:

  a:\> c:
  c:\> dir
  (dir output - to find the name of the update program)
  c:\> BIOS1234.exe

When everything is done you can just reset the computer with the reset-button, eject the CD, and boot your normal OS.

So, what is clever about this? It is not so easy to make FreeDOS read USB-keys or access the network, and the bootable CD is naturally read-only. But a little FAT16 filesystem first, on your first hard drive, is very easy to access. And you can easily put any upgrade files there, from any OS you like to run normally.

On a brand new computer (or hard drive), the first thing you do is boot FreeDOS (or your Linux live cd of choice) and create the little FAT partition. Then you can install your other OSs. If you got the computer with Windows already installed, and you intend to keep it, you probably dont need to flash anything anyway.

Creative T20 loudspeaker problems

Since a few years I have had a pair of Creative T20 loudspeakers for my computers. They are great because it is just a 2.0 system, and they sound excellent. But I have had problems with humming noise and worse for a long while. Today I read on the creative forums that others have had similar problems. So, I opened my right loudspeaker (the one with all the electronics) and drowned the potentiometers in universal oil (CRC/5-56). It worked – now they seem all fine!

Simple method for copying files over network

Copying files between computers is, fundamental. However, sometimes it is not so easy. When struggling with NFS I have been thinking; how did Microsoft get this one more right than the other ones? But Windows file sharing is not so very simple either, and it is not exactly getting easier with new versions.

However, copying files between two computers (on the same network) IS easy, especially between *NIX-based systems. Here are two methods, and they may work on Windows too, with the right tools installed (cygwin).

The following examples presume you want to copy files from a client computer to a Mac OS X machine with IP 192.168.0.20.

SSHFS
sshfs allows you to mount any folder on the server, on any folder on the client. Normal permissions apply, and you need to have sshfs installed on the client, and sshd on the server (you have it if you can ssh to the server).

Lets assume I have a user zo0ok on the Mac OS X machine, and I want to access that users home directory. Then I do (on the client):

  > mkdir zo0ok-on-osx
  > sshfs zo0ok@192.168.0.20:/Users/zo0ok zo0ok-on-osx

I need to authenticate. Done! Now the contents of the remote home directory is available locally. Note; performance is not optimal, and things like random access to files might not work. But for many purposes it works perfectly.

Netcat (nc)
netcat (or just nc) is an insanely powerful, and simple, tool. You can pipeline things, not just between programs, but over the network. More people should know about it! The following instructions assume you are logged in and have a shell on both machines.

First just see that everything works. On the mac (server), listen to port 9999:

  macosx$ nc -l 9999

Second, on the client, send message:

  client$ echo Hello World | nc 192.168.0.20 9999

If everything is fine, the message was sent to the Mac and displayed on its prompt. nc should quit as it reaches end of file.

Copy a file (hello.txt – it must exist on the client):

  macosx$ nc -l 9999 > hello.txt
  client$ nc 192.168.0.20 9999 < hello.txt

If everything is fine, you have a file on the Mac, identical to the one on the client (use md5sum if in doubt).

Copy a large file:

  macosx$ nc -l 9999 | gunzip > ubuntu.iso
  client$ cat ubuntu.iso | gzip | nc 192.168.0.20 9999

If your CPU is faster than you network, file transfer will be faster when you compress the data.

Copy a folder:

  macosx$ nc -l 9999 | tar -x
  client$ tar -c mp3collection | nc 192.168.0.20 9999

Of course you can use the -z switch for tar to enable compression, but for you mp3-collection it is not a wise idea.

Only your imagination limits what you can do with nc!