Opensolaris starter Kit

Yesterday got a fully sealed pack with US seals and custom verifications etc. It was none other than the Opensolaris starter kit. The kit contained two DVDs, the first one contains several live solaris distributions and the second one the solaris express. All that is fine but while ordering i forgot two things about my system and opensolaris. One is that my system still doesnot have a DVD reader and solaris does not run in 128MB RAM. So sealed the pack again and left it for future use. After Ananth’s session on DTrace and ZFS i was eager to test them. But i would be stress testing my system if i try installing or running any distribution of solaris. Waiting for the first month salary to upgrade my system. Till then no other go should continue with the existing system. Grrrrrrrr….

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.

Device Driver For Goatee

That is the title of my final year project. Just started looking into the present state of goaTee. Thanks to the beautifully written docs by our seniors. We started it with just the passion for operating system development driving us into the project. My first experience with the operating system development was with AAOSK – Application adaptive operating system kernel. That was a great oppurtunity for us to get some feel of operating system development. Though our part in AAOSK is very small that gave us the oppurtunity to know about some GNU tools, difficulty in OS development and of course we listened to some beautiful lectures by our seniors. Now i am back with OS development and with greater aims and greater responsiblities. I am still reading the documents and to be more specific still searching for documents that would give some information about the device driver development, but could not get much.

Yesterday we had the zeroth review of the project and it went pretty cool. The questions were easy and the review lasted for about twenty minutes. Now it is time to do some hard work and start the implementation. For those who want to take a look at the presentation that we did for the review it is available here