Archive for April, 2009

29
Apr
09

uTorrent automatization on external drive

I move around pretty much during the day and since my notebook has this little overheating-and-stops-working issue I just carry around my external 2.5″ hdd usb drive(which is wonderful since it doesn’t need and extra power adapter,  just a mini usb cable).

Well, I wanted to start to download uTorrents whenever I got to a computer but I wanted to automate it and hide it a bit so when I’m downloading I don’t stand out.

So my config:

There are two batch files, a resume.bat a cleanRun.bat, since when you plug your drive into a different computer it is very probable the drive letter will change and utorrent uses full paths in its resume file.

So I had to remove the resume file from uTorrents configuration directory.

But now I have to reload every torrent anew each time I run the cleanRun.bat and preferably not open torrents
I’ve aleady downloaded.
So I created some folders:
uTorrent/ <-here goes the uTorrent.exe and settings.dat
TORRENTS/2OPEN/ <-torrent load folder
TORRENTS/BACKUP/ <-a backup folder for torrents…
TORRENTS/FINISHED/ <-here the finished torrents are moved
TORRENTS/ <-open torrents go here
DOWNLOADING/ <-downloading downloads go here
FINISHED/ <-finished downloads go here

So…in the uTorrent configuration, go to the Directories tab,
tick the “Put new downloads in:” and in the box put “..\DOWNLOADING”
tick the “Move completed downloads to:” and “..\FINISHED”
tick “Only move from the default download directory”
tick “Store .torrents in:” and put in the box “..\TORRENTS”
tick “Move .torrents for finished jobs to:” and “..\TORRENTS\FINISHED”
tick “Automatically load .torrents from” and also “Delete loaded .torrents”
and put in the box “..\TORRENTS\2OPEN”.
(the two options left should be left unticked)

now, a recap:
(..\ means parent folder)
when a download starts it gets stored in the DOWNLOADING folder and when it finishes it goes to the FINISHED folder only if it was in the DOWNLOADING folder.

When a .torrent is opened it is copied to TORRENTS folder.

When a torrent is finished it is moved to TORRENTS/FINISHED and any torrents are loaded from TORRENTS/2OPEN and deleted.

Now, the resume.bat should just open uTorrent. END.

While the cleanRun.bat must:
-remove/move uTorrent/resume.dat and uTorrent/resume.dat.old
-move torrents in TORRENTS to TORRENTS/2OPEN

Assuming your be located in the same level as your folders:
cleanRun.bat:

——————————————-
@echo off
echo “Move torrents to be opened…”
move TORRENTS\*.torrent TORRENTS\2OPEN\

echo “Backup torrents…”
copy TORRENTS\2OPEN\*.torrent TORRENTS\BKP\

echo “Remove resume settings…”
move uTorrent\resume.dat TORRENTS\BKP\
move uTorrent\resume.dat.old .TORRENTS\BKP\

echo “Start uTorrent…”
start .\utorrent.exe /RECOVER /HIDE
—————————————–

The option /RECOVER enables to open a second instance of uTorrent if uTorrent is already running and /HIDE starts uTorrent in hidden mode (boss-key mode)
Obs.: if there is no bosskey set, you wont be able to make uTorrent ‘unhide’, you will have to kill the process and begin utorrent without the hidden option.

You can also, to hide uTorrent running on your computer, create an icon named ‘tray.ico’ in the same folder as the settings.dat and next time you open uTorrent the tray icon will be changed to tray.ico.(Useful if uTorrent is set to go to tray if minimized)

Unfortunately I haven’t found a way to change the working directory of a torrent automatically so that it is not need to remove and reload(and re-check) the torrent which can take a while depending on the torrents size.

To close uTorrent.exe ‘automatically’ I am experimenting with some software.
I’ve read but not tried http://forum.utorrent.com/viewtopic.php?id=34067 yet since the fullpath is required
to close the program and since the path changes (and the whole idea of this is to make utorrent directory dynamic) I’ve ignored it. Another one I got somewhere sends the WM_Close handle but it only works when uTorrent’s window is open.

You could always kill uTorrent but it’s not a very healthy action towards the next time you open uTorrent because it will recheck all torrents and it’s possible write errors happen which are not welcome at all.

Well, either way, when using a software that will close uTorrent automatically you can create only one batch
script:

