Saturday, December 23, 2006

Thiruvilaiyadal : Comedy galore

Thiruvilaiyadal manages to keep the crowd roaring with laughter from the begining to the end. A great movie that comes with overdoze of humour. Thiruvilaiyadal rightly named potrays the game played by Dhanush with Prakash Raj. The story is the long existing story of a low class youth falling in love with the heroine. As usual it is love at the first sight. Dhanush falls in love with Shriya at the first sight. Shriya's brother Prakash Raj is the villain who tries to get rid of Dhanush from his sister. He fixes a price for Dhanush's love. Dhanush accepts the money, and how he uses the money and how he manages to get shriya form the rest of the story. Though the story is something that u see in most of the tamil movies, the way in which the story is handled in Thiru... is amazing. Dialogues are a major plus point. Dhanush performance masks every other thing. Some songs may capture attention. On the whole Thiru... is one of the great movie iatched after a long time.

Friday, December 08, 2006

Preparing disk images for running Bochs

This is the first step that i learnt before two years when i learning OS. But inspite of seniors best effort to make us understand i think we understood only half. It was proved when we were trying to run bochs for our final year project. The task was to create the disk images and to install grub in the disk images to boot our kernel. We had a vague idea about the steps that we followed in our second year and finally figured out the right way and understood a lot. Some juniors were also asking us about how to run bochs for the first time. So thought of posting about it.

Creating disk images : The first step would be to create disk images. The utility available with bochs called as bximage can be used to reate disk images. Create a floppy disk image by specifying fd as the disk type and a hard disk image of size 10MB by specifying hd as the disk type while using bximage.

Partitioning the hard disk image : Then the harddisk should be partitioned. For this purpose we use some small linux distributions ike dlxlinux. Using bochs boot with dlxlinux image as the master disk nd the created disk image as the slave. Once dlxlinux is booted use fdisk to partition the slave disk as "fdisk /dev/hdb". Create a new partition and then create ext2 filesystem on the partition using the command mk2efs /dev/hdb1.

Copying the grub files into the disk image: After partitioning the disk image file we should copy the grub files into the image. To do this attach the image file as a loop device and then mount the loop device. These steps will require root previlege

losetup -o 32256 /dev/loop/0 diskimage
mount /dev/loop/0 /mnt/loop
cp /boot/ /mnt/loop/
cp kernel /mnt/loop/boot
Edit the menu.lst file to boot the kernel.
umount /mnt/loop
losetup -d /dev/loop/0

Installing grub in the disk image: After the grub files are copied the next step is to install grub on the hard disk image. This is where the floppy disk image we created earlier comes into use. Attach the floppy disk image as a loop device and use grub-floppy command tocreate bootable floppy disk image. The commands would look like

losetup /dev/loop/0 floppyimage
grub-floppy /dev/loop/0
losetup -d /dev/loop/0

Once the boot floppy image is created edit the bochsrc file to boot from the floppy with our hard disk image as the master disk. Now bochs boots the floppy disk image and u get the grub command prompt. Once the grub command prompt is obtained follow the long established steps of root (hd0,0) and setup (hd0) to install grub on the harddisk image. Now u can test ur own kernel using bochs. Bochs reads its configuration setting from the file bochsrc. This is the file that instructs bochs about the master disk or slave disk or disk to boot etc.