Thursday, April 30, 2009

Lenovo fingerprint software problems, a ATA locked HDD i can not access

Lenovo laptop user
As a daily user of several ThinkPad Lenovo and the older IBM laptop computers (at work and at home private) I am sorry about the experience I recently had with Lenovo

I am sorry for 2 reasons:
  1. I expect there to be some problems with the Lenovo fingerprint software.. not just any problems, but some that has now made my harddrive data inaccessible.. ie. I have lost data that i do not have backed up! Fortunately that is not much data, because I upload frequently to flickr and burn backup to dvd!.. 
  2. When trying to get help with the data problem, and discuss what happend in order to avoid and explain, on the Lenovo forums, I got 2 good replies, then without notice the thread was deleted. Now we might never know if there are indeed flaws in the Lenovo software, if there is a solution that can recover or bring back my data or my old XP installation..or it was simply just me that used the fingerprint software wrong! 
    It was very helpful replies that explain some of the problems and possible reasons, so deleting the texts is very annoying for me! And the discussion was ongoing, I still have questions that was left unanswered. All the answers could have been helpful for others in the future..

Original Lenovo forum posting
Well for my future reference, I will save the information here, so i have it, and maybe someone else will find it useful:

I posted the following question on the Lenovo forum:

Hi

I am having trouble mounting and accessing data on my old lenovo r60 thinkpad hdd which had xp before.

what happened:
1) i decided to disable the fingerprint software because i had been in the garden and my fingers was scratched so it kept failing, but obviously i got in after many retries
2) i chose restart computer and it booted up and i had to logon with password. all looked good and i was happy

3) next day i started computer, and now it asks for a password i dont have. the password it asks for is illustraded with what looks like a Database icon and has a number 1 shown. Problem is, I do not have that password and i dont even remember setting it

4) So i took the old disk out of my R60, putted in a new disk, and installed windows xp on this new disk
5) Inside Windows XP, i try to mount the old disk using usb, but xp only see the disk, it sees no partitions
6) I used some recovery tools, because i thought all of a sudden the disk had gone bad,.. which would be really bad luck, it has been working fine for a long time. But anyway, when i scan for partitions, software finds no partitions, and the errormessage is a lot of "read error" for cylinders.

It is almost as if the disk has been encrypted somehow, but that is not something i know or have done myself.

Is this some kind of security setting from Lenovo software that i can undo directly on the disk?

Or can i get around the password prompt and just boot back into my old Windows XP installation?

Or is the disk just plain defect all of a sudden...

First reply
The first reply i got, pointed me in the direction of "It sounds like you have a ATA harddisk password lock on the disk".  Of course now that reply is deleted, but i think the most important was something like:

It sounds like you have a ATA harddisk password lock set
The fingerprint software has supplied the ATA HDD unlock password, and when you made the hot boot in 2) you didnt notice any problem because the drive only needs unlock once it has been powered on. 

After the cold restart you need to enter the ATA HDD password because the fingerprint software no longer does it for you. Unfortunately you will be out of luck trying to enable the fingerprint software again as you can not boot the drive.
Alright this made very much sense to me, it sounds exactly like i have had some ATA password set. The problem is i dont remember setting it in any Lenovo software and I dont remember what password was used.

My Reply
So i replied to the thread with some clarifications, questions and suggestions for improvements of the Lenovo fingerprint software.. that reply is also deleted from the forum ofcourse, but it was something like:

When the old disk is attached with external USB cable, XP device manager shows the disk, but inside Disk Management there is no disk to work with. 

I used an open source free partition recovery tool (which i used in the past to restore a mbr on a drive that would not boot)  TestDisk  [http://www.cgsecurity.org/wiki/TestDisk], which does show the disk, but analyzing the disk gives just a lot of read errors. 

I also tried scanning the attached disk with a free trial of File Scavenger, but that also gave no results. So i am afraid it is a ATA lock password problem.

1)
It bothers me that that I disabled the fingerprint software, only because it took me many retries after I had been to the garden and got some scratches. I couldnt figure out how to change the only 3 retries of striking the finger, is it possible to change that? It bothers me because i would give a lot to be able to turn fingerprint security back on now, but I cant because the drive is locked!! It would make much sense to me if Lenovo had a tool that could turn on fingerprint security again.. WITHOUT going into windows of course!?

2)
It also bothers me that the fingerprint software allows me to turn off fingerprint security without giving me some kind of major warning: WHEN YOU TURN OFF FINGERPRINT SECURITY, YOU NEED THE ATA HDD PASSWORD IN ORDER TO BE ABLE TO START WINDOWS AGAIN.. ARE YOU SURE YOU HAVE THIS PASSWORD OR DO YOU WANT TO SET A NEW OR REMOVE THAT PASSWORD?  ... how simple would this be.. and how nice ...could have saved me data loss... I mean after all the Lenovo fingerprint software must know, or be able to detect, that there is a HDD lock on the disk because the software has handled the single-sign-on for drive unlock until now!!! sigh

