Oct 29, 2008

Truecrypt with ext3 on Linux

Yes, first i thougth this would be easy, too.
But after launching the truecrypt application


i got quickly to this page:




This pull-down menu has only the choices for FAT or NONE filesystem... So let's move to the command line:

hades:/home/schroff/packages# truecrypt -t --create
Volume type:
1) Normal
2) Hidden
Select [1]:

Enter volume path: /dev/sda3

Encryption algorithm:
1) AES
2) Serpent
3) Twofish
4) AES-Twofish
5) AES-Twofish-Serpent
6) Serpent-AES
7) Serpent-Twofish-AES
8) Twofish-Serpent
Select [1]:

Hash algorithm:
1) RIPEMD-160
2) SHA-512
3) Whirlpool
Select [1]:

Filesystem:
1) FAT
2) None
Select [1]: 2

Enter password:
Re-enter password:

Enter keyfile path [none]:

Plea
se type at least 320 randomly chosen characters and then press Enter:


Done: 0.370% Speed: 10.7 MB/s Left: 15 minutes

Done: 100.000% Speed: 4.1 MB/s Left: 0 s
The TrueCrypt volume has been successfully created.

hades:/home/schroff/packages# truecrypt -t /dev/sda3

But then i got this kernel error:

Oct 28 22:02:26 hades kernel: Modules linked in: loop af_packet fglrx(PF) iphone(F) binfmt_misc ipw2200 tun vboxdrv ppdev parport_pc lp parport ipv6 button
ac battery vfat fat dm_snapshot dm_mirror dm_mod sr_mod sd_mod snd_intel8x0m sbp2 scsi_mod eth1394 joydev mousedev tsdev snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_intel8x0 snd_ac97_codec rtc ac97_bus snd_pcm_oss snd_mixer_oss ohci1394 snd_seq_device snd_pcm snd_timer i2c_i801 psmouse snd soundcore snd_page_alloc firmware_class pcspkr ieee1394 ehci_hcd uhci_hcd usbcore intel_agp shpchp pci_hotplug agpgart evdev unix lzf
Oct 28 22:02:26 hades kernel: CPU: 0
Oct 28 22:02:26 hades kernel: EIP: 0060:[<f8fff99c>] Tainted: PF VLI
Oct 28 22:02:26 hades kernel: EFLAGS: 00010202 (2.6.21 #3)
Oct 28 22:02:26 hades kernel: EIP is at transfer_none+0x70/0xc4 [loop]
Oct 28 22:02:26 hades kernel: eax: d0fd9000 ebx: 3a748000 ecx: 00000080 edx: cc210000
Oct 28 22:02:26 hades kernel: esi: 3a748000 edi: d0fd9000 ebp: 00000200 esp: cc211e5c
Oct 28 22:02:26 hades kernel: ds: 007b es: 007b fs: 00d8 gs: 0000 ss: 0068
Oct 28 22:02:26 hades kernel: Process loop0 (pid: 11324, ti=cc210000 task=e5e3b030 task.ti=cc210000)
Oct 28 22:02:26 hades kernel: Stack: 00000000 1ee4eecd c7569c05 00000000 00000200 cc211f50 cc211fa0 f8ffe2e6
Oct 28 22:02:26 hades kernel: 00000000 c121fb20 00000000 00000200 01411f00 00000000 00000000 c1f4e900
Oct 28 22:02:26 hades kernel: 00000200 c0fa9000 f8fff92c 00000000 c121fb20 00000002 c1f4e900 823e0000
Oct 28 22:02:26 hades kernel: Call Trace:
Oct 28 22:02:26 hades kernel: [<f8ffe2e6>] lo_read_actor+0x9e/0xdc [loop]
Oct 28 22:02:26 hades kernel: [<f8fff92c>] transfer_none+0x0/0xc4 [loop]
Oct 28 22:02:26 hades kernel: [<c0146131>] do_generic_mapping_read+0x19f/0x46b
Oct 28 22:02:26 hades kernel: [<c014644b>] generic_file_sendfile+0x4e/0x60
Oct 28 22:02:26 hades kernel: [<f8ffe248>] lo_read_actor+0x0/0xdc [loop]
Oct 28 22:02:26 hades kernel: [<f8fff583>] loop_thread+0x38b/0x404 [loop]
Oct 28 22:02:26 hades kernel: [<f8ffe248>] lo_read_actor+0x0/0xdc [loop]
Oct 28 22:02:26 hades kernel: [<c0323712>] __sched_text_start+0x52a/0x5e2
Oct 28 22:02:26 hades kernel: [<c01463fd>] generic_file_sendfile+0x0/0x60
Oct 28 22:02:26 hades kernel: [<f8fff1f8>] loop_thread+0x0/0x404 [loop]
Oct 28 22:02:26 hades kernel: [<c0128c8b>] kthread+0xa0/0xc9
Oct 28 22:02:26 hades kernel: [<c0128beb>] kthread+0x0/0xc9
Oct 28 22:02:26 hades kernel: [<c010486f>] kernel_thread_helper+0x7/0x10
Oct 28 22:02:26 hades kernel: =======================

After some reading i found, that this i due to a bug in 2.6.21... So i had to download a new kernel, do my patches (like tuxonice), compile and get my fglrx driver for my ATI X600...
But after one evening, the next attempt:

hades:/home/schroff/packages# truecrypt -t /dev/sda3 --filesystem=none

hades:/home/schroff/packages# truecrypt -t --volume-properties
Slot: 1
Volume: /dev/sda3
Virtual Device: /dev/loop0
Mount Directory:
Size: 10.0 GB
Type: Normal
Read-Only: No
Hidden Volume Protected: No
Encryption Algorithm: AES
Key Size: 256 bits
Block Size: 128 bits
Mode of Operation: XTS
PKCS-5 PRF: HMAC-RIPEMD-160
PKCS-5 Iteration Count: 2000
Volume Created: Tue Oct 28 20:11:48 2008
Header Last Modified: Tue Oct 28 20:11:48 2008
Data Read since Mount: 4 KB
Data Written since Mount: 0 B


hades:/home/schroff/packages# mkfs.ext3 /dev/loop0

and after that i was able to mount the volume with

hades:/home/schroff/packages# truecrypt -t /dev/sda3






Oct 22, 2008

The lost (collaxa) BPEL-tutorials: 102.InvokingProcesses

After some non-BPEL related blog entries, the next BPEL tutorial. I started with the tutorials 101 (setting up your environment), 103 (XML fragments), 104 (sync BPEL), 105 (async BPEL). Now i think it is time to look how BPEL processes can be invoked.
Let's start with invoking via Perl:
102.InvokingProcesses/perl/invokeHelloWorld.pl



To get this perl script running the helloWorld (101) has to be deployed. It very easy, just type



and just check, that the process was really invoked in the BPELConsole
(http://yourserver:7777/BPELConsole):



That's all. You only have to import

use LWP::UserAgent;
inside the Perl script and create a SOAP request.

This example was only the invocation of the asynchronous HelloWorld without waiting for the response. In the same directory you can find the
invokeCreditRatingService.pl. This scripts waits for the response of the BPEL process, but you have to deploy the CreditRatingService:


You can find it in $ORACLE_HOME/bpel/samples/utils/CreditRatingService (There is a CreditRatingService.jpr inside, so you can open it in your JDeveloper).
Invoking this BPEL via perl will show the following output:


And as you can see the perl script gets the result (560) of the BPEL...




Oct 7, 2008

Comparison: Pausing/Resuming VM with VMWare and VirtualBox

This comparison was done on a Samsung X20 laptop. (So on bigger machines the numbers will look different!).
Some words to the different concepts of VMWare and VirtualBox:

VMWare:
  • Pausing: Freezing all processes & hibernating the VM
  • Resuming: -
VirtualBox:
  • Pausing: Freezing all processes
  • Save machine state: Hibernating the VM
  • Restoring: Reverse function of Save machine state
  • Resuming: Reverse function of Pausing
These differences show, that with VirtualBox, you are able to only freeze all processes and resume them without any I/O for persistency of this state. This is done immediately.
The other transitions last about 9s on VMWare and 5s on VirtualBox (Linux VM with 256MB RAM and no workload).

Oct 3, 2008

Using VMWare Images with Virtualbox

After installing VMWare 2.0 and VirtualBox 2.0.2 i wanted to make a comparison of both virtualization engines. I thought about installing the same guest in both software stacks. But this seemed like too much work ;-). So i started to google about migrating a guest from VMWare to Virtualbox.
I found this helpful blog.
So it is very easy. I created a new Virtual Machine like shown in my posting about VirtualBox and at the step Virtual Hard Disk

i chose Existing...

and added the vmdk-file from the debian-guest, which i used with VMWare Server 2.0.
So i thought, everything was ready but after pressing start the system stopped with:

Waiting for root file system

After a short search, i found out, that VMWare prefers guest systems with SCSI hdd controllers and VirtualBox can only mount IDE hard disks. But this was not really a problem. I started the guest on VMWare and changed the following lines:
in /boot/grub/menu.lst
from kernel /boot/vmlinuz-2.6.18-4-686 root=/dev/sda1 ro
to root=/dev/hda1
and i changed in /etc/fstab all entries with sda to hda. After these changes, the guest bootet without a problem in my VirtualBox.
But it is clear, that with this configuration, it will not run on VMWare. So i changed in the .vmx file all entries form scsi0:0 to ide0:0 and in the .vmdk file the parameter adapterType=lsilogic to ide. Now the guest os is able to start in both virtualization servers.
So everything is ready for a comparison and there is an easy way for migrating from VMWare to VirtualBox, if i want to move...
If you to know how to configure networking via GUI, read this posting.

Oct 1, 2008

Virtual Box 2.0.2: first contact...

After my last posing about VMWare Server 2.0 i decided to try an additional virtualization machine. The first solution, which i found was virtual box, which is freely available as Open Source Software under the terms of the GNU General Public License (GPL).

For my debian notebook i fist downloaded the provided package (http://www.virtualbox.org/wiki/Linux_Downloads) and the installation is straight forward:
dpkg -i virtualbox-2.0_2.0.2-36488_Debian_lenny_i386.deb
and the output is:
Setting up virtualbox-2.0 (2.0.2-36488_Debian_lenny) ...
Adding group `vboxusers' (GID 127) ...
Done.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Success!
Starting VirtualBox kernel module: done.
Starting VirtualBox host networking: done.


After that you just have to type VirualBox and here we go:

Just some screenshots from my first created virtual machine:


When i started i thought that i had an old win95 cdrom...

The RAM size is RAM + swap (which is exactly 3584 MB on my laptop)


After these configurations the Console shows the first virtual machine and i powered it on.

And first a little bit advertising for the main contributor of VirtualBox:

And after this, i noticed, that there is only a win98 cdrom left... But for a first test - insert and:

And one hour later i was able to login:


One very nice thing is the user manual, which you can download here, which is excellent.
After testing this, it is now really difficult for me to decide, if i stay with VMWare Server or if i should use VirtualBox... Let's run both some days and then - time will tell...