Advertisements
Home > Information Technology, Operating System, Software > Installing PintOS on Linux Ubuntu 10

Installing PintOS on Linux Ubuntu 10

I guess the title is a little bit misleading and I think you can do this in any kind of Linux distribution you can find. However, I tried this method in Ubuntu 10 and it works perfectly. Also, although I state this as installing PintOS on Ubuntu 10, what I’m doing is rather installing PintOS on a Boschs virtual machine on Linux. But since that will be a long-ass title, I think this is simpler.

Anyway, let’s get busy! PintOS is actually a small operating system with limited functionalities. Perhaps the reason for using such crappy OS is to make yourself acquaintance with how OS really works by implementing synchronization, memeory management, scheduler, and other things that an OS does. I will try to post a sample problem concerning operating system if I have time, but now, let’s focus on how to get it done.

1. Downloading PintOS

Well of course you have to download it first to get this done. If you don’t know how to find one, you can use the link I provide you with:

http://courses.mpi-sws.org/os-ss11/assignments/pintos/pintos.tar.bz2

Untar the file and put in the directory of your choice. In this case I use /home/kazasou/workspace-os.

2. Installing Bochs

Boschs is a virtual machine that is suitable for running PintOS. You can actually can use other virtual machine such as Qemu or VMware Player, but in this case, I think I will use Boschs. The assignment that was given instructed to use the binary version of Bochs but I guess for simplicity, I like it to just install the Boschs application. So, in your terminal, type:

sudo apt-get install bochs

You might also required a Bochs-x installation for the GUI of the Boschs virtual machime so let’s do that also:

sudo apt-get install bochs-x

If you are done with your Bochs installation, let’s proceed to the next part.

3. Configuring environment for PintOS

Next part is to direct the Bochs application to your PintOS and create a bash script so you can run PintOS command on your terminal. Make sure you have the tcsh command for your terminal. If not, then you can just simply install tcsh by typing:

sudo apt-get install tcsh

Once you have the tcsh command, type:

tcsh

to go to a tcsh shell and create a file .tcshrc in your home directory (/home/kazasou). You can use vi or vim to edit the .tcshrc script but I personally love to use vim:

sudo apt-get install vim

vim .tcshrc

In the .tschrc file, put this line:

set path = (/home/kazasou/workspace-os/pintos/src/utils $path)

Notice that the path of the PintOS directory should resemble the directory of PintOS you have put into. If you have put the line, save the file and invoke source command to compile the .tcshrc script:

source .tcshrc

Now, exit the .tcshrc shell to return to your bash shell. Edit the .bashrc script on your home directory:

vim .bashrc

Run along to the end of the line and add the following line in the .bashrc file:

export PATH=”/home/kazasou/workspace-os/pintos/src/utils:$PATH”

Notice also that the PATH has to point to the directory of PintOS you have put in. If you are done, then you have successfully have a running PintOS at your disposal.

4. Running PintOS

Preferably, I like to install build-essential just to make sure I can compile the source file in the PintOS directory:

sudo apt-get install build essential

But if you are able to already compile PintOS source or C file then I guess you are okay to go. So, let’s try to run alarm-multiple test in the PintOS directory. Go to the ../pintos/src/thread/ and run make command. Then, run the alarm-multiple by typing:

pintos — run alarm-multiple

If this brings you to a Bochs interface and run the alarm-multiple, then PintOS has successfully run in your system. Congratulation!

Advertisements
  1. ypsilon
    May 15, 2011 at 4:52 pm

    Hello, first of all thank you for this tutorial! I’m trying to compile PintOS with make on the /src/threads directory, but it shows an error: there are a few undefined references to __stack_chk_fail in some source files. Did you have some sort of problem like this? Thank you

  2. July 30, 2011 at 11:38 am

    thank you very much for the tutorial. i tried this in ubuntu 10.04 and it works fine.

    • jawad chughtaii
      November 18, 2012 at 8:27 am

      hi
      i am facing problem after sudo apt-get install build-essential…when i run pintos — run alarm-multiple command, an error encountered pintos command not found…how can i fix it…

      • Khosu
        November 27, 2014 at 5:33 pm

        Did you get it?

  3. October 15, 2011 at 5:36 am

    precise and useful info…

    Thanks
    Ashish

  4. manman
    June 28, 2012 at 3:58 am

    mine has error “Prototype mismatch.” can you help me with it?

  5. Rahu
    June 26, 2013 at 9:45 am

    set path = (/home/home/delta/Desktop/BTP/pintos/src/utils $path)

    source .tcshrc gave me this error

    • Rahul
      June 26, 2013 at 10:20 am

      I was doing it wrong way .

  6. Ahmed Nasser
    November 1, 2014 at 1:57 pm

    no such file or derctory
    this error attempt to prevent the installation

  7. Khosu
    November 27, 2014 at 5:32 pm

    not able to run alarm-multiple command.please help asap

  8. sowmya
    May 21, 2015 at 2:44 pm

    i am facing problem” pintos command not found” when i run pintos run alarm-multiple…how can i fix it

  9. October 24, 2015 at 7:11 am

    I reached the second last step but then, “pintos — run alarm-multiple” doesn’t execute. Says:
    lush@leonardo:~/Desktop/Desk/5 Semester/OS/Project/pintos/src/threads$ pintos — run alarm-multiple
    No command ‘pintos’ found, did you mean:
    Command ‘pintod’ from package ‘pinto’ (universe)
    Command ‘pinto’ from package ‘pinto’ (universe)
    pintos: command not found
    lush@leonardo:~/Desktop/Desk/5 Semester/OS/Project/pintos/src/threads$

  10. Greg Jo
    June 8, 2016 at 11:50 pm

    Good discussion – With reference to which , if someone is requiring to merge some PDF files , I stumbled across notice here http://goo.gl/6Nf5Cs

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: