diff --git a/src/tui.cpp b/src/tui.cpp index a29da08..0d7f4f9 100644 --- a/src/tui.cpp +++ b/src/tui.cpp @@ -1757,6 +1757,9 @@ void mount_partitions() noexcept { const auto& part_fs = gucc::fs::utils::get_mountpoint_fs(mountpoint_info); auto root_part_struct = gucc::fs::Partition{.fstype = part_fs, .mountpoint = "/"s, .device = root_part, .mount_opts = mount_opts_info}; + const auto& root_part_uuid = gucc::fs::utils::get_device_uuid(root_part_struct.device); + root_part_struct.uuid_str = root_part_uuid; + // insert root partition partitions.emplace_back(std::move(root_part_struct)); @@ -1879,6 +1882,9 @@ void mount_partitions() noexcept { const auto& part_fs = gucc::fs::utils::get_mountpoint_fs(mountpoint_info); auto part_struct = gucc::fs::Partition{.fstype = part_fs, .mountpoint = mount_dev, .device = partition, .mount_opts = mount_opts_info}; + const auto& part_uuid = gucc::fs::utils::get_device_uuid(part_struct.device); + part_struct.uuid_str = part_uuid; + // insert root partition partitions.emplace_back(std::move(part_struct)); diff --git a/src/utils.cpp b/src/utils.cpp index 792ef0b..37a73d7 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1083,7 +1083,7 @@ void install_refind() noexcept { const auto& part_fs = gucc::fs::utils::get_mountpoint_fs(mountpoint); auto root_part_struct = gucc::fs::Partition{.fstype = part_fs, .mountpoint = "/", .device = fmt::format(FMT_COMPILE("/dev/{}"), root_name)}; - const auto& root_part_uuid = gucc::utils::exec(fmt::format(FMT_COMPILE("lsblk -o UUID '{}' | awk 'NR==2'"), root_part_struct.device)); + const auto& root_part_uuid = gucc::fs::utils::get_device_uuid(root_part_struct.device); root_part_struct.uuid_str = root_part_uuid; const bool is_removable = (gucc::utils::exec(fmt::format(FMT_COMPILE("cat /sys/block/{}/removable"), root_device)) == "1"sv);