Erase RAID metadata from (previously used) disk

I recently attempted to install a fresh CentOS on a pair of recycled (previously used in a different linux sistem) hard disks.

Of course I got the classical message that the disks already had RAID metadata on them: “Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda”

Recovering a bricked Linksys WRT54GL v1.1 using JTAG – Part 1: the hardware

I got a Linksys WRT54GL v1.1 router that somewhat worked and somewhat didn’t: it booted alright (no led errors), responded to ping on its default IP (192.168.1.1), bot other than that, it did not respond on the web interface, nor telnet/ssh, nor dhcp.

I tried the 30/30/30 reset , tried TFTP recovery – nothing worked.

As it had the original Linksys firmware, at this point it was either a hardware failure or the only recovery course would be the JTAG reflash.

Deleting large number of files in linux

You might have often encountered the “Argument list is too long” message when trying to rm -rf large amount of files. This happens often on large servers when trying to clean up the tmp folder. This is because the rm command has a pretty low count of supported parameters (filenames) while the tmp folder can become host to a terribly high number of files (millions in a period of years).

Install vzdump using yum on CentOS

As some of you may already know, vzdump is not included in the openvz repository for CentOS. If you need to use vzdump, you have to download its source and compile it yourself, unless you’re already using some VPS control panel that has it bundled.

Luckily, for all those who don’t use control panels and don’t want to compile vzdump themselves, there’s a quick workaround. SolusVM includes it in its repository, which apparently can be used even if you don’t have SolusVM installed on that particular server.

iptables modules for OpenVZ kernel

This is my preferred list of modules for iptables on OpenVZ kernels (set in /etc/vz/vz.conf): ## IPv4 iptables kernel modules to be enabled in CTs by default IPTABLES=”ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp ipt_owner ipt_REDIRECT” ## IPv4 iptables kernel modules …

Unable to login to FTP on CentOS 6 VPS with Virtualmin / ProFTPD?

Does the login to your newly installed CentOS 6 VPS using Virtualmin and ProFTPD fail?

Check your /var/log/secure for errors such as this :
proftpd: PAM unable to dlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot open shared object file: No such file or directory
proftpd: PAM adding faulty module: /lib64/security/pam_stack.so

If you are logging the above error your /etc/pam.d/proftpd was updated (incorrectly)…

Localization-free IMDB Search Engine for Firefox

IMDB’s automatic language detection has bugged me since it was introduced (more than a year ago).

I’ve recently encountered a solution to skip the automatic language detection while browsing IMDB – by using akas.imdb.com instead of www.imdb.com, but unfortunately this does not work when using the integrated Firefox search engine (which searches automatically on the www domain).

Configure network connection via files in Linux

Setting your hostname, IP address, netmask, gateway, DNS server via files
It is sometimes helpful to know what is going on behind the scenes or if you want to modify the network configuration via changing files.
For example, assume you want to modify the network configuration by modifying files with the following…

How to Repair a Corrupt MBR and boot into Linux

There are times when you inadvertently overwrite your Master Boot Record. The end result being that you are unable to boot into Linux. This is especially true when you are dual booting between windows and Linux OSes. Once when I was working in Windows XP, I accidentally clicked the hibernate button instead of shutdown. And windows somehow overwrote my MBR which housed the GRUB boot loader. At such times, it pays to have this cool tip at hand…