Sense or Nonsense!?

28.07.2009

Migrated to prosody

Filed under: Jabber — Ephraim @ 09:39

So, yesterday I heard about prosody, a jabber server implemented in Lua. After some ground testing, I connected to the room of prosody and found a nice small community with friendly people, who answered all my question very nicely.
After that and the result of my testing, I decided to give prosody a try. Cause of the migrate script from ejabberd2 to prosody, it was easy as hell to migrate everything to prosody. I think it took me less than an hour to migrate the jabber stuff.
Later the day I migrated my transports. This took most of the time, but only caused by me, doing it not how the docu says to do it.

Now I’ll see if it is as nice as I think it is. One argument for me to migrate was the thing, that I’m able to develop modules with a script language (remember, it is build totally in Lua) and that I’m able to re/load the currently developed module on the fly while the server is online. Thats really nice, so I can learn Lua without any problems e.g. need to restart the server or so.

If you want to migrate or setup a jabber server with prosody too, I think I can say don’t hesitate to ask your questions at prosody@conference.prosody.im or ask me at ephraim@0×10.de.

Ciao Ephraim

16.07.2009

THE missing functions in windows …

Filed under: Windows — Ephraim @ 15:15

Here are the two functions I often missed in the windows C/C++ libraries …

#include <sys/types.h>
#include <sys/stat.h>

bool file_exists(const TCHAR* lspzFile) {
	int i;
	struct _stat s;

	if(!lspzFile) return false;

	i = _tstat(lspzFile, &s);

	if(!i && (s.st_mode & _S_IFREG) != 0)
		return true;
	else
		return false;
}

bool dir_exists(const TCHAR* lspzDirectory) {
	int i;
	struct _stat s;

	if(!lspzDirectory) return false;

	i = _tstat(lspzDirectory, &s);

	if(!i && (s.st_mode & _S_IFDIR) != 0)
		return true;
	else
		return false;
}

Ciao Ephraim

07.07.2009

Creating a WinPE 3.0 ISO with Windows AIK and mkisofs

Filed under: Windows — Ephraim @ 13:57

When you have succeeded in downloading and installing Windows AIK for Windows 7 and wonder how you can create a WinPE 3.0 CD now, you are in the same situation as I was some time before.

Of course you can use WinBuilder or PEBuilder or such things, but if you need to do anything by hand, then you’ll need to go the same way as I did.

First of all you can create a basic WinPE 3.0 ISO content with the copype.cmd of the Windows AIK installation.
Just navigate to the folder, containing copype.cmd and fire up the following command (my WinPE working folder is here C:\WinPE, but you can name this as you want):

copype.cmd x86 C:\WinPE

This will copy some files/folders to C:\WinPE.
One folder is called ISO, this is the WinPE 3.0 ISO Content folder, where later your ISO will be created from.
And one file is called winpe.wim, which is the start windows image file.

If you want to have a very basic WinPE, you can skip the next steps and go over to copying the WIM.
I needed to include WMI in the WinPE so I need to include WMI Package into the wim.
For that you will need to mount the WIM, this can be done by the following command:

imagex.exe /mountrw C:\WinPE\winpe.wim 1 c:\WinPe\mount

This will mount the wim to C:\WinPE\mount.
Then you need to install the WMI Package from Windows AIK into the mounted WIM.

dism.exe /Image:C:\WinPE\mount /add-package /packagepath:<winAikFolder>\Tools\PETools\x86\WinPE_FPs\winpe-wmi.cab

So now just umount and commit the wim by executing the following command:

imagex.exe /unmount /commit c:\WinPe\mount

Copying the WIM; The winpe.wim needs to be copied to the ISO Folder. And it must go into the Sources folder as boot.wim.

xcopy c:\WinPE\winpe.wim C:\WinPe\ISO\Sources\boot.wim

Ok, so far the preperations of the WinPE 3.0 ISO Content folder is done.
Now we need to create a ISO of the folder.
For this job, I used the mkisofs.exe, with the following commandline:

mkisofs.exe -iso-level 4 -allow-lowercase -volid "MyWinPe" -b "boot/etfsboot.com" -no-emul-boot -boot-load-size 8 -hide boot.catalog -o C:\WinPE\WinPE-3.0.iso C:\WinPE\ISO

As a hint, try your ISO in vmware before burning it to a cd, or use a cdrw :) .

Ciao Ephraim

Powered by WordPress