summaryrefslogtreecommitdiff
path: root/src/shared/gpt.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-07 02:35:19 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-07 02:40:24 +0100
commitcbd353ce7787ab11a9aa193f35abb97548b3fcf2 (patch)
treee40e8acea16f120656268367ee82791eab086df1 /src/shared/gpt.h
parentd13394a88334441bf3092cf93804ba0f9c56d8e0 (diff)
udev-builtin-blkid: when we find a GPT partition marked as root disk on the same disk as the ESP, expose a property on the udev device
This is preparation for a logic to automatically discover the root partition to boot from if no partition has been configured explicitly. This makes use of our newly defined GPT type GUIDs for our root disks: #define GPT_ROOT_X86 SD_ID128_MAKE(44,47,95,40,f2,97,41,b2,9a,f7,d1,31,d5,f0,45,8a) #define GPT_ROOT_X86_64 SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f9,84,b7,09) We define differen GUIDs for different architectures to allow images which finde the right root partition for the appropriate arch.
Diffstat (limited to 'src/shared/gpt.h')
-rw-r--r--src/shared/gpt.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/shared/gpt.h b/src/shared/gpt.h
index 2956377b48..e23073e1f9 100644
--- a/src/shared/gpt.h
+++ b/src/shared/gpt.h
@@ -21,8 +21,20 @@
#include "sd-id128.h"
-#define GPT_ESP SD_ID128_MAKE(c1,2a,73,28,f8,1f,11,d2,ba,4b,00,a0,c9,3e,c9,3b)
-#define GPT_ROOT SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f9,84,b7,09)
-#define GPT_SWAP SD_ID128_MAKE(06,57,fd,6d,a4,ab,43,c4,84,e5,09,33,c8,4b,4f,4f)
-#define GPT_HOME SD_ID128_MAKE(93,3a,c7,e1,2e,b4,4f,13,b8,44,0e,14,e2,ae,f9,15)
-#define GPT_SRV SD_ID128_MAKE(3b,8f,84,25,20,e0,4f,3b,90,7f,1a,25,a7,6f,98,e8)
+/* We only support root disk discovery for x86 and x86-64 for now,
+ * since EFI for anything else doesn't really exist, and we only care
+ * for root partitions on the same disk as the EFI ESP. */
+
+#define GPT_ROOT_X86 SD_ID128_MAKE(44,47,95,40,f2,97,41,b2,9a,f7,d1,31,d5,f0,45,8a)
+#define GPT_ROOT_X86_64 SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f9,84,b7,09)
+
+#define GPT_ESP SD_ID128_MAKE(c1,2a,73,28,f8,1f,11,d2,ba,4b,00,a0,c9,3e,c9,3b)
+#define GPT_SWAP SD_ID128_MAKE(06,57,fd,6d,a4,ab,43,c4,84,e5,09,33,c8,4b,4f,4f)
+#define GPT_HOME SD_ID128_MAKE(93,3a,c7,e1,2e,b4,4f,13,b8,44,0e,14,e2,ae,f9,15)
+#define GPT_SRV SD_ID128_MAKE(3b,8f,84,25,20,e0,4f,3b,90,7f,1a,25,a7,6f,98,e8)
+
+#if defined(__x86_64__)
+# define GPT_ROOT_NATIVE GPT_ROOT_X86_64
+#elif defined(__i386__)
+# define GPT_ROOT_NATIVE GPT_ROOT_X86
+#endif