inside the mind of a linux admin

Ubuntu 11.04 released – Natty Narwhal

Canonical has announced the official release of Ubuntu 11.04, codenamed Natty Narwhal. This major update introduces the new Unity desktop shell, which is designed to improve ease of use and deliver a more modern user experience. Ubuntu founder Mark Shuttleworth unveiled the Unity project a year ago during an Ubuntu Developer Summit keynote in Brussels. […]

Read More

Repair and optimize all mysql tables from CLI

Here’s how to check, repair and optimize all your mysql tables in all databases on a server… mysqlcheck -u root -p – -auto-repair –check –optimize –all-databases Note: you do not have to have root to do this, simply replace -u root with -u yourusername That’s it.. (Remember if you are using a tool like phpmyadmin […]

Read More

Mass updating zone file serial numbers with sed

If you’ve ever administered a DNS (name server), than you know that serial numbers mean a lot. But what happens when you have several [hundreds|thousands] of zone that you need to make a mass-change to. That’s easy enough, there’s tons of ways to do that with sed, awk, or simple tools like “replace”. However, once […]

Read More

Undefined subroutine &Cpanel::Update::automatic_updates_enabled called at /scripts/upcp line 273

Recently, I’ve seen cPanel upgrade throwing errors during upcp such as: # /scripts/upcp /scripts/upcp syntax OK Running Futex Check/Fix……Done Undefined subroutine &Cpanel::Update::automatic_updates_enabled called at /scripts/upcp line 273. Fix: wget -O /root/updatenow.static http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts/updatenow.static && perl /root/updatenow.static –manual Then force the upgrade: /scripts/upcp –force Share on FacebookTweet

Read More

Howto: Delete files by inode number

Ever mistakenly pipe output to a file with special characters that you couldn’t remove? -rw-r–r– 1 eriks eriks 4 2011-02-10 22:37 –fooface Good luck. Anytime you pass any sort of command to this file, it’s going to interpret it as a flag. You can’t fool rm, echo, sed, or anything else into actually deeming this […]

Read More

MegaCLI Cheat Sheet

Recently I’ve had to do extensive work with Dell PowerEdge servers, and specifically Dell’s that use the LSI MegaRAID controllers. Anyone who has ever had to work with the LSI RAID controllers knows that the MegaCLI provided by LSI is the most cryptic command line utility in existence. MegaCli is available for Linux, DOS, Windows, […]

Read More

Drive failure? ddrescue to the rescue!

A server’s primary hard drive crashed hard one fine day. Yes, a non-RAIDed “server” (*sigh*). The last thing heard from it was screams of read-only, and it was gone. We got the drive mounted via a SATA dock to a new machine. At this point, all attempts at mounting and fscking failed, and dmesg was […]

Read More

how to rebuild the RPM database

If rpm / yum command hangs incessantly during operations or you see error messages, it likely means your RPM database has become corrupted. /var/lib/rpm/ stores the RPM database information, so to resolve you can just delete and rebuild the database using one of the two methods below like so: Method # 1 rm -f /var/lib/rpm/__db* […]

Read More

Debian/Ubuntu Mailutils and Maildir

When setting up Maildir in Debian 5.0 or Ubuntu 10.x, getting the generic mail applications working correctly can be extremely tricky. When you type “mail” in a default/stock installation, it is attempting to read mbox data and will not read your “Maildir”. Annoying, since the stock configuration for mail delivery in most mail servers is […]

Read More

Linux: Recover Corrupted Partition From A Bad Superblock

So you have a drive that’s gone bad, and you cannot mount it. How can you recover a bad superblock from a corrupted ext3 partition to get back your data? Linux ext2/3 filesystem stores superblocks at different locations so it is possible to recover data from a corrupted partition. Your error will likely look similar […]

Read More

Twitter: kireguy

Tweeter button Facebook button Myspace button