diff --git a/vanilla_installer/core/disks.py b/vanilla_installer/core/disks.py
index bc354a1f..9ec9e8d1 100644
--- a/vanilla_installer/core/disks.py
+++ b/vanilla_installer/core/disks.py
@@ -207,10 +207,10 @@ def __eq__(self, other):
class DisksManager:
- def __init__(self):
- self.__disks = self.__get_disks()
+ def __init__(self, removableDevices=False):
+ self.__disks = self.__get_disks(removableDevices)
- def __get_disks(self):
+ def __get_disks(self, removableDevices):
disks = []
for disk in os.listdir("/sys/block"):
@@ -221,7 +221,9 @@ def __get_disks(self):
with open("/sys/block/" + disk + "/removable") as f:
removable = int(f.readlines()[0].strip())
- if removable == 1:
+ if removable == 1 and not removableDevices:
+ continue
+ if removable == 0 and removableDevices:
continue
disks.append(Disk(disk))
diff --git a/vanilla_installer/defaults/disk.py b/vanilla_installer/defaults/disk.py
index 8b4ed2fc..80703b64 100644
--- a/vanilla_installer/defaults/disk.py
+++ b/vanilla_installer/defaults/disk.py
@@ -662,6 +662,7 @@ class VanillaDefaultDisk(Adw.Bin):
btn_auto = Gtk.Template.Child()
btn_manual = Gtk.Template.Child()
group_disks = Gtk.Template.Child()
+ removable_disks = Gtk.Template.Child()
disk_space_err_box = Gtk.Template.Child()
disk_space_err_label = Gtk.Template.Child()
@@ -673,8 +674,10 @@ def __init__(self, window, distro_info, key, step, **kwargs):
self.__step = step
self.delta = False
self.__registry_disks = []
+ self.__registry_removable_disks = []
self.__selected_disks = []
self.__disks = DisksManager()
+ self.__removable_disks = DisksManager(removableDevices=True)
self.__partition_recipe = None
self.__selected_disks_sum = 0
@@ -691,6 +694,12 @@ def __init__(self, window, distro_info, key, step, **kwargs):
self.__registry_disks.append(entry)
+ for disk in self.__removable_disks.all_disks:
+ entry = VanillaDefaultDiskEntry(self, disk)
+ self.removable_disks.add_row(entry)
+
+ self.__registry_removable_disks.append(entry)
+
# signals
self.btn_next.connect("clicked", self.__on_btn_next_clicked)
self.btn_auto.connect("clicked", self.__on_auto_clicked)
diff --git a/vanilla_installer/gtk/default-disk.ui b/vanilla_installer/gtk/default-disk.ui
index a329f0b0..7226ea3d 100644
--- a/vanilla_installer/gtk/default-disk.ui
+++ b/vanilla_installer/gtk/default-disk.ui
@@ -33,6 +33,15 @@
+
+
+