Dec 07 2012

Compiling, compiling … done.

Category: English posts,TechnicalIuliana @ 14:13

As you noticed from my previous post, a few days ago I started updating a Gentoo VitrtualBox machine.
Right after the update used:
#emerge -av –depclean
And
#revdep-rebuild

And that’s when all went to hell. Apparently a lot of my packages were considered unnecessary and were unmerged. Among them some dependencies for the VirtualBox modules which made my virtual machine forget about the graphical interface. The possibility of displaying a log on the five inch window to see what the problem was , was not an option so the first step was to fix the system a little so that I could at least have access to a bigger screen.

The solution was simple in my case, just emerge –sync and emerge world again . And surprise!! a new version of Kde was available, 4.9.4 and the system proceeded to installing it. So I said, what the hell let it do it! After a few hours of torture, during which I searched for a solution to make the VirtualBox modules work in order to be able to make my virtual machine interact friendly with the underlying OS, a Windows 7, I found a guy on a forum which had a similar problem and his solution was to upgrade the kernel. So I checked the version of kernel I was using. Indeed was an old one. A new one was not such a bad idea. So I downloaded the new sources and got to work taking the same steps specified by the manual. By the end of the night I had a fresh 3.5.7 kernel and the same problem with the VirtualBox modules. I unmerged them (virtualbox-guest-additions and virtualbox-modules), emerged them again. But the situation was the same. I was going out of my mind, not knowing what the problem was. So at the end of my patience, I asked an expert: Rpx. Based on a piece of message found in a log file in /var/log “vbox disagrees about version of symbol module_layout”, he concluded that my VirtualBox modules were compiled with a different kernel dependency. Well, that’s was all I needed.

I wend on and recompiled the kernel using:
#genkernel –menuconfig –bootloader=grub all
And when configuring it I took a look here and selected the options recommended for a VirtualBox machine. The kernel was compiled, I just unmerged and remerged the virtualbox stuff and instead of following the steps in the previous link I just followed the instructions displayed in the console at the end of the compilation for virtualbox-guest-additions.

I restarted the system and… voila! My virtual machine is up and running and interacting with Windows just fine.

Disclaimer:This is not a tutorial on how to fix a Gentoo VirtualBox Machine, it is just a post in which I brag about the fact that I can do it. :D You could take it as an advice to Read The Fucking Manual!, because that’s what helped me in the end.

Tags: , , ,


Dec 05 2012

Emerge kinfocenter-4.9.3 fails [Simple Solution]

Category: English posts,TechnicalIuliana @ 12:31

A few weeks ago I switched back to Linux at home, because the training for the Spring Certification exam ended (setting up the official working environment on Linux was a pain, that’s why I worked on Windows for a while). At home I have SolusOS, which takes care by himself of updates and stuff( I chose because it was more suited for a laptop). Switching back to Linux at home, made me fell like working on Linux at work too, so I remembered I had a VirtualBox machine with Gentoo on it. So I started it and begin updating it, because the poor thing was not used in a while, so this process was unavoidable.

I intended to run the basic command for updating a Gentoo system, as recommended on their official site:

# emerge --update --deep --newuse world
# emerge --depclean
# revdep-rebuild

Unfortunately it was not so easy, because I have stumbled across this problem. So kinfocenter-4.9.3 failed to compile and the problem was a missing library, obviously, but the log message was not very clear. I have to mention that when it comes to Linux I am not such a guru, so after trying the solution on the forum and failing miserably, I stared trying anything just to make this work.

The problem was obviously with the media-libs/mesa library. I had the 9.0 version installed already and as I figured from the forum topic kinfocenter-4.9.3 depended on mesa-8.0.4-r1. Apparently the solution was simple, just unmerge the current version and install the required one, the old one.  Which I did, meaning I unmerged mesa-9.0. And after doing that, I had an idea.

What  if I used revdep-rebuild? Because that’s what the manual says it does:

revdep-rebuild scans libraries and binaries for missing shared library
dependencies and attempts to fix them by re-emerging those broken bina-
ries and shared libraries. It is useful when an upgraded package
breaks other software packages that are dependent upon the upgraded
package.

And I used it. And it worked, kinfocenter-4.9.3 was installed successfully and is working fine with mesa 9.0 which was automatically installed by revdep-rebuild. :|  So my solution to fix this is made of two steps:

# emerge --unmerge media-libs/mesa
# revdep-rebuild

After revdep-rebuild finished I continued with the update of the system, and so far all is working great.

Sometimes it’s better not to be a guru in a specific domain, because it gives you the opportunity to find new and simple solutions.

Tags: , , , , ,


Jan 16 2012

VirtualBox with Gentoo(4)

Category: English posts,Miscellaneous,TechnicalIuliana @ 13:58

This post is the not about the virtual machine or Gentoo, is more about setting up the tools that you will use to develop your applications and other good practices.

First, let’s talk more about environment variables. I mentioned in my previous post the JAVA_HOME variable. Most development tools need their environment variables too and they are not set up by Gentoo, so we will have to do this the way I like it, by hand. Every user has in it’s home directory – in /home/[username] (on my machine /home/jules) a file named .bashrc.The good practice is to edit this file by adding the necessary environment variables required by the tool that user will use.

1. Apache Ant

Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. The main known usage of Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications.

It is easy to use, quite practical and I recommend it for small scale applications. The installation of Ant consists in unpacking the a

rchive, setting the ANT_HOME and adding the bin directory to the environment PATH variable of Gentoo. Also, the bin directory for Java should be added too, we’ll do that too.

