Wednesday, January 17, 2007
Guru
Tuesday, January 09, 2007
The Second Expedition
Thursday, January 04, 2007
Trek To TPK Hills.
Saturday, December 23, 2006
Thiruvilaiyadal : Comedy galore
Friday, December 08, 2006
Preparing disk images for running Bochs
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.
Tuesday, November 28, 2006
Without system and Net
System crashed a week back bringing down all the plans i had for the semester holidays. Holidays turned out to be a boredom without the system and internet. Had many plans for the holidays but all were in a mess as my system crashed correctly at the first day of my sem hols. Was not able to check mails, chat, orkut or blog for a week. The problem is the entire processing stops after some time. When booted in windows it restarts just after loading the desktop. With linux it boots without problems and gdm runs without problems. But all stops after some time and no further processing occurs. So i configured linux and stopped almost all processes and gdm and now i can work in the shell for around 30 minutes. Spent the holidays reading the stories which i converted from lit to html a few weeks back. Thought it was due to the processor getting heated so i removed the processor, cleaned the processor fan and put it back but the same problem contnues. Still the problem continues and i am not sure what the problem may be. If someone can infer something abt the problem from my description post your ideas about what might be the problem. It may be useful.
Cricket after five years
Thursday, November 16, 2006
Reading .lit files in GNU/Linux
1) Download the clit18src.zip file from convertlit.com and unzip it. Unziping it will produce a Readme file and two folders, lib and clit18.
2) $cd lib
3) make
4) $cd ../clit18
5) Change the Makefile and set the correct path of libtommath.a
6) $ make
That would install the clit in the system. The lit file can be converted using "clit filename.lit dirname/". To know more about the three mode of operations and about the command line options follow the unix tradition of "clit --help".
Monday, November 13, 2006
The Last Lab
Saturday, November 04, 2006
Daemon in Python
try:
pid = os.fork()
except OSError, e:
"""raise exception"""
if (pid == 0):
"""operations"""
else:
os._exit(0)
That is all u need to create a daemon. I used the sched package to schedule the download of rss file repeatedly after some time interval and xml.dom.minidom to parse the file after it is downloaded. All took just some ten lines of code. Python rocks :)