Code Monkey home page Code Monkey logo

efiboots's People

Contributors

ambr051us avatar azenla avatar diacius avatar elinvention avatar larathbone avatar nimatrueway avatar st331h0rs3 avatar thorstenhirsch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

efiboots's Issues

SyntaxError: invalid syntax #2

$ python3 '/home/m/Downloads/efibootmgr-gui-directreboot/efibootmgr_gui.py' 
  File "/home/m/Downloads/efibootmgr-gui-directreboot/efibootmgr_gui.py", line 242
    str += f'efibootmgr {esp} --delete-bootnum --bootnum {entry}\n'
                                                                  ^
SyntaxError: invalid syntax

OS: Ubuntu 16.04

doesn't work on NVME drives

when running on NVME drive where the partitions are named /dev/nvme0n1p1
it fails with

findmnt --noheadings --output SOURCE --target /boot/efi
/dev/nvme0n1p1
Could not parse device path: Invalid argument
Command '['efibootmgr', '-v']' returned non-zero exit status 18.

Here the argument for efibootmgr should be --disk /dev/nvme0n1p1

How to install ?

Noob question.

Why not just upload a deb file or give us a build that doesn't require this Nix thing.

unable to start gui

demicv@ASUSLaptopX509FA:~$ sudo apt install efibootmgr python3
[sudo] password for demicv:            
Reading package lists... Done
Building dependency tree       
Reading state information... Done
efibootmgr is already the newest version (17-1).
python3 is already the newest version (3.8.2-0ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
demicv@ASUSLaptopX509FA:~$ sudo python3 efiboots
python3: can't open file 'efiboots': [Errno 2] No such file or directory
demicv@ASUSLaptopX509FA:~$ 

Can't Launch Xubuntu 21.10

When the script is run this happens:

Traceback (most recent call last):
  File "/home/george/efiboots/efiboots", line 6, in <module>
    import efiboots
  File "/home/george/efiboots/efiboots.py", line 9, in <module>
    gi.require_version('Gtk', '4.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace Gtk not available for version 4.0

I did some research and it's because the Gtk 4.0 libraries are unavailable on Ubuntu. Any suggestions?

Incorrect Scaling on High DPI monitor since GTK4 update

Since the switch to GTK4, the application is not scaling properly on a high DPI monitor. I have my system configured for 2x scaling so that everything isn't absolutely tiny (my device has a resolution of 3000X2000 in about 13in, so fairly close to about 3k). The following is a screenshot of the application when I launch it:

Screenshot_20211205_014809

Attempting to override the scaling for this app by running GDK_SCALE=1, the window size is usable, but then all controls are so tiny that they are nearly impossible to use:

Screenshot_20211205_015603

Before the switch from GTK3 to GTK4, everything was scaling fine without issue.

System Configuration:
Arch Linux
Kernel v5.15.5
Desktop Environment: KDE Plasma 5.23.4-1, X11
efiboots version: 1.0.r7.ga2514cd-1, installed from AUR package

Empty loader path

In one recent commit I changed the regex without realizing it didn't work properly. Then I rewrote the tests using the same regex, so all tests are wrong.

I have to figure out a better way to test this.

crash/segfault with python 3.5 on Ubuntu 16.04

Ok, something a bit weird. When I run python3 efibootmgr-gui.py it crashes with a segfault in gtk_list_store_reorder(). But when I then tried just efibootmgr-gui.py it started once. Now after trying it again that crashes too. I have the whole crash report with trace etc available if you want to take a look at it.

Screenshots?

Hi!

Are there screenshots of this tool in action somewhere?

Thanks!

Arch Linux autofs of EFI breaks discovery

I was attempting to add a boot parameter to my kernel and I could not run the gui. It would fail with

DEBUG:root:Running: findmnt --noheadings --output SOURCE,FSTYPE --mountpoint /efi
Traceback (most recent call last):
  File "/usr/bin/efiboots", line 18, in <module>
    efiboots.run(parsed_args.disk, parsed_args.part)
  File "/usr/lib/python3.9/site-packages/efiboots.py", line 571, in run
    disk, part = auto_detect_esp()
  File "/usr/lib/python3.9/site-packages/efiboots.py", line 125, in auto_detect_esp
    result = find_esp_method()
  File "/usr/lib/python3.9/site-packages/efiboots.py", line 82, in auto_detect_esp_with_findmnt
    source, fstype = subprocess.run(cmd, check=True, capture_output=True, text=True).stdout.strip().split()

So I added an additional debug and I found it the problem is that since I have my EFI partition set to automount in my fstab, findmnt sees two mount points and crashes the app.
If I add [-2:] to the end of the line it would only grab the last entry, which fixed my setup, but I do not know if the autofs entry is always first or not.

FYI: the output of the findmnt command on my system:

findmnt --noheadings --output SOURCE,FSTYPE --mountpoint /efi
systemd-1      autofs
/dev/nvme0n1p1 vfat

SyntaxError: invalid syntax

This error is receiving:
$ sudo python efibootmgr-gui.py

Traceback (most recent call last):
File "efibootmgr-gui.py", line 9, in
import efibootmgr
File "/home/m/Downloads/efibootmgr-gui-master/efibootmgr.py", line 7
print(*cmd)
^
SyntaxError: invalid syntax

Path extraction not working

This little patch fixes it for me:

diff --git a/efiboots.py b/efiboots.py
index 25e8bb9..96c1a0f 100644
--- a/efiboots.py
+++ b/efiboots.py
@@ -152,7 +152,7 @@ def auto_detect_esp():
        sys.exit(-1)
 
 
-efibootmgr_regex = re.compile(r'^Boot([0-9A-F]+)(\*)? (.+)\t(?:.+File\((.+)\))?.*\)(.*)$')
+efibootmgr_regex = re.compile(r'^Boot([0-9A-F]+)(\*)? (.+)\t.*File\((.+)\)?.*\)(.*)$')
 
 
 def try_decode_efibootmgr(code):

After using the script, I am unable to enter the system BIOS

Hi!

I used the script to set the nextboot option to my USB DVD drive. After restart DVD wasn't booted. I restarted again, and tried to enter system BIOS, to look for the boot options. Since then I am unable to enter the BIOS any more, it simply freezes with a black screen, and a non-blinking cursor in the left top corner. I think this is a BIOS problem, though.

Compatibility

Since there is no package I just copied the old sources to machine by machine. Now I downloaded the newer sources on a newer machine and realised that it is broken. Then I checked the readme again and noticed that the minimum requirement now is Ubuntu 22.10.

I have a few machines with 20.04 and 22.04 but as most long term Ubuntu users I don't have any with 22.10 for tons good reasons. Nobody use non-LTS systems. Makes no sense. So is it possible to add compatibility or are there any workaround for 20.04/22.04 systems to make it run?

Strange characters

I just tested the tool on a brand new HP mini machine. Maybe the issue is totally unrelated but I need confirmation. So after a fresh Ubuntu 24.04 installation I see these chinese texts and strange characters:

Képernyőkép 2024-05-19 16-31-39

entries are not deleted

entries are deleted only in the program window and nothing happens when you click "save"

Ubuntu 19.10 MATE 1.22.2

UPD: Thanks!

TypeError

info:
os: Arch Linux
Python 3.7.3

findmnt --noheadings --output SOURCE --target /boot/efi
/dev/sda2
Traceback (most recent call last):
  File "efibootmgr-gui.py", line 328, in <module>
    win = EFIWindow()
  File "efibootmgr-gui.py", line 218, in __init__
    self.store = EFIStore(self)
  File "efibootmgr-gui.py", line 93, in __init__
    self.refresh()
  File "efibootmgr-gui.py", line 135, in refresh
    self.reorder()
  File "efibootmgr-gui.py", line 102, in reorder
    super().reorder(items)
TypeError: Item 4: Must be number, not NoneType

Double quota

Hi,
i have used your program under Fedora 31 i lost a UEFI boot entry the program is very useful, the part that show the command is very important, it solves my problem.

I have only one issue
the loader part need double quota

sudo efibootmgr --disk /dev/sda --part 1 --create --label fedora --loader "\EFI\fedora\grubx64.efi"

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9e in position 127: invalid start byte

I'm getting an error running this program. reading from internet they say it's a problem with my locale or language. i already try installing a language pack, update-locale etc.. I'm stuck how can i fix this?

putraadr@ptrsoft:~/files/efibootmgr-gui$ sudo python3 efibootmgr_gui.py 
DEBUG:root:Running: findmnt --noheadings --output SOURCE,FSTYPE --mountpoint /efi
DEBUG:root:Running: findmnt --noheadings --output SOURCE,FSTYPE --mountpoint /boot/efi
DEBUG:root:Device path /dev/sda1 split into /dev/sda and 1
INFO:root:Detected ESP on disk /dev/sda part 1
Traceback (most recent call last):
  File "efibootmgr_gui.py", line 503, in <module>
    main()
  File "efibootmgr_gui.py", line 496, in main
    win = EFIWindow(f"--disk {disk} --part {part}")
  File "efibootmgr_gui.py", line 429, in __init__
    self.store.refresh()
  File "efibootmgr_gui.py", line 259, in refresh
    boot = run_efibootmgr()
  File "efibootmgr_gui.py", line 17, in run_efibootmgr
    output = subprocess.run(["efibootmgr", "-v"], check=True, capture_output=True, text=True).stdout.strip().split('\n')
  File "/usr/lib/python3.8/subprocess.py", line 491, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
  File "/usr/lib/python3.8/subprocess.py", line 1024, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.8/subprocess.py", line 1904, in _communicate
    stdout = self._translate_newlines(stdout,
  File "/usr/lib/python3.8/subprocess.py", line 901, in _translate_newlines
    data = data.decode(encoding, errors)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9e in position 127: invalid start byte

efibootmgr-gui-git on AUR is broken

==> Starting package()...
install: cannot stat '/var/tmp/pamac-build-yes/efibootmgr-gui-git/src/efibootmgr-gui/efibootmgr.desktop': No such file or directory
==> ERROR: A failure occurred in package().
    Aborting...

The PKGBUILD on AUR is broken due to recent commits. Please update it.

Does not write the new Entry.

When i add a new Entry, i get this Error and it does not Write the new entry.

Command '['pkexec', 'sh', '-c', "efibootmgr --disk /dev/nvme0n1p --part 1 --create --label 'KUbuntu' --loader '\EFI\ubuntu\shimx64.efi'\n"]' returned non-zero exit status 5.

sincelery Uwe

Locks up after the 5th pkexec

I say "locks up" - it holds my SSD in a busy state. Processes run for a bit, but then everything grinds to a halt. I had tty2 open to run iotop to see if I could figure out what was going on. I couldn't, but it told me this:

Killed process xxxxx (python3) total-vm:62715315kB, anon-rss:31522500kB, file-rss:2304kB, shmem-rs:16kB

Run 1:
pkexec efibootmgr --disk /dev/sda --part 1 --bootnum 0008 --inactive
pkexec efibootmgr --disk /dev/sda --part 1 --bootnum 0009 --inactive
pkexec efibootmgr --disk /dev/sda --part 1 --bootnum 0002 --inactive
pkexec efibootmgr --disk /dev/sda --part 1 --bootnum 0001 --inactive
pkexec efibootmgr --disk /dev/sda --part 1 --bootnum 0000 --inactive
Killed

Run 2:
pkexec efibootmgr --disk /dev/sda --part 1 --delete-bootnum --bootnum 0000
pkexec efibootmgr --disk /dev/sda --part 1 --delete-bootnum --bootnum 0008
pkexec efibootmgr --disk /dev/sda --part 1 --delete-bootnum --bootnum 0001
pkexec efibootmgr --disk /dev/sda --part 1 --delete-bootnum --bootnum 0002
pkexec efibootmgr --disk /dev/sda --part 1 --bootnext 0009
Killed

Feautre Request: Edit/Duplicate

Hi,

nice UI. I would vote for this to be integrated in the system settings of ubuntu etc (I use arch btw ;))

However, since I have a long list of parameters I am afraid to break, it would be great if I could edit existing entries with the UI. If that is not so easy to implement, at least a duplicate button, which just prefills the "new entry" UI with the values of the currently selected entry would be nice.

AUR package does not include gtk dependency

The gtk3/gtk4 package is not listed as a dependency in the AUR PKGBUIlD. Came across this when installing/updating efiboots in a QT-based desktop environment such as KDE on Arch on a few different occasions, so GTK had not been installed on my system. (This was also the first application on my system to use gtk4 even though I had gtk3 installed by this point.)

I noticed that you also appear to maintain the AUR package for this application, so I figured that this is one place where I could point this out.

Traceback (most recent call last)

benutzername@Thinkpad-E15:~/Downloads$ git clone https://github.com/Elinvention/efiboots.git
Klone nach 'efiboots'...
remote: Enumerating objects: 260, done.
remote: Counting objects: 100% (135/135), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 260 (delta 78), reused 88 (delta 47), pack-reused 125
Empfange Objekte: 100% (260/260), 111.96 KiB | 3.11 MiB/s, fertig.
Löse Unterschiede auf: 100% (144/144), fertig.

benutzername@Thinkpad-E15:~/Downloads$ cd efiboots/

benutzername@Thinkpad-E15:~/Downloads/efiboots$ python3 efiboots
Traceback (most recent call last):
File "/home/benutzername/Downloads/efiboots/efiboots", line 6, in
import efiboots
File "/home/benutzername/Downloads/efiboots/efiboots.py", line 9, in
gi.require_version('Gtk', '4.0')
File "/usr/lib/python3/dist-packages/gi/init.py", line 129, in require_version
raise ValueError('Namespace %s not available for version %s' %
ValueError: Namespace Gtk not available for version 4.0

benutzername@Thinkpad-E15:~/Downloads/efiboots$ sudo uname -a

Linux Thinkpad-E15 5.19.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1 (2022-09-24) x86_64 GNU/Linux

I did not know what the error is. :-(

Multilang support?

I'm using your fine tool for many years now and I also translated the script for myself but it would be cool if we can "spread the word". Any chances?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.