diff --git a/kernel/kernel/FS/VirtualFileSystem.cpp b/kernel/kernel/FS/VirtualFileSystem.cpp index c7b40f49..d90b5e1f 100644 --- a/kernel/kernel/FS/VirtualFileSystem.cpp +++ b/kernel/kernel/FS/VirtualFileSystem.cpp @@ -59,14 +59,14 @@ namespace Kernel BAN::StringView entry; RootType type; - if (root_path.size() >= 5 && root_path.substring(0, 5) == "UUID="_sv) + if (root_path.starts_with("PARTUUID="_sv)) { - entry = root_path.substring(5); + entry = root_path.substring(9); if (entry.size() != 36) panic("Invalid UUID '{}'", entry); type = RootType::PartitionUUID; } - else if (root_path.size() >= 5 && root_path.substring(0, 5) == "/dev/"_sv) + else if (root_path.starts_with("/dev/"_sv)) { entry = root_path.substring(5); if (entry.empty() || entry.contains('/')) diff --git a/script/install-bootloader.sh b/script/install-bootloader.sh index 12fd153e..af43d95a 100755 --- a/script/install-bootloader.sh +++ b/script/install-bootloader.sh @@ -110,7 +110,7 @@ if [ $BANAN_BOOTLOADER = "GRUB" ]; then root_part_uuid=${root_part_uuid:10:36} cp "$BANAN_TOOLCHAIN_DIR"/grub-*.cfg "$BANAN_BUILD_DIR/" - sed -i "s//UUID=$root_part_uuid/" "$BANAN_BUILD_DIR"/grub-*.cfg + sed -i "s//PARTUUID=$root_part_uuid/" "$BANAN_BUILD_DIR"/grub-*.cfg sed -i "s//$root_fs_uuid/" "$BANAN_BUILD_DIR"/grub-*.cfg if (($BANAN_UEFI_BOOT)); then