Under The Wire

Under The Wire

Tuesday, April 21, 2009

How to enable the graphical boot Plymouth on Fedora 10

Hi guys,
few days ago I wrote a little guide to help people install VMware Tools on your brand new Fedora 10 installed through VMware Fusion (actually the same instructions are valid for VMware Player and VMware Workstation too) and now I am here again to report some other tips.

At the moment I am still configuring my Fedora-box to fit my habits and I am obviously tweaking the user interface too.

Booting your Fedora-box you surely saw an ugly blue/light-blue/white scrolling bar, in order to see the graphical boot you need to edit your /boot/grub/menu.lst (actually a symbolic link to /boot/grub/grub.conf) adding the right configuration that fits your video card and your screen resolution.

Let's start, open a Terminal window, elevate your permission with the su command and type gedit /boot/grub/menu.lst. Modify this chunk of the configuration file adding the text in bold (actually you need to add the same text to every boot entry):

title Fedora (
root (hd0,0)
kernel /vmlinuz- ro root=/dev/VolGroup00/LogVol00 rhgb quiet vga=792
initrd /initrd-

With vga=792 you’re saying that the screen resolution is 1024x768 and colors are 24-bit deep (to find the right VESA mode take a look at this page).

Enjoy the graphical boot.
See you


Friday, April 17, 2009

Megavideo Unlimited: Free premium account

The last m-atteo’s post on Megavideo showed you some tricks to view more than the usual 74 minutes on Megavideo.

Surfing on the web I found a really interesting service that allows you to get rid of the 74 minutes limitation and enjoy the full length videos.

It just requires you to past a link to the video you want to see and will redirect you to a new page with the unlimited movie. A way better than have to disconnect you form the internet in order to get a new IP address or mess up with your browser cache.

Another tools it may help you is the Illimitux Firefox plug-in.

If you want to have a better quality (I think you should want to see something better than what Megavideo usually shows you) you just have to copy the video URL and change megavideo.com with stagex.eu. For example if you like to view “Push” in hi-quality you have to change this link http://www.megavideo.com/?v=SAVASILH to this http://www.stagex.eu/?v=SAVASILH


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:


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.


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.


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.


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

Back to TOP