New Debian 3cx install GRUB Fails

Discussion in '3CX Phone System - General' started by saguaro, Apr 16, 2017.

Thread Status:
Not open for further replies.
  1. saguaro

    Joined:
    Aug 2, 2013
    Messages:
    5
    Likes Received:
    0
    I am installing a new 3cx v15 using the debian iso on a Shuttle NC02U with a m.2 PCE Express SATA. The install goes fine until it get's to GRUB then it fails. Any idea's?
     
  2. smario

    smario Support Team

    Joined:
    Dec 14, 2016
    Messages:
    21
    Likes Received:
    2
    Hi,

    Are you installing our ISO?

    Make sure that from the BIOS settings, check if you have BIOS CSM mode enabled. It is recommended on the NC02U to have this enabled as this forces the Debian installer to boot into PC compatibility mode (and not EFI) and also install GRUB on the MBR rather than the EFI layout.

    When you boot into the Debian installer, go through the steps until you've reached the question about installing grub.

    Pause and do not proceed with grub install just yet.

    Hold ctrl+alt + F2. You will be presented with a terminal in which you will type: tail -f /var/log/syslog. Like this you can monitor what happens when you install grub. You will switch between the terminal and the installer screen this way. CTRL+ALT+F1 will take you back to the installer.

    Go back to the installer (ctrl+alt+F1). Install grub and make sure its selected to install on the MBR of the boot disk usually /dev/sda1. If it fails, CTRL+ALT+F2 takes you back to the syslog output and you can get the exact reason why grub is failing. If it fails reply back with the error message that GRUB logs to syslog. Check first though that you have CSM enabled to disable Debian going into EFI mode from the BIOS.

    Let me know of your results.
     
    #2 smario, Apr 18, 2017
    Last edited: Apr 18, 2017
  3. saguaro

    Joined:
    Aug 2, 2013
    Messages:
    5
    Likes Received:
    0
    The BIOS is not in UEFI mode. This works to a Standard drive just not to a M.2 in pcie. This fails on the grub. I will post the logs
     
  4. saguaro

    Joined:
    Aug 2, 2013
    Messages:
    5
    Likes Received:
    0
    grub-installer failed with error code 1. I did find a couple of articles about Debian and NVE SSD not being support in some kernel versions.
     
  5. smario

    smario Support Team

    Joined:
    Dec 14, 2016
    Messages:
    21
    Likes Received:
    2
    It looks like you're faced with one or possibly two problems here. M2 support for the current Debian stable kernel is sometimes problematic but thankfully not far from the current kernel version, things improve drastically. Secondly, there is a known bug in grub installing the bootloader on nvme disks, both in UEFI or legacy mode.

    Being faced with both problems here presents you with two options:

    1) Swap out the M2 SSD for a traditional disk. 3CX PBX disk I/O requirements are more than comfortably met with a traditional SATA disk/SSD on a mini PC. It's also a NC02U hardware setup that we've tested and know works very well. This also solves both the nvme Debian support problem as well as the Grub problem.

    2) The NC02U BIOS supports setting the disk to native SATA; NVME disabled. Check the BIOS options for the M2 disk. This will allow you to partition and install to disk but Grub must be installed manually. It will fail if you install using the Debian installer screens as you will almost likely be dealing with the second problem mentioned above . I will PM you regarding this.
     
  6. saguaro

    Joined:
    Aug 2, 2013
    Messages:
    5
    Likes Received:
    0
    This is a M.2 nvme unit. The SSD does not show in SATA mode. I will just switch to a standard sata.
     
  7. Bhavin

    Joined:
    May 9, 2017
    Messages:
    2
    Likes Received:
    0
    Hi there

    I have solved this problem, these are the steps I followed

    1. Enter BIOS
    2. Go to Advanced - Oboard Devices Configuration - M.2 Device Select change to PCIE
    3. Go to Boot - Change Boot Mode Select - UEFI
    4. Save and Exit
    5. Boot from the 3CX ISO - Follow setup till the grub fails
    6. From the setup menu go to shell
    7. Type the following:

    cd /target
    mount -t proc proc proc/
    mount --rbind /sys sys/
    mount --rbind /dev dev/
    mount --rbind /run run/
    chroot . /bin/bash

    nano /etc/apt/sources.list
    --add in
    deb http://http.debian.net/debian jessie-backports main
    --exit and save

    apt-get update
    apt-get -t jessie-backports install linux-image-amd64
    apt-get -t jessie-backports install grub-efi
    update-grub
    grub-install

    exit the shell and go to continue without installing boot loader

    after the setup finish and the reboot you should be able to setup the 3CX system

    Kind Regards

    Bhavin
     
  8. Bhavin

    Joined:
    May 9, 2017
    Messages:
    2
    Likes Received:
    0
    The M.2 drive will not show in the BIOS
     
Thread Status:
Not open for further replies.