Delete all messages in Postfix queue

No Comments

for i in `mailq|grep '@' |awk {'print $1'}|grep -v '@'`; do postsuper -d $i ; done

Why I gave Ubuntu the boot

No Comments

  • Default installed applications.
  • Automatic inclusion of “Ubuntu One”.
  • Empathy. Empathy. Empathy.
  • Unity. Especially since Gnome Classic is no longer an option in 11.10 forward.
  • Plymouth. I get that it tries to give a nice graphical boot, but I don’t think I’ve ever seen it work seamlessly. Also, purple.
  • Insane metapackages.
  • Slow boot.
  • Themes. Who is in charge of the color palette for these themes? Seriously?
  • Server Edition: Can we get the configuration questions entirely out of the way in the first part, so the system can complete the install on it’s own, without having to come back to it every 5-10 minutes to answer a question?

Arch Linux, Quick First Impression

No Comments

  • Five minute install with net-install CD for base system.
  • Very fast boot (5 secs to login tty, 10 seconds to D.E.)
  • ~2GB required for customized, fully functional system with D.E. and Compiz
  • Does not force optional dependencies to be installed
  • Well documented
  • Lean, no bloat
  • Extremely up to date packages, 3.0 kernel
To be continued..

Xen problems and the xen_emul_unplug argument

No Comments

Having spent a good amount of time working with the Xen platform, I’ve come across numerous occasions where the guest operating system would sometimes not detect disks and/or networking would not function. If you are having problems with a Linux based Xen guest, try this as a kernel argument at boot time:

xen_emul_unplug=never

I’ve used it with success on Fedora, Ubuntu, and Debian personally.

Quickly delete all e-mails in Exim queue

No Comments

If for some reason or another you end up with a ton of e-mails in the queue and need them gone quickly, the command below will do the trick:

find /var/spool/exim/input -name '*.*' -exec rm {} \;

Speed up disk I/O with relatime option

No Comments

Most distros are now using ext4, which is great. We know that ext4 performs better than ext3. Did you know that you can make your system perform even better with a thirty second file modification?

The “relatime” option controls how ext4 records last access time information for files. By default, ext4 will modify a timestamp on a file everytime it is accessed. This may not seem like a significant performance killer, but trust me, it is. Adding relatime stops this from occurring, boosting your performance.

Your /etc/fstab file will looking something like this:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda3 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /boot ext3 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
# ramdisk
tmpfs /tmp/ramdisk tmpfs rw,size=2G 0 0

We want to add the “relatime” option to your “/” partition. Also, your “/home” partition, if you have a separate “/home”. When done, your /etc/fstab will look more like this:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
#
proc /proc proc nodev,noexec,nosuid 0 0
/dev/sda3 / ext4 relatime,errors=remount-ro 0 1
# /boot was on /dev/sda1 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /boot ext3 defaults 0 2
# /home was on /dev/sda4 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext4 relatime,defaults 0 2
# swap was on /dev/sda2 during installation
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none swap sw 0 0
# ramdisk
tmpfs /tmp/ramdisk tmpfs rw,size=2G 0 0

Now, most would say to reboot your computer to have the change take effect. Not necessary. Simply run:

sudo mount -o remount /
sudo mount -o remount /home (if you have a separate /home)

Enjoy your speedier installation.

Exim DB Problem

No Comments

If you find that incoming mail is rejected by Exim, and you see the following in your logfile, move /var/spool/exim/db/ratelimit out of the way, and then restart Exim. Problem solved.

failed to open DB file /var/spool/exim/db/ratelimit: Bad file descriptor
Berkeley DB error: memp_fopen: page sizes must be a power-of-2

Clean Your Keyboard

No Comments

Because now you know what’s down there.

What Lies Yonder

Change I.P. address on Ubuntu Server

No Comments

sudo pico /etc/network/interfaces
If your device name is eth0, the configuration block should look like the following-

iface eth0 inet static
address 192.168.1.110
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 208.67.222.222 208.67.220.220 127.0.0.1

If you wish to add another I.P. address, you can add a block similar to this-

iface eth0:1 inet static
address 192.168.1.111
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

All that is needed now is a restart of networking-

sudo /etc/init.d/networking restart

Downgrade MySQL 5.x to MySQL 4.x on Ubuntu Server

No Comments

If you ever need to downgrade from MySQL 5.x to MySQL 4.x (hope you don’t), chances are you are going to run into a problem with apt-get. You will most likely receive cryptic, unhelpful dpkg errors.

If this is the case, try the command below.

sudo aptitude purge mysql-common mysql-client mysql-server && sudo aptitude install mysql-server-4.1 mysql-client-4.1

This should purge whatever is left of the MySQL 5.x installation, and then install the MySQL 4.x version. If this fails, proceed to bang head against nearest hard object.

Older Entries