Is It Possible To Install FreePBX Distro On A Device With UEFI Enabled?

Without going into too much detail (I will if needed) is it even possible to install FreePBX Distro on a device with UEFI enabled? I’m trying to install FreePBX-3.211.63-5-x86_64-Full Distro along with Asterisk 11 on a UEFI enabled device only to find that just CentOS 6.3 installs and none of the FreePBX Pre or Post install scripts run. The FreePBX custom Splash Screen does not even appear during the installation boot, it just goes straight to the default CentOS 6.3 GRUB Splash Screen.

Anaconda kickstart and other shit will vet in your way, try:-

You know it’s a bad sign when the blogger and his friend (who has 10 years Linux experience) took 8 hours to figure this problem out. Plus, there were a few replies stating it’s less headache to just boot the device in BIOS Legacy Mode but I don’t even have that option on my devices. This is why I wish FreePBX would use a Linux OS that is more Mainstream; how long has UEFI been out? I might be a little biased being that I’m an avid Ubuntu user but then again Ubuntu installed just fine on my UEFI devices. I modified the kernel at the GRUB Splash Screen to boot with the ks=hd:sdb1:/kickstart-advanced-asterisk11.cfg file and added asknetwork as well. I also had to modify the kickstart-advanced-asterisk11.cfg itself since I was installing from a USB drive harddrive --partition=sdb1 --dir=/ and by indicating the bootloader bootloader --location=partition --driveorder=sda since my HDD was in GPT parition table format. But for some reason during and after the CentOS install it does not run parts of the kickstart config script (eg. it did not copy over pbx_first_boot.sh script or add the FreePBX.repo to name a few). It did however append the path: /etc/pbx_first_boot.sh to the /etc/rc.local config file. I also noticed in the kickstart config file that some of the script commands reference the complete path and others just use the command by itself. The command to append the path of the pbx_first_boot.sh script to rc.local used the full command path: /bin/echo “/etc/pbx_first_boot.sh” >> /etc/rc.local but actually moving the script file to the /etc directory DID NOT use the full command path: cp /kickstart-sourcefiles/pbx_first_boot.sh /etc/pbx_first_boot.sh Is there some connection between not referencing the command path and installing the FreePBX Distro on a UEFI device from a USB drive? After all, the /etc/pbx_first_boot.sh was appended to the /etc/rc.local file successfully but the actual script was not moved to the /etc directory. CentOS installed and booted up but FreePBX didn’t work even after I manually ran the pbx_first_boot.sh which gave me a lot of errors…but that’s another story.

Unfortunately, Centos waits for RHEL, RHEL makes it’s money out of old but money spinning deployments. Currently there is no way to easily bootstrap a Centos based distro into UEFI.

Debian is a a little lighter on it’s feet in that respect in it’s preboot ability. I am pretty sure that FreePBX will not take that route “anytime soon” unfortunately.

It’s not that I can’t install CentOS…it’s that FreePBX’s customized Anaconda installer and Kickstart files do not properly load and I feel like I’ve tried every combination of Kickstart and config options I can think of. If I could somehow figure out how to trigger the isolinux folder and it’s corresponding files to immediately load after booting in UEFI mode using BOOTX64.efi. The files in isolinux are a crucial piece of the puzzle to installing FreePBX’s customized Distro, hence why this installation works perfectly in Legacy BIOS mode. I’ve tried moving all the files in isolinux to the /EFI/BOOT directory on the Distro ISO as well as changing the config files and table files to load the corresponding files in the new directory, but that just brings me to the GRUB command prompt. At that point I can only get the kernel and initrd to load but that’s it. Heck, I can’t even get the FreePBX customized splash screen to appear. Something also tells me the vesamenu.c32 file plays a big part in this puzzle as well but I’m assuming that is not compatible with a UEFI mode boot? I feel if I don’t install FreePBX in UEFI mode then I am not taking advantage of all my hardware’s performance and capabilities…am I wrong?

Unless you need to boot from a drive bigger than ~ 2Tb then there are no performance hits, if you want to boot from such a beast you will need to a) use gpt partitioning not msdos, b) use a kernel newer than 2.6.29 , c)rewrite the kickstart.cfg files to suit

You can always install manually.

