Install Ubuntu 16.04 on Fujitsu PRIMERGY using onboard SATA RAID (UEFI)

This post will describe how to install Ubuntu onto a virtual disk under the onboard SATA RAID (MegaSR) on Fujitsu PRIMERGY in UEFI mode. I know Ubuntu is not supported on PRIMERGY officially. Fujitsu only says it is tested with a specific configuration, so some configurations work, and some don't.

In this example, I use a PRIMERGY CX2550 M1 server with four HDDs in RAID 0 using the onboard SATA Software RAID (MegaSR) in UEFI mode, and Ubuntu OS is Ubuntu Server 16.04 LTS. I use PRIMERGY M1, but the procedure would work on PRIMERGY M2 and M4 servers in the same way as far as the megasr driver supports the chipset.

  1. (For M1/M2 servers) Change the boot mode from Legacy to UEFI in BIOS, and reboot
  2. To do this, bring up BIOS Setup Utility, and go to Advanced -> CSM Configuration. Then disable Launch CSM. Save the change and reset the server.
  3. Create a virtual drive
  4. Bring up the BIOS setup utility again, and go to Advanced -> LSI Software RAID Configuration Utility (SATA). Go to Virtual Drive Management -> Create Configuration to create a virtual drive. Once it is created, save the change and reset the server.
    If the SATA mode is set to AHCI, change it to RAID first. Otherwise you will not see the configuration menu.
  5. Boot from Ubuntu installation image
  6. Boot the serer from Ubuntu Installation media. You can mount an ISO image to iRMC AVR console if you have advanced license installed. Before starting the installer, add "modprobe.blacklist=ahci" to the kernel option line so that the installer does not load the ahci driver.
  7. Open a terminal and copy the megasr.ko module to the installer
  8. Press <Ctrl>+<Alt>+<F2> to bring up a shell, and copy the megasr.ko file to the installer.
  9. Load the megasr driver
  10. Install the megasr module to the installer, and load it to the kernel so that the installer can see the virtual drive as a MegaSR device instead of dmraid or mdadm.
    # mkdir /lib/modules/4.4.0-87-generic/updates
    # cp megasr.ko /lib/modules/4.4.0-87-generic/updates
    # depmod -a
    # modprobe megasr
    
    If you create a udeb packaage for megasr, you don't have to do this as the installer can automatically load it from the driver image. You need to create a proper driver image to do this though (create the OEMDRV label for the vfat partition, and place the udeb package to like /driver-injection-disk/Ubuntu-drivers/xenial).
  11. Continue the installation
  12. Go back to the installer screen by pressing <Ctrl>+<Alt>+<F1>, and continue the installation. When you get to the partitioning step, you will see a MegaSR device.
  13. Rebuild the initramfs image before reboot
  14. When the installer says it's completed, press <Ctrl>+<Alt>+<F2> to the shell before rebooting the server. Copy the megasr module to the target virtual disk, and recreate the initramfs image.
    # mkdir /target/lib/modules/4.4.0-87-generic/updates
    # cp megasr.ko /target/lib/modules/4.4.0-87-generic/updates
    # chroot /target
    # depmod -a
    # echo "blacklist ahci" >> /etc/modprobe.d/blacklist.conf
    # update-initramfs -u -v
    
    If you craete a driver deb package for megasr, you don't have to do this step as the installer automatically installs it to the target device.
  15. Reboot the server
  16. Go back to the installer screen by <Ctrl>+<Alt>+<F1>, and reboot the server.
  17. Log in to Ubuntu
  18. Now you can use Ubuntu as normal. You can see the MegaSR device under /proc/scsi/scsi.
    # cat /proc/scsi/scsi
    Attached devices:
    Host: scsi0 Channel: 02 Id: 00 Lun: 00
      Vendor: LSI      Model: MegaSR           Rev: 1.0
      Type:   Direct-Access                    ANSI  SCSI revision: 05
    
    If you would like to install ServerView RAID Manager, you can install it so that you can manage the virtual drive with the GUI or the amCLI command.

I used the UEFI mode in this example as the virtual drive is greater than 2TB, but if you are using a virtual drive less than 2TB, you could do the same in legacy mode. Please note that PRIMERGY M4 does not support onboard software RAID in legacy, so if your system is PRIMERGY M4, you have to use UEFI anyway.

Please do not ask me for the megasr driver and ServerView RAID Manager package for Ubuntu as I am not authorized to provide them. Please ask Fujitsu support to obtain the files.

3 comments:

Unknown said...

I am trying on TX2540 M1 then cannot see RAID controller in boot option after disable CSM. On SATA configuration I also cannot see RAID mode option, It only contain AHCI and IDE options. How to configure RAID controller to onboard SATA mode?
Thanks

attilio said...

Hi, where i can download the file megasr.ko for xenial?

Masa Murayama said...

Hi attilio,

Please open a support ticket with your Fujitsu support, and ask them to provide it.

Thanks,
Masa

Good Bye, Folks!

As you may have heard, Fujitsu has completely discontinued Data Center Products and Solutions business in North America on April 1st, 2021. ...