Under The Wire

Under The Wire

Friday, April 17, 2009

Install Fedora 10 through VMware Fusion 2.0

Hi guys, lots of time passed since I posted on this blog so, here I come.

Just like my friends matteo, tciddanniw and wisher I have lots of stuff to do including university courses’ projects. In order to develop some of them I need to run Linux and as you probably know I am a Mac OS X user so, having only a single notebook, I need to run some virtual machines in order to accomplish my tasks (I don’t consider dual-boot - or worse triple-boot - as a solution, just like my friend wisher).

This time I’m going to use Fedora 10 so, let’s start. First of all, what we need?

  • Mac OS X 10.5;
  • VMware Fusion 2.0.4 (this version corrects a pretty serious security issue);
  • Fedora 10.
In contrast with Ubuntu, VMware Fusion doesn’t have a predefined profile for Fedora so you have to choose one; I chose Red Hat Enterprise Linux 5 64-bit (because I’m using Fedora 10 x86-64, choose the profile according to the architecture you chose to use). Now you can modify the profile of the virtual machine as you like (I assigned 2 virtual cores, reserved 512 MB of RAM and created an incremental SCSI hard disk of 64 GB).

Now you can boot the virtual machine and install the operating system just like you would do if you’re dealing with a real machine; the installation is straightforward and I don’t think you need my directions. When the installation is completed I recommend you to fully update the operating system (if you are installing Fedora 10 right now you need patience due to the pretty high amount of updates available).

The installation of the VMware Tools is the most tricky part, anyway it is still simple. First of all you need some packages to build VMware Tools so, open a Terminal windows, elevate your permission with the su command and then type:

yum install gcc make kernel-devel

