Category: Linux

Ubuntu Linux unpack mime encoded mail files

Sometimes when clients forward emails through the encoding gets stuffed up and you end up with an attachment that contains the clients message along with any files. If you open this attachment in notepad or whatever you will see all the email headers and stuff like this: Received: from blah.example.comReturn-Path: blah@example.comDate: Mon, 23 Nov 2009 […]

Ubuntu – Howto Easily Setup RAID 5 with LVM

  Some notes for me to follow next time I do it: Install mdadm and S.M.A.R.T. drive monitoring # apt-get install mdadm smartmontools Enable smartd # vi /etc/defaults/smartmontools uncomment the “start_smartd=yes” line Edit smartd config and tell it what drives to monitor # vi /etc/smartd.conf add these lines to monitor each drive: /dev/sdc -a -I […]

Changing MySQL data directory

Instructions for next time I forget: First create the new dir:# mkdir /data/mysql Move the old mysql data to the new dir:# cp /usr/lib/mysql/* /data/mysql/ Set the right owner:# chown mysql: /data/mysql -R Edit mysql config file with new location of “datadir”# vi /etc/mysql/my.cnf Change mysql’s home dir in /etc/passwd If you are running apparmor […]

Ubuntu – Ethernet controller: Attansic Technology corp. Device 1063 (rev c0)

When you type lcpci you get this network device: Ethernet controller: Attansic Technology corp. Device 1063 (rev c0) Ubuntu doesn’t seem to recognise this onboard card by default. This network card is on the Gigabyte G31M-ES2L along with many other motherboards. Steps to getting it working are really easy. First download this file: AR81Family-linux-v1.0.0.10.tar.gz from […]

Ubuntu – Howto setup Raid 5 with reiserfs

Some notes for me to follow next time I do it: Install mdadm and S.M.A.R.T. drive monitoring # apt-get install mdadm smartmontools Enable smartd # vi /etc/defaults/smartmontools uncomment the “start_smartd=yes” line Edit smartd config and tell it what drives to monitor # vi /etc/smartd.conf add these lines to monitor each drive: /dev/sdc -a -I 194 […]

Join Multiple AVI files

First convert all video files to AVI’s. It’s easiest with ffmpeg eg: ffmpeg -i original_file.mpeg outputfile.avi if you get errors like: [mp2 @ 0x7fbf93b1fa00]Sampling rate 7875 is not allowed in mp2Error while opening codec for output stream #0.1 – maybe incorrect parameters such as bit_rate, rate, width or height then try this: ffmpeg -i original_file.mpeg […]