Tuesday, November 16, 2004

Mounting Bochs hard disk image

Today I have made some tests with the loop device, because I want to exchange files with the bochs disk images. This is what I found out: 1. Using Floppy images is easy, because there is no partition table: losetup /dev/loop0 /usr/local/bochs/dlxlinux/floppya.img Now you can use the image like a real floppy: - format : mkfs.minix /dev/loop0 - filesystem check : fsck.minix /dev/loop0 - mount : mount /dev/loop0 -o loop /mnt/floppy Before you want to restart bochs you must do this: losetup -d /dev/loop0 Don't forget to umount before. 2. If you want access to a hard disk image, you have to calculate the size of the first cylinder. This value is the offset argument for losetup. offset = bytes per sector * sectors per cylinder The command for dlxlinux image looks like this: losetup /dev/loop0 /usr/local/bochs/dlxlinux/hd10meg.img -o 8704 For images created by bximage you must use the value 32256. 3. The hard disk image access doesn't work if the image contains more than one partition. 4. I have made this tests with linux and I don't know how this could be done with other operating systems.

Wednesday, September 01, 2004

Modifying Styles with Javascript

Manipulate CSS with javascript

Friday, July 16, 2004

Set PHP include path in runtime

ini_set('include_path',ini_get('include_path').';'.'C:/gtkdev/scripts/firemail/global_include');

Saturday, July 03, 2004

CodeGuru: Interfacing VC , Java, and Assembly

javah jnitest
cl -c jnitest.cpp /Ij:\jbuilder8\jdk1.4\include /Ij:\jbuilder8\jdk1.4\include\win32 -Fejnitest.dll -MD
link jnitest.obj mydll.lib /dll
CodeGuru: Interfacing VC , Java, and Assembly