BootLoaderError failed to write

Hi, After failing to install multiple time, i finally got the installer to run by editing the install command on the grub screen to target my USB drive via UUID instead of label.
Now im failing in the install itself right at the end, with an error about writing the bootloader configuration, and a message saying the drive wont be bootable.

This is the log:
03:04:13,431 DEBUG anaconda: Left spoke: PasswordSpoke
03:05:22,362 INFO anaconda: Installing boot loader
03:05:22,362 INFO anaconda: boot loader stage1 target device is nvme0n1p1
03:05:22,362 INFO anaconda: boot loader stage2 target device is nvme0n1p2
03:05:22,363 DEBUG anaconda: new default image: <pyanaconda.bootloader.LinuxBootLoaderImage object at 0x465c6d0>
03:05:22,416 INFO anaconda: bootloader.py: used boot args: crashkernel=auto rd.lvm.lv=rockstor/root rd.lvm.lv=rockstor/swap rhgb quiet
03:05:22,564 ERR anaconda: bootloader.write failed: failed to write boot loader configuration
03:05:30,250 DEBUG anaconda: running handleException
03:05:30,250 CRIT anaconda: Traceback (most recent call last):

      File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run
        threading.Thread.run(self, *args, **kwargs)

      File "/usr/lib64/python2.7/threading.py", line 764, in run
        self.__target(*self.__args, **self.__kwargs)

      File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 254, in doInstall
        writeBootLoader(storage, payload, instClass, ksdata)

      File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 2440, in writeBootLoader
        writeBootLoaderFinal(storage, payload, instClass, ksdata)

      File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 2368, in writeBootLoaderFinal
        storage.bootloader.write()

      File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 1773, in write
        self.write_config()

      File "/usr/lib64/python2.7/site-packages/pyanaconda/bootloader.py", line 1572, in write_config
        raise BootLoaderError("failed to write boot loader configuration")

    BootLoaderError: failed to write boot loader configuration

Im trying to install on an Odroid H2 with an NVME ssd

Anyone? i cant be the only one with this issue

I’m having the exact same problems. I have to edit the grub screen to get it to even start. And when I comes to the end, it fails to write the boot loader config.

I’m using the default 3.9.1 installer iso, FWIW.

Any help will be appreciated!
Rick

There is a nice trap with graphic installer. Even if you will fix boot, you will not be able to run system web-UI until your root FS is not btrfs (LVM default in GUI installer). So, you need little steps to go:

  1. boot with installation iso. use --> troubleshooting/text installer and choose btrfs for destination disc.

  2. after error with bootloader say “yes” to continue generation of initramfs etc and finish. reboot

  3. boot with installation iso. use -->troubleshooting/rescue centos to enter recue shell
    There you’ll meet the second surprise. Rescue shell will NOT mount your system automaticaly, because of btrfs. Patience

  4. use lsblk and blkid commands to find what are the partitions. There must be some on device. For /dev/sda will be sda1 - efi, sda2 - boot, sda3 -swap and the biggest sda4 for rockstor btrfs partition.

  5. mount partitions, keeping in mind that there are root and home btrfs subvolumes on sda4.
    mount -t btrfs -o subvol=root,defaults /dev/sda4 /mnt/sysimage
    mount /dev/sda2 /mnt/sysimage/boot
    mount /dev/sda1 /mnt/sysimage/boot/efi
    mount --rbind /dev /mnt/sysimage/dev
    mount --rbind /proc /mnt/sysimage/proc
    mount --rbind /sys /mnt/sysimage/sys

  6. chroot and fix missed grub config
    chroot /mnt/sysimage/
    grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Easy, huh? Installed myself because I love Centos, but I’m pretty scared that dramatic installer issue with wrong grub.cfg destination for UEFI continues for years

1 Like