summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-11-14 15:14:36 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-11-14 18:12:56 +0100
commitf5f8771b6f7aa6ff37dd688085133b28b4bf5f57 (patch)
tree43d2db7022aa8adc61b649cad2f1dbd342e67c22 /src
parent3b5152cdc1e3a97ade927b19fc8cacf1ebedb30a (diff)
grub: fix failed grub configuration when a device is not found
Fix "No medium found" error aborting the grub configuration process. Just log it and continue.
Diffstat (limited to 'src')
-rw-r--r--src/utils/grub.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils/grub.py b/src/utils/grub.py
index 4b403db..c254193 100644
--- a/src/utils/grub.py
+++ b/src/utils/grub.py
@@ -266,7 +266,10 @@ def _get_os_entries(esp_mountpoint):
available_disks = get_disks()
for disk_num, diskname in enumerate(available_disks, start=1):
disk_device = f'/dev/{diskname}'
- partitions_data = get_partition_data(device=disk_device)
+ try:
+ partitions_data = get_partition_data(device=disk_device)
+ except OgError as e:
+ continue
for p in partitions_data:
part_num = p.partno + 1