http://wiki.freepbx.org/display/IFG/Installing+FreePBX+GUI+Home

WHAT!!! AN OFFICIAL UP-TO-DATE UBUNTU INSTALLATION GUIDE!! This is absolutely amazing…how did I miss this?? This should be on your Homepage in flashing Neon font. Does this mean that Schmooze is going to devote Dev time and plan to gear future FreePBX Distros towards an Debian/Ubuntu installation? I’ll give it a try and keep my fingers crossed and many thanks go to whoever created this as I’ve been waiting a while!

Schmooze already devotes development time to other distributions. That is why I wrote those articles as I was paid by schmooze to fix those issues along with gamegamer43. I wrote the articles in my free time.

I dont think we will move the FreePBX distro away from Cent anytime soon, but our goals are to have freepbx working with all linux based distributions, BSD distros are a little more difficult but we are still working on them.

Thank you for putting the Ubuntu tutorial together!

Latest FreePBX (FreePBX-4.211.64-5-x86_64) installs quite well in x64 (U)EFI mode. Probably one has to use a special bootable EFI USB install media. More information can be found here:
http://bugs.centos.org/view.php?id=6627

Because CentOS 6.4 and FreePBX use an “outdated” kernel, you have to install quite likely a whole bunch of hardware drivers / kernel modules from ELRepo (http://elrepo.org/tiki/tiki-index.php)

Thank you for the update, I still need to update my system so I’m definitely going to go this route.

After I installed FreePBX now in “legacy CSM Mode” I find out your mentioned differences! It is EXACTLY as you said! When installed in EFI mode, none of the FreePBX Pre or Post install scripts will run!!! Also the newest FreePBX distro will install in (U)EFI mode just a “stock” CentOS 6.4. :frowning:

And I wonder me why I was not able to connect trough a web browser to my MacMini FreePBX Server. damn Very disappointing that I became aware just now, soooo late. I was looking concerning the problem all the time at the wrong places…

Well, I checked the web, - the guy who created the ISO2USB tool supposed that there could be in “EFI Mode” something wrong with the “kickstart configuration” or some script is missing in another place… (?)

To answer your question: Yes. The problem is definitely the Kickstart configuration file so I did this:

  • Put your system in BIOS mode
  • Format the target HDD to a GPT partition table and create one ESP-"EFI System Partition" which must be in FAT file system format and a minimum of 100MB (I believe this is the industry standard)
  • Install FreePBX in BIOS mode via CD/DVD...I found too much time was wasted modifying the Kickstart configuration file versus installing from a CD/DVD drive
  • After the entire installation has been completed (post install scripts and all) reboot; you will then need to install grub.efi (or grubx64.efi) to the ESP as well as assign the ESP a boot flag
  • After that, change your system back to EFI mode and reboot
The system should now boot from the grub.efi or grubx64.efi located in the ESP. Here's a link by rEFInd author Rod Smith:href="http://www.rodsbooks.com/refind/">rEFInd It's geared towards installing rEFInd on a MAC but Mr. Smith goes into a lot of detail that will give you a better understanding of EFI. Also remember that Google and Wiki are wonderful friends as well. Forgive me if I missed something but I did this several months ago...but it appears all this work is no longer needed with the new FreePBX Distribution. I hope all this information at least helps point you in the right direction!

Many thanks for this detailed explanation!

Note, this whole workaround is unfortunately also needed at latest FreePBX 2.11 (CentOS 6.4) based Distro… :frowning: Probably a future release will fix it.

Question, whats about the Cent OS to FreePBX “converting script”? Will it also fail because of the same “EFI Kickstart configuration” issue?

Last point, do you know where’s the problem exactly located? Is it a “FreePBX Schmooze script” related issue? Or is it somehow deeper in the “kickstart / anaconda subsystem” itself? I think someone should send concerning this grave error a bug report…

Hi alteredstate
I have opened a bug report regarding this issue at issues.freepbx.org. It would be great if you can leave some hints regarding yours experiences. Probably you know which scripts musts be how changed to be EFI compliant. :wink:

By the way, - my previous mentioned “CentOS to FreePBX conversion script” idea seems to also not possible. It will leave (in EFI mode) also just an nonfunctional installation…