Endless OS may fail to load, with the following error message:
error: no such device: ostree
This error may be repeated again and again, as follows:
In order to resolve this situation, please check the solutions below:
A. Boot into any Linux Live USB and mount the root filesystem and create/write any files, then shutdown and boot the system it will work again, following as an example,
Open any terminal app
Mount the root parition labeled with "ostree":
$ ls -l /dev/disk/by-label
$ mkdir ostree-root; sudo mount /dev/sdb1 ./ostree-root
Touch or create any file:
$ cd ostree-root; sudo touch /root/any-file
B. Alternatively, reinstalling EOS with a newer version, 3.8.4 or later, will avoid this bug going forward.
The root cause here is that when the system is shut down with a certain number of free inodes on the root filesystem, grub will become confused next time the system is booted, believing that our ext4 filesystem is actually minix.
This is because there is an unfortunate collision with the storage location of the minix superblock magic number and the ext4 free inode counter. The workaround above is to simply adjust the number of files on the disk, such that the free inode count changes.
This grub issue was fixed as of Endless OS 3.8.4, but unfortunately Endless OS does not yet come with an automated bootloader update mechanism. Any installation made with a version older than 3.8.4 will remain susceptible to this issue, even if the installation was updated online to the latest version.