From 12b5d02e378a204c986b52d56b4ca8a0dab6ba21 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Mon, 30 Dec 2019 13:01:43 +1100 Subject: disk-label: Support Linux GPT partition type This adds support for: "Linux filesystem data" 0FC63DAF-8483-4772-8E79-3D69D8477DE4 Previously, Linux used the same GUID for the data partitions as Windows (Basic data partition: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). The new GUID (Linux filesystem data: 0FC63DAF-8483-4772-8E79-3D69D8477DE4) was defined jointly by GPT fdisk and GNU. Source: https://en.wikipedia.org/wiki/GUID_Partition_Table#cite_note-linwin-40 Signed-off-by: Alexey Kardashevskiy --- slof/fs/packages/disk-label.fs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs index 068a1a8..790d433 100644 --- a/slof/fs/packages/disk-label.fs +++ b/slof/fs/packages/disk-label.fs @@ -390,6 +390,12 @@ EBD0A0A2 B9E5 4433 87C068B6B72699C7 GPT-BASIC-DATA-PARTITION uuid! GPT-BASIC-DATA-PARTITION uuid= ; +\ Linux filesystem data 0FC63DAF-8483-4772-8E79-3D69D8477DE4 +CREATE GPT-LINUX-PARTITION 10 allot +0FC63DAF 8483 4772 8E793D69D8477DE4 GPT-LINUX-PARTITION uuid! +: gpt-linux-partition? ( -- true|false ) + block gpt-part-entry>part-type-guid + GPT-LINUX-PARTITION uuid= ; \ @@ -455,7 +461,7 @@ EBD0A0A2 B9E5 4433 87C068B6B72699C7 GPT-BASIC-DATA-PARTITION uuid! 1+ 1 ?DO seek-pos 0 seek drop block gpt-part-size read drop - gpt-basic-data-partition? IF + gpt-basic-data-partition? gpt-linux-partition? or IF debug-disk-label? IF ." GPT BASIC DATA partition found " cr THEN block gpt-part-entry>first-lba x@-le ( first-lba ) dup to part-start ( first-lba ) -- cgit v1.1