niedziela, sierpnia 07, 2011

Troubles with default XP keyboard driver

From time to time windows machines like to play some jokes on me. It won't load, declare an non-readable discs (a cable problem, thank godness) or make some strange key shortcuts...

If you'll ever press Meta+c to produce "ć" letter and end up with calculator opened up instead, press ctrl+alt+del and kill MMkeybd.exe. Also, remeber to remove it from registry :)

czwartek, marca 17, 2011

A nice flick with PLUS GSM SMS gateways (an old one)

I use this functionality occasionally, but find it very useful from time to time.
The following instructions are provided (mostly) for users of Plus GSM polish cellular operator.

Sending a text message (SMS) to an e-mail.

To send a text message from a mobile phone (in PLUS GSM network) to an e-mail (any provider), you need to send text directly to no. 119999 (double one and four nines). The message should consist of the following:

At the beginning of message you should put recipient e-mail address in round brackets, next the topic of the message, also in round brackets (this one's optional, the message doesn't need to have a topic), and finally the message contents. Here's an example of correctly prepared message:

(user@domain) (MessageTopic) Here's the message...

Maximal text message length for a phone is 160 characters (including the e-mail adress).
To have the ability to use this functionality in your phone, set the standard Text Message Center number for Plus GSM network, that is by default: +48 601 000 310

The number of e-mail of messages sent this way is unlimited. The fee for each message is equal to fee for an ordinary text message, accordingly to your price plan.

And the other way around...
In Plus GSM network it is also possible to receive messages sent from any e-mail box directly to your mobile phone, and read it as ordinary text message (no multimedia attachments are allowed).

Sending an e-mail to Plus GSM phone number as an ordinary text message (SMS).

You can send an e-mail to Plus GSM network user by setting the mail recipient address to +48xxxxxxxxx@text.plusgsm.pl (where each x sign marks the digit in
9-position recipient's phone number. The +48 is the international country prefix for Poland). Some e-mail box providers (e.g. o2.pl) do not recognize address with leading "+" sign as correct. In such case, just drop it :) The "48" at the beginnng of the address will do just fine.

Maximal e-mail message length is 620 characters ([plain text! watch out for HTML e-mail encoding] including the recipient address and message topic). If the message length is over 160 characters, the system will automatically divide it into few smaller ones.

The number of e-mails sent this way is limited, but no further information about specific numbers is given by the network operator.
The gateway is for non-commercial use only and the operator (Polkomtel S.A.) takes no responsibility for other provider's services based on this gateway.

Hope it works for you as fine, as it works for me.

poniedziałek, marca 07, 2011

Things to do when booting from WinPE

If You already got WinPE and can boot it (if You don't/can't - wait till i write some more about it) there are some things You'll want to remember (or write as a step-by-step ruleset):

  1. Partition harddrive using diskpart (really an awful piece of software, but it works):
    • Set label letters (using LABEL LETTER=C)
    • Set active partition
    • Format parttions using LABEL="" and QUICK
  2. Fix bootsectors using bootsect /nt52 all
  3. Mount samba share with net use y: \\server\windows
  4. Run XP Installer from Y:\I386\winnt32.exe

środa, lutego 02, 2011

How to boot WindowsXP installation using PXE?

Yesterday i explained how one can boot normal OS using PXE. Today let's plunge into dark, evil world of windows machines and Microsoft quasi-standards.
First though I'll have some fixes to yesterdays conf files:
  • To get graphical UI i used vesamenu.c32 from SystemrescueCD and added line UI sysresccd/isolinux/vesamenu.c32 at the beginning of pxelinux.cfg/default
  • I removed PROMPT, TIMEOUT, ONTIMEOUT, and MENU DEFAULT directives, as i didn't need them - it's always better to wait for user input and boot right choice instead of booting twice, right?
  • I tried to use syslinux's pxelinux.0, but ended reverting to sysresccd's one (it told me that menu.c32 isn't correct chain file)
So, on to the show now, let's head into black magic of windows standards and not-quite-so-compatible software.
First thing to get was syslinux (hey, i had that one already!?) for memdisk loader. Memdisk loader is nice piece of software which enabled me to use ISO image as initrd to boot from. I copied it into $tftproot/images/memdisk.
Next thing is to get Windows XP (2003 should work too) installation disc. I modified it using nlite and some patches, so i won't have to download them after installation. Tweaked some settings to fit my needs too, but nothing serious, so i won't break things. I didn't end with finalising it into ISO image though - there's one more thing to do with it.
It looks like windows needs additional driver to make use of RAMdisk after the GUI part of installation boots up. I used WinVBlock - it's OpenSource and stuff. After unpacking it i cd'ed to it's directory and then make this into cab file using

makecab WVBlk32.sys WVBLK32.SY_

and copying WVBLK.SY_ into I386 dir in xp disc.
But that's not all - apparently windows doesn't load all drivers automagically - i ended up adding it into modules load list. How? By adding those lines to appropriate sections of i386/TXTSETUP.SIF:

[SourceDisksFiles]
wvblk32.sys = 1,,,,,,4_,4,1,,,1,4


[SCSI.Load]
wvblk32 = wvblk32.sys,4


[SCSI]
wvblk32 = "WinVBlock RAMdisk driver"


Now all that's left is to pack XP installation CD into ISO image and we're done. Despite having MagicIso i used CDImage_gui - there was easy howto for it, but for backup's sake I'll describe entire process:
  1. First thing Is to install (unpack) it.
  2. Fire it up and specify directory containing unpacked XP disc and file to pack it into (it can't be inside the source directory)
  3. Then, on Configuration->Boot specify boot.dat file (it's in CDImage dir)
  4. Click on Creation, then on Start Image Creation and voila!
Now everything that was left was copy brand new ISO file into $tftproot/windows_xp/ dir and add new entries to pxelinux.conf/default:

label WinXP
menu label Windows XP SP3
kernel images/memdisk
append raw iso
initrd windows_xp/XPDISC.iso

That should do the trick. I also made second image without "Press any key to boot installation disc". To do that, i removed i386/bootfix.bin file.
And remember, it takes looooong to download whole disc (for me ~570MB) to RAM. On my EEE PC 1000H and 100MBit connection it took like 3 minutes. But the initial driver loading took approx 0.3 sec, and i think it would take really short to copy files from ram to disc after partitioning, so it's fair trade for me. And no additional discs/USB drives either!

Links that i used during this experiment:
  • http://pxe.dev.aboveaverageurl.com/index.php/PXE_Booting/Windows_2003
  • http://unattended.msfn.org/unattended.xp/view/web/15/
  • http://www.windowsupdatesdownloader.com/Default.aspx