Author Archives: Randy

Debian PXE boot image from scratch

After facing issue after issue with Idera/R1soft’s PXE and CD-ROM boot media — specifically, ancient kernels which are unable to obtain network connectivity on modern hardware, I decided to roll my own PXE boot image including the R1soft agent and a few other tools with the latest Debian stable. It turned out to be easier […]

Grub with Xen Guests

In order for grub to ‘see’ virtual disks, you have to tell it about them with the ‘device’ command: # grub grub> device (hd0) /dev/xvda grub> root (hd0,0) grub> setup (hd0) grub> quit Keep in mind, installing grub on the MBR is not always necessary with Xen PV guests, but is highly useful for V2P […]

Categories: Uncategorized. Comments Off on Grub with Xen Guests

XenServer 6.2 with Software RAID

Historically XenServer does not support software RAID out-the-box, and this is unchanged in the latest 6.2 release. We can convert it to RAID after installation. First we set up the 2nd disk by copying the partition tables whilst enabling a degraded RAID on it, then copy data over with custom initrd. sgdisk -R/dev/sdb /dev/sda # […]

EXT and LVM Local Storage in XenServer

On a new XenServer deployment EXT storage is default. Although EXT is nice (ability to manipulate raw VHD files and use sparse storage), LVM is faster and more stable. Here is how to switch between storage modes (be sure to back up all data first, as this will wipe everything in the repo): Use ‘xe […]

Track deleted (but open) file usage

From time to time the du command doesn’t match up with df. This is due to deleted files that are still held open by a process. You can total the deleted but ‘still open’ file usage: lsof | awk ‘/deleted/ {sum+=$7} END {print sum}’ Or, to simply list all the files and their processes: lsof […]

JWplayer iframe codes for Wowza

Allows easy embedding of on-demand and live media from a Wowza server using Iframes and a PHP server capable of .htaccess rewrite rules. Example of embed code: <iframe src=”” frameborder=”0″ scrolling=”no” width=”432px” height=”320px”></iframe>

Removing RAID metadata

Sometimes a hardware RAID controller or fakeraid (BIOS) can leave metadata that makes it impossible to install Windows or Linux, or it installs correctly, but causes a kernel panic or a 0xb7 blue screen error on the first boot. The only method I could find to delete the metadata *quickly* is to zero out the […]

Now Playing code example

Now Playing Live Example Now Playing HTML Code <iframe src=”http://” width=”325″></iframe> Requests Popup HTML Code

Categories: Uncategorized. Comments Off on Now Playing code example

Syncing User Filesystems Between Two Cpanel Servers

After doing a WHM multi-account copy, you may want to refresh the users home directories (including email and web files). This one liner uses rsync over SSH to do a quick sync of only changed files, emails, and website files. Run these commands on the NEW server. First you need to create a list of […]

Categories: Uncategorized. Comments Off on Syncing User Filesystems Between Two Cpanel Servers

Syncing All MySQL Databases Between two Cpanel Servers

After you do a WHM multi-site transfer, you may want to resync all the MySQL databases before doing a DNS change. Here’s a quick and easy way to sync each Cpanel user’s databases on the new Cpanel server. After manually setting up a remote mysql root user on the original server (and opening a firewall […]

Categories: Uncategorized. Comments Off on Syncing All MySQL Databases Between two Cpanel Servers