3)
Finally it bothers me that the Fingerprint software does not have a clear tab for "setting/changing the ATA lock password".. If there had been such a place i would have seen it, and possibly i would have changed the password, or even turned it off!! 


I feel these texts inside the thread are very important for me and other Lenovo endusers... too bad the thread has been deleted.. very sad judgement from the Lenovo forum administrators or moderators or whoever deleted it:

I hoped to get help from Lenovo about this, but no.. and not only do they not help, they even worked against me by deleting my post for help :-(  what a pity ..but i will keep using the Lenovo laptops as I have for many years ... this is just a bit sad, and of course i will never use the Lenovo fingerprint software ever again..

So.... anyway, i have some data on that drive which are of very big importance to me, so i will continue for some days to find a solution, possibly paying for a unlock of the drive    [http://www.hdd-tools.com/products/rrs/]  which seems to be the only way:

With Repair Station you can:
  • remove an unknown ATA-password; both security levels are supported: High and Maximum
  • diagnose and recover HDD firmware area
ATA Passwords
...
Repair Station has the ability to access the Firmware Area and reset the password, thus making your hard drive unlocked. Unlocking process is done automatically and takes just a few minutes.
Since Repair Station does not alter partitions or file systems, it is absolutely safe to your data.

There is a free diagnose trial of the software, but it requires that the disk is mounted on motherboard and not with USB cable. When I get a chance, I will run the diagnose.. 


Tuesday, March 17, 2009

Java Runtime Environemtn 1.6.0_10 can not be uninstalled

I just had a bad experience with a program (JRE 1.6.0 update 10) that was screwed up in my Windows XP installation, possibly during a half or semi good installation! The problem is now that the software does not uninstall from Add-remove programs or from Java commandline. So I can not uninstall the program and I can not install a newer version!

Making things worse is that since this is on a computer where software updates are in controlled environment, the IT support function said that solution is to reinstall the entire computer!

Instead of doing the reinstall of the computer rigth away, I used a Microsoft guide that promises to solve just the issue i am experiencing:
http://support.microsoft.com/default.aspx?scid=kb;en-us;290301

When you are working on your computer and installing a new program, the installation suddenly fails. Now you are left with a partly installed program.

You try to install the program again, but you are unsuccessful. Or, maybe you have problems trying to remove an old program because the installation files are corrupted.

Do not worry. Windows Installer CleanUp Utility might be able to help. You can use the utility to remove installation information for programs that were installed by using Windows Installer.

Be aware that Windows Installer CleanUp Utility will not remove the actual program from your computer. However, it will remove the installation files so that you can start the installation, upgrade, or uninstall over.

And guess what, it really worked and solved the problem!! After using the Windows Installer CleanUp Utility I could reinstall and then remove, and get the newer version of Java Runtime.

Monday, November 10, 2008

Ultraedit files does not show in tabs even when set for it

Every now and then my File Tabs in UltraEdit disappears. I think though only after a hard reboot crash of my computer. But as it happens often, I save the very simple solution here, easy for me to find later!

Beware, it does not work to simply enable the "View -> Views/Lists -> Open File Tabs" from the menu, that is already enabled, and no file tabs are shown!

So it turns out that all you have to do is delete this section from uedit32.ini:

[ToolBarState1-v110-Bar17]
BarID=59423
Horz=1
Floating=1
XPos=4
YPos=992
Bars=3
Bar#0=0
Bar#1=143
Bar#2=0


You can remove more [ToolBarState1 sections if you want, you will have to fix your toolbars afterwards though.

Uedit32.ini location can be modified, which is a nice feature, enabling you to have your own private .ini file. Simply using the documents and settings location ("C:\Documents and Settings\USERNAME\Application Data\IDMComp\UltraEdit\uedit32.INI") is better than Windows system dir.

Friday, June 13, 2008

Commands from cmd does not set errorlevel as you might expect!

It might not be a surprise to you, but Windows commands inside cmd.exe does not change errorlevel as you might expect.

For example running a echo something > c:\somefile.txt, which will succeed actually creating the file, but not change errorlevel to 0. You can test it like this:

md 2>nul
echo %errorlevel%
1
echo this.works > c:\test.txt
echo %errorlevel%
1
type c:\test.txt
this.works

This echo can not really be solved by using cmd /c echo because that will just always succeed, for example:

md 2>nul
echo %errorlevel%
1
cmd /c echo this.works > c:\test.txt
echo %errorlevel%
0
type c:\test.txt
this.works
cmd /c echo this.fails > drivedoesnotexist:\test.txt
The filename, directory name, or volume label syntax is incorrect.
echo %errorlevel%
0


And now, testing if copy command file1 + file2 into file3 gives errorlevel 1 if one of the source files does not exists. Errorlevel 1 is what you might expect, but it is not the case here:

echo 1 > 1.txt
rm 2.txt
echo 3 > 3.txt
ls -la 2.txt
ls: File or directory "2.txt" is not found
copy /b 1.txt + 2.txt + 3.txt 123.txt
1.txt
3.txt
1 file(s) copied.
echo %errorlevel%0

This is not as I expected, I will want to find a way to get around this.

There are probably same problem with other cmd commands, I didnt try others.

Maybe I am doing something the wrong way, in my environment and installation ... need to investigate :-)

I have not been able to find anything in the cmd command line reference, and it does not seem to solvable if everything is put into a batch script, instead of running commands one by one. I did hope that, because of text on information about setlocal ENABLEEXTENSIONS which can be set in a script, but has no effect on the command prompt:

cmd does not set the ERRORLEVEL variable when command extensions are
disabled

But unfortunately it did not work, here is the run.cmd script i ran:

setlocal ENABLEEXTENSIONS
echo 1 > c:\1.txt
rm c:\2.txt
echo 3 > c:\3.txt
copy /b c:\1.txt + c:\2.txt + c:\3.txt c:\123.txt
echo %errorlevel%
endlocal

The above echo'd 0 and the errorlevel after the script is 0. So not a solution!

I still keep investigating :-)

Oh yeah - in case you ever wondered, you should never manually set the errorlevel to 0 or 1 or whatever you need. Instead you should always use a command for that. I am using "ver" to get errorlevel 0 and "md;2>nul" to get errorlevel set at 1, which I found on one of my favorite batch example webpages.

Tuesday, May 20, 2008

Dig into the Active Directory information store

I never needed to automated users and groups creation/deletion/changes in Active Directory on Windows. I have however needed to query lists of users and groups, membership and such. That was solved by some vbscripts.

A few days ago I needed to show the list of computers in an Organizational Unit (OU), so I searched for some ways to get that. And I bumped into the Microsoft dstools (dsget/dsquery/....) and they are just perfect for automating Directory service stuff.

The commands works from a Windows 2003 server, but not from XP.

Also, I need a intro for directory services, because I havnt used it much, and a then moved to a good simple dsquery tutorial.

Then I could make some quick oneliners, starting with a very comprehensive query that is highly educative of how the Directory of Level2OU is made:
dsquery * OU=Level2OU,OU=Level1OU,DC=domain,DC=domainext -limit 0 -attr *

Listing the members of a Windows group:

dsget group "CN=somegrp,OU=level2,OU=level1,DC=domain,DC=domainext" -members -expand

Show the computers of an OU:

dsquery computer OU=Level3OU,OU=Level2OU,OU=Level1OU,DC=domain,DC=domainext -limit 0

To automated the query, I have used psexec to run it on a remote server, with a user that has access to do queries:

psexec \\srv -u dom\usr -p pwd -e cmd /C "dsquery ou domainroot"

Other than that I just found the dstools to be very powerful and some googling shows many good examples of what people have done with it! Very impressive!

The article also mentions some need-to-have directory service binaries from joeware.net/freetools but I havnt tried them. They look good though, like lots of work has been wrappen into those exes:

AdFind [switches] [-b basedn] [-f filter] [attr list]

basedn RFC 2253 DN to base search from.
filter RFC 2254 LDAP filter.
attr list List of specific attributes to return, if nothing specified returns 'default' attributes, aka * set.
...

Monday, May 19, 2008

Dependency Walker commandline example

Dependency Walker (depends.exe) can be downloaded, or is in Windows 2003 resource kit.

I wanted to script the dependency check for some .dll files, so i ran toward remote server:
psexec \\someserver /u someuser -e cmd /c "environment.cmd&depends.exe /c /pb /oc "d:\depends.temp" "some.dll""

Now parse the output file, first column is status, look for "E,":
findstr /bic:"E," \\someserver\d$\depends.temp
if errorlevel 1 echo all OK

I have not made a way to avoid enter password, but if I need I recall there are some runas and similar alternatives.

Thursday, May 8, 2008

Hello World and 99 Bottles of Beer collections

Browsing around for some good C++ sample code I stumbled upon the The Hello World Collection. While that is good, the 99 Bottles of Beer song collection is stunning, informative and fun:

... the collection of the Song 99 Bottles of Beer programmed in different
programming languages. Actually the song is represented in 1200 different
programming languages and variations. For more detailed information refer to
historic information.
I went to look for the Perl example for the song, and was completely baffled!! Everything written inside regular expressions, using a perl module which creates shapes out of perl code! Andrew Savige has some serious coding skills!!

Checking the reg exp, it is a bit (but not much really) readable:

perl -MO=Deparse 99-bottles.pl
'' =~ /(?{eval"\$==pop99;--\$=;sub\n_\{(\$;=(\$=No).\" bottle\".\"s\"x!!--\$=.\" of beer\").\" on the wall\"\}print+
_,\", \$;!\nTake one down, pass it around,\n\",_,\"!\n\n\"while++\$="})/;
$: = 'P';
$~ = 'h';
$^ = 'r';
$/ = '`';
99-bottles.pl syntax OK