Archive for the ‘Linux’ Category

Chances are that you stumbled onto this page because Linux is freezing, crashing, and randomly rebooting on you, and you can’t figure out why. There is a strong chance that the reason this is happening is because the ACPI (Advanced Configuration and Power Interface) and APIC (Advanced Programmable Interrupt Controller) implementation on your motherboard is buggy, and Linux can not properly communicate with them. On any modern PC, ACPI and APIC are standard, and most have no way to shut them off in the BIOS. To make matters worse, many implementations of these by BIOS manufacturers are buggy and do not meet the specifications properly.

What is ACPI and APIC?

Most of my readers who have found this page already know what these are and what they do, they just want a solution to fixing the problem. I won’t write a detailed explanation about what ACPI and APIC do, rather I will point you to some resources for you to get a better explanation:

http://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface – An explanation of ACPI

http://en.wikipedia.org/wiki/Advanced_Programmable_Interrupt_Controller – An Explanation of APIC

http://support.novell.com/techcenter/sdb/en/2002/10/81_acpi.html – Linux Kernel boot parameters for ACPI and APIC

The Cause

If your Linux box is freezing, crashing, or rebooting because of ACPI or APIC, this isn’t the fault of Linux. As far as I can tell from my research Linux properly implements ACPI and APIC, and the implementation on your BIOS is buggy. Of course, in Windows these buggy implementations are often accounted for, leaving the BIOS manufacturers with little reason to correct their errors. This is where we run into problem in Linux

So how can you fix the problem?

The first thing you should do to correct the problem is to check the maker of your PC or Laptop and see if there is a BIOS update. If there is an updated BIOS try this first and see if it fixes your problem. I have read where this helped some people. Personally though I have never been this lucky

A BIOS update did not work, now what?

If you have the latest BIOS, or the BIOS update did not fix the problem, your only other option is to  disable ACPI and APIC from loading during the Linux boot. This is not the ideal as APIC and APIC, when working, are very beneficial to your computer. However using a computer that freezes, reboots, and crashes is even worse.

What you have to do to turn off ACPI and APIC in Linux is pass kernel boot parameters to the Kernel at boot time. This is done by modifing your boot loader GRUB or LILO. This article will not get into detail on how to modify your GRUB or LILO configuration, however I will explain which parameters to pass to your Linux kernel.

The four Kernel parameter options you will be concerned with are:

  • noapic – Turn of the System APIC
  • lapic – Turn on Local APIC
  • nolapic – Turn off Local APIC
  • acpi=[off | ht ] – Turn off ACPI completely by using acpi=off, or partially shut off ACPI leaving on your processors Hyperthreading on by using acpi=ht

On single processor machines you can fully disable ACPI and APIC by passing kernel boot parameters:

  • noapic nolapic acpi=ht

The above parameters tell Linux to not load the APIC and Local APIC kernel modules, and only load ACPI so that it enables the Hyperthreading on your processor

On a dual core, quad core, or multiprocessor machine, you want to make sure you enable Local APIC. Local APIC has some kind of control over your Multiprocessor machine. If you shut off Local APIC on an multi-core or multiprocessor machine, you will only see one processor available.  Use the following Kernel parameters:

  • noapic lapic acpi=ht

Well that’s about the best I can explain it. Hopefully this helps you, or at the very least gets you some starting point to fixing your Linux problems.

 

For a few months now I have been frustrated by Mandriva 2008 and getting ndiswrapper to start at boot up. For some reason Mandriva insisted on loading the BCM43xx module even though I explicity set up ndiswrapper as the driver for my broadcom wireless card. I had tried everything from modifying /etc/modprobe.conf to using the Mandriva drakconf interface to tell it to set up wireless with ndiswrapper. The drakconf interface would set up ndiswrapper and get things working, but once I rebooted it would want to go back to loading the bcm43xx driver.

After searching the internet intensely, I found out that the kernel will attempt to load the bcm43xx kernel module no matter what unless you explicitly blacklist it in /etc/modprobe.d/blacklist-mdv

Put the following lines in blacklist-mdv:
blacklist bcm43xx
blacklist ssb

I’m not really sure what ssb is, but from what I gathered it was part of the Broadcom 43xx driver set.

You may also want to do:
modprobe -r bcm43xx
modprobe -r ssb

Now use drakconf interface to set up your wireless card again, make sure you select the ndiswrapper option.
Next time you reboot you should now boot using the ndiswrapper kernel module instead of that annoying bcm43xx driver!

Recently I’ve become tired of the default KDE start menu button that comes with Mandriva 2007.1. It’s HUGE and ugly:
The default KDE start menu icon

After doing some research, here is how you can change the icon displayed for your KDE start menu (these directions should work for just about any distro using KDE with a few minor differences).

Edit or create the file ~/.kde/share/config/kickerrc adding the following to the file:

[KMenu]
KMenuButtonScale=false
KMenuIcon=kmenu

The KMenuButtonScale option can be set to true if you want the image to fill the entire space allocated for the button, you may want to test this.
The KMenuIcon is the name of the icon you want to use, in Mandrvia 2007.1 the icons are stored in /usr/share/icons/[theme you are using]. Note you do not put the file extension in, in the example above, the image name is kmenu.png, but I only enter kmenu, KDE can figure out the rest 🙂

Once you have edited this file run the command dcop kicker kicker restart, this will restart the kicker bar at the bottom. On my installation, this restarted the kicker panel, but it was froze, so I had to also run the command:
killall -KILL kicker
followed by running the command
kicker

Note that these directions will only change it for the current user. If you want to change it for all users, you will have to edit one of the following KDE files under Mandriva:
* /var/lib/mandriva/kde-profiles/free/share/config/kickerrc
* /var/lib/mandriva/kde-profiles/one/share/config/kickerrc
* /var/lib/mandriva/kde-profiles/discovery/share/config/kickerrc
* /var/lib/mandriva/kde-profiles/powerpack/share/config/kickerrc
* /var/lib/mandriva/kde-profiles/powerpackplus/share/config/kickerrc

Other distributions will have these files in other locations.

IP Block Blacklist

November 2nd, 2006 No Comments

Gilfether.com runs Shoreline Firewall (Shorewall), an application built on top of IPTables. I recently implemented the blacklist, denying IP blocks from China, South Korea, and Russia from connecting to pretty much everything except port 80. I scripted it so that the list is updated once a month. It’s amazing how doing so has reduced the amount of spam I receive. Unfortunatley, I am still getting some from France and the U.S. It also appears that this has reduced the number of entries recorded in DenyHosts as it’s been quiet for the past 2 days.

For those that are interested, IP blocks for all the countries in the world can be obtained at http://www.completewhois.com/statistics/data/ips-bycountry/rirstats and is kept up to date. Download the ‘cidr.txt’ files for the countries you want to block, and use the ‘Include’ directive inside of the blacklist config file for Shorewall. Of course you will have to properly configure Shorewall to use the blacklist, which I will leave as an excersize for the reader.

Below are the steps to making Mozilla Thunderbird (or any mail client of your choosing) the default mail client for Firefox in Linux.Watch Full Movie Streaming Online and Download

  1. enter about:config in the address field
  2. filter for mailto
  3. make sure that “network.protocol-handler.external.mailto” is set to true (double-click to change).
  4. Add a new preference:
    • right-click on the window
    • choose New, String
    • prefence name is network.protocol-handler.app.mailto
    • value is /path/to/thunderbird (if using another mail client other than thunderbird, enter the path to it here instead)