To download ant, go to http://ant.apache.org and under Download menu item, there is a Binary Distributions link, click on that. On the frame on the right you will have a set of links which point to current versions of Ant. Download the tar.bz2 archive, you can use Firefox to do that or you can use wget:

# wget http://mirrors.hostingromania.ro/apache.org/ant/binaries/apache-ant-1.8.2-bin.tar.bz2

Then you have to unpack it:

# tar xpf apache-ant-1.8.2-bin.tar.bz2

After unpacking you will have a directory named apache-ant-1.8.2, usually I rename it to ant, because the version is not that important when the update is made by copying the new version content over the old one. You can copy it where you want, I usually leave it in the home directory for the current user. Then we have to set the ANT_HOME environment variable.

# cd ~ (gets you in /home/[username])
# nano -w .bashrc

Add the following lines:

# export ANT_HOME=/home/[username]/ant
# export PATH=${PATH}:${JAVA_HOME}/bin:${ANT_HOME}/bin

Save. (Ctrl+X,Y) Test the new environment variables:

# echo $ANT_HOME
# echo $PATH

Continue reading “VirtualBox with Gentoo(4)”

Tags: , ,


Dec 24 2011

VirtualBox with Gentoo(3)

Category: English posts,TechnicalIuliana @ 3:35

Well, we have a VM with Gentoo and an interface. Let’s make the virtual machine more flexible and more cooperative with the operating system on your computer. For this we have to install VirtualBox drivers on your Gentoo. After restarting your system upon setting up the interface you can log on to your desktop interface. But for installing other tools you will still  need the console. For the purpose of this tutorial we will use the Kde terminal named konsole.

To open a terminal: click the button on the left corner of the screen (the “K” button) and in the menu that is displayed at the top there is a text field. Type konsole and click on one of the results returned. (print-screen) Or press Alt +F2 and the same text field will appear at the top of your desktop. You can use it to start any application you want. You will be logged in with the normal user so in order to install things you need root access. So, in the terminal you need to use the su command:

# su -

You will be asked for the root password which you will type and then you can start installing. (By the way if any emerge process happens to fail, you can force to continue by using: # emerge –resume)
Continue reading “VirtualBox with Gentoo(3)”

Tags: , , , , ,


Dec 16 2011

VirtualBox with Gentoo(2)

Category: English posts,TechnicalIuliana @ 18:18

Step6.Configuring the Compile Options – this is the next step. The compilation options are kept in the /mnt/gentoo/etc/make.conf  file. You can edit this file by executing:

# nano -w /mnt/gentoo/etc/make.conf

Navigate using arrow keys to the end of the file and add line: MAKEOPTS=”-j2″.

Then add mirrors by executing:

# mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
# mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf

A window will be displayed with a list of options. Navigate using up and down arrow keys and use to select a mirror you prefer (one in your country or next to your country). Then hit <Enter>.
Test the if the values have been added to make.conf: (Two new lines containing GENTOO_MIRRORS=”some link” and SYNC=”some link” should be added to the file)

# cat /mnt/gentoo/etc/make.conf 

Continue reading “VirtualBox with Gentoo(2)”

Tags: , ,


Dec 15 2011

VirtualBox with Gentoo(1)

Category: English posts,TechnicalIuliana @ 10:38

As I have no computer using Linux in my house right now and I kinda miss it I decided to create a virtual machine with a gentoo on it. And as I will have to write some posts about setting up a full java development  environment on Linux and Windows I will use it for that too. I will post all the steps I make, because I’m no guru, so If I can do it, anybody will be able to just by following my steps. So, good luck and you are welcome to use the comment section for any problems you might encounter or questions I might answer.

Step1. Download and install VirtualBox.

Step2. Create a virtual machine following the instructions on the site and select operating system Gentoo. Select at least 1,5 GB memory and aVDI hard drive  of minimum 20 GB.

Step3. Download a Gentoo image from here.  I recommend the x86 version because 64bit version is not stable and given the fact that we’re gonna do a lot of stuff by hand I recommend the minimal iso. (install-x86-minimal-<release>.iso)

Step4. Start your machine from the VirtualBox window and select your iso as a boot device. When the window with the black linux console is opened the actual work beggins.

Step5.  You will see written on your virtual machine screen  “boot: “. If nothing is written the default option will be used. I used the gentoo-nofb, which disables the framebuffer,which will make things go faster in text mode. You will also asked to press enter for some default option at some time. (If you want a complete installation guide with technical explanations look here, because this article just specifies the steps to execute simply and blindly). After a lot of text is scrolled on your window  and the last line just contains just the word livecd#, you start executing the following tasks in this order: (print the commands and insert required data)
Continue reading “VirtualBox with Gentoo(1)”

Tags: , ,


May 18 2010

Installing Xen 4 on Gentoo Linux

Category: English posts,TechnicalRpx @ 3:17

Yeah, I’m on a spree, I know. So I decided to stick with Xen, and now I’m in for another ride on the source wave. Oh, joy!

In a nutshell, what I want to accomplish is to install and configure Xen 4.0 using a 2.6.32 kernel on Gentoo with lilo. Yeah, yeah, I can hear you from all the way across Mars yelling “Yo dawg! Xen doesn’t work with lilo because lilo is stupid and doesn’t know how to boot multiple kernel images!”. Don’t worry, I got it covered. Like a wise friend once used to say… “Stay a while and listen!”.

So let’s get to the dirty part.

Continue reading “Installing Xen 4 on Gentoo Linux”

Tags: , ,