Some HP ProLiant servers, such as my own DL360p, come with integrated RAID controllers. My DL360p uses the Smart Array P410i controller. Whilst there are use cases for hardware RAID, my configuration relies on ZFS RAID, and the two do not play nicely. Rather than using an inferior file system or configuration, I decided to disable hardware RAID. You can’t do this in the BIOS. Fortunately, I was made aware of a relatively simple boot hack that can accomplish this.
There is a downside: HP servers with integrated hardware RAID cannot boot from a hard disk if this hack is employed. They will, however, boot from an SD card or USB drive. As many servers have both internal SD card slots and USB ports, we can use that to boot into a FreeBSD install located on a SATA or SAS disk.
You will need the following to do this to your own server.
- An SD card or a USB drive of any capacity;
- A spare SD card slot or USB port that can permanently house a connected device;
- A write cache module that is compatible with your server. My DL360p has a HP 4K1365.
It’s important to note that this solution is most likely not foolproof. I am comfortable using this workaround on my own server as it is just a part of a homelab; if I lose data or a disk, it isn’t the end of the world. If you are not comfortable with workarounds, buy a server that is not limited to hardware RAID out of the box.
Disabling HP Smart Array integrated RAID
A guide on disabling the HP Smart Array is available here, and I recommend reviewing it for more details on the process, but I will summarise it here.
If your server does not try to boot into the live image by default, check the boot order in the BIOS. HP servers refer to USB and SD Card devices as “DriveKeys”, so if you’re using one of those, that’s what it will appear as.
Inside Debian, open a terminal and add the HP Management Component Pack to the
apt sources. Open
/etc/apt/sources.list in the editor of your choice and add the following line to the end of it.
deb https://downloads.linux.hpe.com/SDR/repo/mcp jessie/current non-free
After adding and saving that, run the following commands to prevent
apt from displaying errors relating to untrusted repositories.
curl http://downloads.linux.hpe.com/SDR/hpPublicKey1024.pub | apt-key add - curl http://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub | apt-key add - curl http://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub | apt-key add - curl http://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub | apt-key add -
Now we can run the commands required to disable the Smart Array. Use
apt to install HP’s
ssacli from the repository that you just added. Once that’s installed, run the command below that matches your controller.
If your Smart Array controller designation begins with the letter P, such as the P420i:
sudo ssacli controller slot=0 modify hbamode=on
Else, if your HBA controller designation begins with the letter H, such as the H240:
sudo ssacli controller slot=0 modify raidmode=off
You should be all set. You can run
ssacli controller slot=0 show to confirm that your changes have been made.
Some servers will now require the installation of a write cache module. If yours does not, you can move on to installing the bootcode to an internal device.
Connecting the write cache module
An FBWC (flash-backed write cache) is a modern version of the BBWC (battery-backed write cache), and which one you require may change based upon your server. They are technically distinct, but as they perform the same task, I will intentionally conflate the two for simplicities sake by referring to them all as “write caches”.
To determine whether or not you need a write cache in your server, attempt to install your operating system of choice. If your installer can detect disks connected to all of your servers SAS/SATA connectors, then you do not require a write cache. If it does not see all of the disks, installing a write cache will allow it to do so.
You can find out what serial numbers to shopping around for by searching for the specifications for your Smart Array controller in the HP documentation or on their community forum. Alternatively, you can ask on a Reddit subreddit such as /r/homelab; someone will be able to help. In my case, the server and enterprise vendor Bargain Hardware sourced and installed the controller in my server.
Your cache model will either use a capacitor or batteries to provide permanent power to the write cache. The purpose of this is beyond the scope of this article, but you can see the battery connected to my write cache in the image below. Refer to the manufacturer documentation for your particular write cache model for more information on these.
Installing the bootcode to an internal device
Now all you need to do is install the bootcode to a device that the server can still boot from. Many if not all ProLiant’s include an internal DriveKey slot. In my case, I decided to use an SD card. Check your manual or motherboard schematic before proceeding.
As a FreeBSD on ZFS user, all I had to do was run the following command from the live disk at the end of the installation process.
da4 in this instance refers to the internal SD card.
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da4
You can learn more about this command here. GNU/Linux and Windows users will have to find an appropriate equivalent for their use case.
Concluding the Boot Hack for HP Servers
As always, drop a comment below or join the Rauchland Discord server if you have any comments or questions.
If you enjoy my blog or find it useful, please consider becoming a patron on Patreon to help me keep my site live and create more content!