Open muradm opened 7 years ago
I'm getting this too, on the latest download from the Gnome Extensions site. Do I need to configure something differently?
Your user should be able to read /boot/grub/grub.cfg or /boot/grub2/grub.cfg or to scan /boot/efi/ and all its content looking for grub.cfg, it depends on you operating system.
I can read /boot/grub/...
but not /boot/efi
. Do I need both? I would have thought all the info required is in /boot/grub
. One thing worth considering is using Polkit so the user doesn't have to mess around with their distro-set permissions, but I couldn't say how difficult or not that would be.
I used PolKit to run grub-reboot, but to use it to synchronously populate a menu is not advisable. A DBus service exposing methods to list grub menu items and run grub-reboot would be the right solution, but out of scope for a gnome-shell extension project. If you want to take care of the DBus service, I will adapt the extension ;)
I'll add it to my list... :/
I commented out the lines in getFile()
attempting to read /boot/efi
, and this solved the problem in my case.
@indigoviolet, does it still show the list of operating systems you can boot into?
It only started showing the list of operating systems after I commented out /boot/efi
-- the permissions for that directory weren't open, and for some (unknown to me) reason I couldn't chmod
them to be broader.
(On Ubuntu 18.04) It's because /boot/efi
is formatted FAT32 (as per UEFI spec), mounted from fstab, so the owner is root, and umask=0077
, so permissions are always 700
and cannot be changed.
@patriziobruno is it reasonable to try{}catch{} that error raised by findFile(Gio.file_new_for_path("/boot/efi"));
and fall back to /boot/grub detection?
oh, looks like it was fixed a long time ago in https://github.com/patriziobruno/grubreboot-gnome-shell-extension/commit/56ce40739e713baab8a877391581d7e91e547e53, but was not pushed to gnome extensions.
@synchrone the commit is merged, but it doesn't solve the issue, it just handles the error in a nicer way and tries to work around, whenever possible
Falling back to /boot/grub fixes the drop-down menu issue for me, I can see my grub options while booting UEFI.
However, this patch is not present when installing from https://extensions.gnome.org/extension/893/grub-reboot/, and my metadata.json contains "version": 13.
Are you suggesting there are configurations/distros where only querying /boot/efi
would work, and boot/grub will not?
should be using sudo or alike?...