Restore Broken Package DB on Sabayon

System database not found or corrupted, running in safe mode using temporary, empty repository

phoenix jude # equo rescue resurrect
>> ####### ATTENTION: The installed package database will be resurrected, this will take a LOT of time.
>> ####### ATTENTION: Please use this function ONLY if you are using an Entropy-aware distribution.
     Can I continue ? [Yes/No] yes
     Are you REALLY sure ? [Yes/No] yes
     Do you even know what you're doing ? [Yes/No] yes
>>  @@ Creating backup of the previous database, if exists.
>>  @@ Previous database copied to file /var/lib/entropy/client/database/amd64/equo.db.backup.15103
>>   Initializing the new database at /var/lib/entropy/client/database/amd64/equo.db
>>   Database reinitialized correctly at /var/lib/entropy/client/database/amd64/equo.db
>>   Found 420663 files on the system. Assigning packages...
>>   Matching in repository: Sabayon Linux Official Repository
>>   Found 0 packages. Filling database...
>>   Database resurrected successfully.
>>   Now generating reverse dependencies metadata...
>>   Now indexing tables...
>>   Database reinitialized successfully.
>>   Keep in mind that virtual packages couldn't be matched. They don't own any files.
phoenix jude # 

fascinating and too simple!
For one thing, I have no clue why did it say “Found 0 packages.”, because just after this I was successful in doing an equo upgrade and it worked beautifully.
equo has become a teenager…

Defining Two Different System Gateways

Situation above ground forces:
You have two modems, or two ethernet connections, and want part of your connections to go through ppp0, and the rest through ppp1

Quick Fix:
Quite easy, get both your connections live, and ppp0 will by default be the default gateway. Now, use a proxy for all other connections, so if this proxy is 10.10.1.100 on some random port, and the gateway to ppp1 is 10.6.6.6, issue the following:

route add 10.10.1.100 gw 10.6.6.6

Fedora Constantine, SYSRQ and needless swapping

By default, fedora disables the SYSRQ functionality of the kernel, for some reason. To enable it, either add sysrq_always_enabled at the end of your kernel line in /boot/grub/menu.conf, or edit /etc/sysctl.conf, changing

kernel.sysrq = 0

to

kernel.sysrq = 1

Some kernel updates on fedora also have the tendency to write to swap needlessly, even though you have loads of RAM available, to stop this, edit /etc/sysctl.conf again, and add the following two lines

# Controls the swapiness of the machine
vm/swappiness = 0

To just temporarily disable it, do

echo -n 0 > /proc/sys/vm/swappiness

as root

***These tips are applicable to almost any GNU/Linux distribution, not necessarily for Fedora alone

Visual Basic drinking Wine

This tutorial is depreciated, please follow my new tutorial: visual basic 6 revisited – linux – wine
Visual Basic running on Fedora

Get past with your life on Windows, install Microsoft Visual Basic 6 on GNU/Linux with some good old wine…

  1. Install the required libs, etc.
    $ winetricks ddr=gdi vb6run gecko gdiplus fontfix d3dx9 corefonts mdac_typ dcom98
  2. From a working Windows XP installation, copy over riched20.dll, riched32.dll, urlmon.dll, oleaut32.dll, and hhctrl.ocx, from the system32 folder to your wine system32 folder
  3. In your Wine configuration dialog, under the Libraries tab,
    set the following files to native:
    hhctrl.ocx
    oleaut32
    riched20
    riched32
    urlmon
    And set these to builtin:
    ole32
    rpcrt4
  4. Do a fresh install of IE6 with ies4linux, click on Advanced and edit the downloads and the install prefix to make it totally compatible with your existing .wine directory.
  5. Then run the Visual Basic 6 installer, and if everything goes well, cd to .wine/drive_c/windows/system32 and execute “wine regsvr32 comcat.dll” and “wine regsvr32 MSSTDFMT.DLL”

And your done! Have fun with Visual Basic on Linux!

Tested with wine 1.1.38 and Fedora Constantine(F12)

Managing Your Gentoo [“Sort-Of” Easily], Tips, and More

***This article has been placed under constant expansion. So keep a check on it!***

Law #1: If anyone tells you that, “To administer a Gentoo Build is easy”, tell him/her to go f*** off. Ofcourse, if your an expert at it, then it’ll be an exception for you. Yes, it really is easy if you understand what you are doing, unlike pulling your hair out.

Gentoo offers the most that you can think of getting out of any GNU/Linux box, and that is the very fact why administering it often becomes a headache. You will at first curse portage(the package manager), but eventually will realize that it’s the most superior one out there. Okay, I hate introductions, let’s get to work.

Required Gears:

  • Gentoo Build from stage3(stage3 is the best method to install Gentoo)
  • Some patience for reading

Package Managing and Tune-Ups:

You’ve probably noticed that compile time is long, so, if you have like >1GB RAM, you can opt to compile in RAM. Here’s how you do this in /etc/fstab. Add this line there and do a “# mount /var/tmp/portage”.

none /var/tmp/portage tmpfs nr_inodes=1M,size=900M 0 0

Portage does all its compiling in /var/tmp/portage, so if we have that in RAM, read/write speeds would be better. Again, you may also try out ccache, but it will cause some build to fail. For me, it failed to compile mono as it had some error in the cached libs. Now we have faster build time. Let’s make the searching and “Calculating dependencies…” happen a lot faster. For this, we’ll create a reiser4 loopback filesystem which will also compress the huge tree into only 220MB max. This is just done by making the blocksize a bit smaller. I prefer reiser4 as it’s extremely good with small files(you will have to patch your kernel for reiser4fs, so head out here: Patching the Linux Kernel for reiser4 support).

# dd if=/dev/zero of=s-port bs=1M count=250
# mkfs.reiser4 ./s-port
# mv ./s-port /usr
# mount -o loop /usr/s-port /usr/portage/
# emerge-webrsync

Note: You’ll have to relocate your distfiles, as this images is only 250MB and you cannot store distfiles in this image. Refer to the make.conf

You can add the following line to /etc/fstab to make it mount on every boot.

/usr/s-port /usr/portage reiser4 loop,noatime 0 0

Now, we should have a faster portage. In case you have a lower bandwidth, I suggest you to use the delta method of patching the tree. The package is called “app-portage/emerge-delta-webrsync”. Go ahead and install it. It will not download the whole tree everytime you want to sync, but only fetch patches(usually less than 2MB) and patch up the tree. It may hit your head that emerge –search is a bit slow. So then install “app-portage/eix”. It’s a common tool for searching as it displays results in less than 10 seconds.

Putting the next thing bluntly, many users are often very frustrated when portage complains about “masked” packages. For this, install “app-portage/autounmask”. The syntax for autounmask goes like this: autounmask category/package-version
# autounmask x11-wm/compiz-fusion-0.6.0
.
Continue reading “Managing Your Gentoo [“Sort-Of” Easily], Tips, and More”