Things needed:

1) A VMware server
2) Latest Debian netboot ISO
3) PXE bootable Clonezilla
4) Server to store Clonezilla image on

 

First I had to find the BIOS password to our Barracuda Spam Firewall. It appears that barracuda is running a custom BIOS on this motherboard and you cannot boot to CD (They always hang with a blinking cursor). Enable the LAN BIOS and the option to boot to other devices. When the system reboots, F11 should get you to the boot selection screen. I picked PXE and booted Clonezilla ( How to PXE boot Clonezilla)

Clone the had drive of the barracuda spam firewall to a server on your network. Next we need a VM ready to clone the image from the barracuda spam firewall. Make sure the hard drive for this unit is big enough to clone the image to it (I made mine 275 GB because our barracuda unit has a 250  GB hard disk). Next we need to tell the VM to PXE boot. Make sure the VM is selected. Click “Configure VM” on the right side. Select the “Power” tab, and check the box that says “Enter the BIOS the next time the virtual machine boots”. Next start the VM and make sure the ethernet controller is set to boot first in the BIOS. PXE boot to clonezilla and clone the hard drive of the barracuda spam firewall back to your VM.

After clonezilla is finished cloning the hard drive back. Shut down the VM. Set the system to enter the BIOS when you boot the VM again. Change the BIOS so the hard disk boots first. Now, if the system boots, you are out of the woods. If you get an error on boot saying something like “Could not mount root partition”, then we have some more work to do. The reason you get this message is the kernel supplied by Barracuda doesn’t have the proper storage drivers for the VM. We need to copy a kernel from Debian and use that to boot the Barracuda VM.  Go ahead and shut down your barracuda VM.

Now, we need a second VM with Debian preinstalled on it. I chose a 32-bit version of Debian. Go ahead and install Debian completely in this VM. After Debian is installed, shut down the VM. We need to add the hard disk from the barracuda VM to the Debian VM, so we can copy Debian’s kernel and modules over to the Barracuda VM. Select the Debian VM, click “Add Hardware”, select “Hard Disk”, click “Use and Existing Hard Disk”. Navigate to the hard drive from the Barracuda VM and add it to your Debian VM. Now boot your debian VM.

You should at this point have the Debian VM running with both its hard disk and the Barracuda hard disk. We need to mount the first partition from barracuda disk. On my system the barracuda disk was /dev/sdb . To mount the partition I ran ” mount /dev/sdb1 /mnt”. This mounts sdb1 to /mnt. Next enter “cd /boot”. This is where the Debian kernels are contained. Copy the 4 files to /mnt/boot (The folder for the barracuda kernels). These files are: config-2.6.32-5-686, initrd.img-2.6.32-5-686, vmlinuz-2.6.32-5-686, System.map-2.6.32-5-686. The numbers on the ends of the file names may vary. Next we  need to copy our kernel modules over to the VM. These are under “/lib/modules”. There should be a number that matches the kernel you have on your Debian VM. Copy the entire folder of modules to /mnt/lib/modules.

 

Next we need to edit the grub config for the barracuda unit. This is located under /mnt/boot/grub/grub.conf. I added the following entry:
title Debian Kernel
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-5-686 root=/dev/sda1
initrd /boot/initrd.img-2.6.32-5-686

You want to put this entry before the line “title Barracuda”, so your entry is the default kernel to be booted. Now we need to change the root password for the barracuda hard disk. To do this edit the file /mnt/etc/shadow .  You’ll see a line that says something like:
root:e8,je#2ciw@$lo0nfielso2!jfJEcw:15153:0:99999:7:::
Delete everything between the first two colons. This will change the root password to blank. If you want to change the root password back later, copy down everything between the :, and you can change this line back later to restore the original root password.

Now shutdown the Debian VM. Now start the barracuda VM. The system should boot. Once you are prompted for a username, type “root”. The system should let you in as the root password is now blank. Now if you type “iptables -L” you should receive an error about missing kernel modules. You can fix this by typing “depmod” (this fix should be permanent, and this is the reason we needed to change the root password).

 

Your barracuda unit should now be fully functional in a VM. I’ve not tested this fully and I recommend STRONGLY that you test barracuda unit thoroughly before putting it into production. I also recommend reading the post from the link above (About the BIOS password) to find some other cool tricks such as enabling features on your Barracuda Spam Firewall. Please post below about your success or about other issues you may have had that I didn’t.

Share on Facebook