I advise you not to close the Terminal window, you will need it in a few seconds. Select Install VMware Tools from Virtual Machine menu, a mounted DVD should appear on your desktop, double-click on it to enter and then copy the archive containing VMware Tools (if you're using VMware Fusion 2.0.4 the archive name is VMwareTools-7.9.3-159196.tar.gz) on a local folder such as ~/Downloads. Unpack VMware Tools (either using the Terminal or the Graphical User Interface) and get to the resulting folder using the Terminal window you used before (which should be an elevated Terminal). To install VMware Tools you need to type:

./vmware-install.pl

answer yes to all questions except for the one that talls: “The configuration file /etc/X11/xorg.conf can not be found. Do you want to create a new one? (yes/no) [yes]” here you have to answer no because Fedora 10 doesn't use the /etc/X11/xorg.conf file to store X's configuration.

When the installation finished you only have to restart the virtual machine and enjoy your virtualized operating system.


Read more...

Wednesday, April 15, 2009

Integrate a CUDA kernel in your projects

Recently I told you how to setup a Virtual Machine with VirtualBox running openSUSE (Yeah, this time I spelled it right).

As I wrote on the previous post all the mess was due to a project with nVidia CUDA, porting some data intensive tasks on the GPU.

Working on an existing project I had some troubles integrating the new code with the existing sources editing the makefile.

To build your executable with a CUDA kernel you have to do this:

  • Compile CUDA sources with nvcc (You have to install CUDA toolkit to have it), generating an object file.
    Be sure that when you include functions headers from your C project into the CUDA sources you state that what you are importing is C code. To do that use extern “C” {#incude “whateverYouWant.h”} and it will be fine.
    $ nvcc --compiler-options -fno-strict-aliasing -I. -I/opt/cuda/NVIDIA_CUDA_SDK/common/inc -I/opt/cuda/include -o objectCUDA.o -c SOURCE.cu
  • Compile the project C code with gcc, producing the object files, as you do usually.
  • Link all together, using gcc. Be sure that you link all the required libraries.
    gcc -o EXECUTABLE object1.o object2.o objectCUDA.o -L/opt/cuda/lib -lcudart -L/opt/cuda/NVIDIA_CUDA_SDK/lib -lcutil

With this tips you should be able to edit easily your project makefile and have all the things working.


Read more...

Friday, April 10, 2009

openSUSE 11 on VirtualBox

Hi, dear Under The Wire readers, if there is still anyone after our long, really long silence.

FromClipboard I’m sorry to tell you that we have been and we still are really busy for our University stuffs, damn PoliMi. We also got a life, and this is the real reason we are not posting anymore… unfortunately for you when we had to choose what to do in our spare time blogging like nerds wasn’t the coolest thing we should have done, so the blog was quite abandoned to itself.

After this really interesting introduction about our life (I know you care about us) let’s go Bardo (If you don’t understand this don’t worry) back to the real topic of this post, even if it is quite boring… I have to write somewhere some notes on how I set up this f***king virtual machine, just to remember what I have to do to make all the things work in a reasonable way. Of course I also share these notes hoping that will be useful.

Let’s start form the beginning, for our course of High Performance Processors and Systems (HPPS for its friends) I have to develop a CUDA application starting form an existing pthreaded (Damn PoliMi, again) algorithm.

Since I don’t even consider dual boot nor switching to Linux as my primary operating system and I don’t have any second PC to use only for UNIX development I had to install all the stuffs on a Virtual Machine.

I choose VirtualBox just because it is free and it comes from Sun (Seems they crippled my mind with Java). It works quite well, but you have to download the latest version. With the previous version I experienced really annoying problems with networking. A single download was able to take forever, hogging the  CPU of my poor computer, even trying to make my Facebooking harder (Playing with VirtualBox process priority fixed my facebooking, but wasn’t helpful for the networking of my virtual machine, so install the latest version and you will be fine).

Create a virtual machine. Basically you have to choose how much RAM and disk space you want to waste. As usual, the more the merrier.

Next step is to download and install openSUSE 11 (I know it is not considered the best distro, but nVidia supports it). Take the live cd and go on. I an not here to teach you how to install a Linux distro, however I think that there is no need to tell you what to do. Just mount the cd and follow the instruction. Trust me, it’s easy.

When you have you openSUSE installed (You managed to install it, isn’t it?) we can enjoy and have some fun installing VirtualBox additions. First of all you need to download gcc, make (openSUSE should be really user oriented if it lacks these tools) but also kernel-source. If you are lucky it’s enough, otherwise you also have to update your kernel, to have the same version of kernel and sources (Oh, maybe openSUSE is not that good).

When you have downloaded and installed these tools mount VirtualBoxAdditions fake cd rom and install it with the shell script included. After a while and a reboot you should have it all up an working. But don’t worry, the fun isn’t over.

To avoid strange and really annoying problems you need another little fix. Open control center, look for screensaver and disable both screensaver and lock screen, unless you want to have a really cool black screen every time you forgot your virtual machine in the background for ten minutes.

Now all is behaving quite well (I still have to fight with makefiles, but this is another story and is too of topic even for this post).

See you, when I will blog again.


Read more...

Wednesday, March 18, 2009

Windows 7 Release Candidate: how and when download it!!

By now is official Windows 7 will be released between last week of April and second week of May!!

Many sites (http://www.engadget.com, http://www.hwupgrade.it/, http://blogs.msdn.com,…) report these weeks, but for now there isn’t a fixed day because Microsoft doesn’t want repeat the errors of first public beta and it is preparing a more efficient download system.

How will it can download? Microsoft didn’t decided if RC version will be downloadable for all, but for now it’s sure that tester which submitted a number minimum of feedback will can download new version.

Windows 7 RC will stop to work 1 September, only one month after first beta. The reason of this choice is that Microsoft received good feedback and thinks that RC fixed bug of first beta. It might be thought that Microsoft wants anticipate Windows 7 launch at January 2009.

The some changes between Beta and RC are reported on this page: Some Changes Since Beta for the RC.

Bye.


Read more...

Tuesday, March 17, 2009

Windows 7 and Antivirus: what is the best?

antivirussceltavm9 After two months from Windows 7 beta release, also some important Antivirus software house update their products.

Actually, the antivirus that run on Windows 7 are:

Kaspersky Lab was first software house to update its product. Kaspersky Antivirus is release as beta, but is stable and full compatible with Windows 7. This beta is free and includes a firewall, a anti-spam filter and other features of KAV 2009.

Symantec, recently, updated Norton Antivirus. This is a free Beta, but I don’t like it because is very unpleasant to use.

AVG updated their software but only professional versions and you have to pay to use.

McAfee is updating their antivirus, but the actual beta has many problems.

Avast and Antivir are, probably, most used free antivirus and fortunately they work without problems on Windows 7.

Personally, I recommend to use KAV until is free and then switch to Avast.

On How to Geek you can find tests of some of these antivirus.

If you want recommend other antivirus write a comment with your motivations.

Bye.


Read more...

  © Blogger template 'Minimalist E' by Ourblogtemplates.com 2008

Back to TOP