——————————————-
@echo off
echo “Move torrents to be opened…”
move TORRENTS\*.torrent TORRENTS\2OPEN\

echo “Backup torrents…”
copy TORRENTS\2OPEN\*.torrent TORRENTS\BKP\

echo “Remove resume settings…”
move uTorrent\resume.dat TORRENTS\BKP\
move uTorrent\resume.dat.old .TORRENTS\BKP\

echo “Start uTorrent…”
start .\utorrent.exe /RECOVER /HIDE

pause
*whatever software you have*
—————————————–

since pause will ask you to press a key to continue giving you the choice to leave utorrent open as long as you wish.
The problem is that a cmd.exe window will be permanently open which you can overcome by having a separate script as ‘closer’ which you run when you want to leave/close uTorrent.

You could also set the cleanRun.bat to be opened by autorun.inf on the hard drive and on computers with Windows XP SP2 /SP3 the script would be run automatically whenever you plug your external drive into the computer.

To avoid reopening all torrents each time, it would be possible to save the last known drive letter uTorrent was run from to check if it’s the same on the next start and just resume all torrents… Someday I’ll write it perhaps.

(yeah..all these steps are not that complicated but it takes a while to get to the final solution..or one of them at least)

21
Apr
09

Migrating VirtualBox to Vmware ESXi

A while back I was expermenting with Vmware ESXi 3.5 and wanted to convert a Virtualbox VM to a Vmware ESXi VM.

I found a way to convert the image file from .vdi to .vmdk but not the configuration files. The solution to convert .vdi to .vmdk was to have ‘vditools’ and ‘qemu’ on ubuntu.

Converting .vdi to raw(DD)

$vditools COPYDD .vdi .raw

Converting raw to .vmdk

$qemu-img convert .raw -O vmdk .vmdk

But I still had a problem importing the vmdk image to ESXi(through datastore manager or scp upload).

I finally did it using vmware converter to convert and upload directly to a infrastructure server, my vmware esxi server in this case.

Worked on ubuntu server7.04 and windows server 2003.

19
Apr
09

Installing CFW on a PSP-1000(PSP-110)

Guide to install CFW on a PSP-1000 using version ofw2.60 with Battery PSP-110.

Having installed the cfw successfully on my own PSP-2000(Slim) by pandorizing my battery, I had the task to do the same to a PSP-1000(Phat).

Firstly I tried to start the Phat PSP with my modded Slim Battery when I remembered the Slim Battery doesn’t work with Phat PSPs.

Then I tried to Softmod the Phat Battery through my Slim with pan3xx(Pandora Installer for 3.xx -R3a- from Hellcat) but the board version of my Slim doesn’t allow that.

So I came to the conclusion that I could hardmod the Phat Battery but when I opened it I saw that it was different than the normal Phat Batteries, since it was the PSP-110 Battery which is a uncommon chinese version. (the circuit inside the battery was not on the large side but on the small top of it)

Searching google I found out that there was a way to downgrade ofw2.50-2.71 to ofw1.50 and then install a cfw. Since the downgrader for 2.60 needed an UMD of GTA:LCS to run an exploit I updated to 2.71 which used a bug in the XMB Photo menu using a ‘.tiff’ file.

To flash the firmware I also needed the downdater which contains the flashed 1.50 firmware files. To run  the tiff exploit you need to start the psp and go to the Photo menu. There is a 90% probability the PSP will crash. Even if the MS light is on you can safely reset the psp IF THE SCREEN IS NOT TOTALLY RED and try again.

If the screen is red, the exploit is running and you should leave the PSP charging until the psp shuts down by itself. Start the psp again. and run the “kxploit permanent patcher” and run the “3.52 M33UPDATE”.

There ! Now the Phat has a CFW installed.

Install the 3.52m33-3 update just to be able to update to the latest cfw(The latest installers need 3.52m33-3 to be able to update).

(Obs.: only after version 3.80m33 does the Updater in the XMB update to CFWs instead of OFW. If you update to OFW you will need a pandorized phat battery to be able to install a CFW again. Currently I do not know of any downgrader or exploiter of the latest original firmwares.)

Sources:

Downgrader/Downdater 2.71

CFW installer for 1.50




The Author

Older Ramblings

Tweets

Linux User Sig