Monday, August 30, 2010

Pintos Project 2

Hi all ,

This is for my friends who are stuck with pintos project 2. I encountered few problems while creating a virtual disk for use with pintos. First of all the instructions given in pintos guide are outdated, and need few changes. Secondly the guide is different from installation manual, and don't talk much on virtual disk. I have enlisted the steps to followed :-

  1. First of all use make in directories pintos/src/examples pintos/src/userprog pintos/src/threads

  2. Now your working directory is pintos/src/userporg

  3. pintos-mkdisk fs.dsk 2
    This command will create a new disk named fs.dsk in current directory. Note that this command have variants, and change between versions. So better type pintos-mkdisk , to get the latest syntax.
  4. Now edit pintos perl script which resides in bin (most probably, bin have few more scripts such as pintos-gdb pintos-mkdisk etc). Change os.dsk to $HOME/pintos/src/userprog/os.dsk from $HOME/pintos/src/threads/os.dsk where $HOME is for making the path absolute. If we don't do this we might error like "option -f not found" and suffer from kernel panics. -f option is used in second step.
  5. Format the disk using pintos -f -q (better from pintos/src/userprog to avoid any confusions).

  6. Other instructions are same as given in pintos guide.
The pintos guide is awesome, but is a bit outdated at few places. :)