diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs index 661c6b0..4f3e26e 100644 --- a/slof/fs/packages/disk-label.fs +++ b/slof/fs/packages/disk-label.fs @@ -506,6 +506,23 @@ CREATE GPT-LINUX-PARTITION 10 allot measure-gpt-partition get-gpt-partition 0= IF false EXIT THEN block gpt>num-part-entry l@-le dup 0= IF false EXIT THEN + partition 0> IF + partition <= IF false EXIT THEN + debug-disk-label? IF ." Using GPT partition " partition . cr THEN + partition 1- gpt-part-size * seek-pos + to seek-pos + seek-pos 0 seek drop + block gpt-part-size read drop + block gpt-part-entry>first-lba x@-le + dup to part-start + block gpt-part-entry>last-lba x@-le + over - 1+ + block-size * to part-size + block-size * to part-offset + 0 0 seek drop + block block-size read drop + \ block fat-bootblock? + true + ELSE 1+ 1 ?DO seek-pos 0 seek drop block gpt-part-size read drop @@ -525,6 +542,7 @@ CREATE GPT-LINUX-PARTITION 10 allot seek-pos gpt-part-size + to seek-pos LOOP false + THEN ; \ Extract the boot loader path from a bootinfo.txt file