Displaying 9 results from an estimated 9 matches for "gpt_pt_entry_size".
2019 Feb 19
0
[PATCH nbdkit 1/4] common: Move some GPT functionality to a common directory.
...EFI standard (assuming 512 byte sector size).
+ *
+ * In plugins such as the partitioning plugin, if we are requested to
+ * allocate more than GPT_MIN_PARTITIONS then we increase the
+ * partition table in chunks of this size. Note that clients may not
+ * support > GPT_MIN_PARTITIONS.
+ *
+ * GPT_PT_ENTRY_SIZE is the minimum specified by the UEFI spec, but
+ * increasing it is not useful.
+ */
+#define GPT_MIN_PARTITIONS 128
+#define GPT_PT_ENTRY_SIZE 128
+
+#endif /* NBDKIT_GPT_H */
diff --git a/configure.ac b/configure.ac
index a0f45e8..bca6134 100644
--- a/configure.ac
+++ b/configure.ac
@@ -833,6 +83...
2018 Sep 17
0
[PATCH nbdkit v3 3/3] Add partitioning plugin.
...s;
+
+#define SECTOR_SIZE UINT64_C(512)
+
+/* Maximum size of MBR disks. This is an approximation based on the
+ * known limit (2^32 sectors) and an estimate based on the amount of
+ * padding between partitions.
+ */
+#define MAX_MBR_DISK_SIZE (UINT32_MAX * SECTOR_SIZE - 5 * ALIGNMENT)
+
+#define GPT_PT_ENTRY_SIZE 128
+
+/* XXX Make these configurable in future? */
+#define ALIGNMENT (2048 * SECTOR_SIZE)
+#define PARTITION_ID 0x83
+#define PARTITION_GUID "\xaf\x3d\xc6\x0f\x83\x84\x72\x47\x8e\x79\x3d\x69\xd8\x47\x7d\xe4"
+
+/* Files supplied on the command line. */
+struct file {
+ const char *file...
2019 Feb 22
5
[PATCH nbdkit v3 0/4] Add linuxdisk plugin.
For v3 I reimplemented this using mke2fs -d. This obviously makes the
implementation a whole lot simpler, but cannot support multiple
directory merging.
Patches 1-3 are the same as before. I've also reproduced the notes
from v2 below.
v2:
- Fix inconsistent tab/space.
- All 3 plugins now contain a block of text pointing to the
other 2 plugins.
- TMDIR -> TMPDIR
- Unlink the
2018 Sep 17
4
[PATCH nbdkit 0/3] Add partitioning plugin.
nbdkit partitioning boot.img swap.img root.img
... creates a virtual disk by adding a partition table.
In ancient times Xen used to do this.
Rich.
2019 Feb 19
6
[PATCH nbdkit v2 0/5] Add linuxdisk plugin.
Another interesting thing you can do with this plugin:
https://rwmj.wordpress.com/2019/02/19/nbdkit-linuxdisk-plugin/
v2:
- Fix inconsistent tab/space.
- All 3 plugins now contain a block of text pointing to the
other 2 plugins.
- TMDIR -> TMPDIR
- Unlink the temporary file and other cleanups along error paths.
- fclose -> pclose, and check the return value for errors.
-
2018 Sep 17
7
[PATCH nbdkit v3 0/3] Add partitioning plugin.
The partitioning plugin patch is the same (except for rebasing).
However I have changed the first two patches based on feedback
received. In particular this fixes a very serious bug found by Eric
Blake in the current truncate filter.
Rich.
2019 Feb 19
7
[PATCH nbdkit 0/4] New plugin: Add linuxdisk plugin.
Turns out Japanese trains are good for coding!
In supermin we have a bunch of code to create the libguestfs
appliance. It creates it directly using libext2fs (part of
e2fsprogs). We can use the same technique to create ext2 virtual
disks in nbdkit, which is what this new plugin does. Why a new plugin
instead of modifying the floppy plugin? See the 4/4 commit message
for an explanation.
The
2019 Feb 22
0
[PATCH nbdkit v3 4/4] Add linuxdisk plugin.
...;last_usable_lba = htole64 (nr_lbas - 34);
+ if (is_primary)
+ header->partition_entries_lba = htole64 (2);
+ else
+ header->partition_entries_lba = htole64 (nr_lbas - 33);
+ header->nr_partition_entries = htole32 (GPT_MIN_PARTITIONS);
+ header->size_partition_entry = htole32 (GPT_PT_ENTRY_SIZE);
+ header->crc_partitions =
+ htole32 (efi_crc32 (pt, GPT_PT_ENTRY_SIZE * GPT_MIN_PARTITIONS));
+
+ /* Must be computed last. */
+ header->crc = htole32 (efi_crc32 (header, sizeof *header));
+}
+
+static void
+create_gpt_partition_table_entry (const struct region *region,
+...
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...;last_usable_lba = htole64 (nr_lbas - 34);
+ if (is_primary)
+ header->partition_entries_lba = htole64 (2);
+ else
+ header->partition_entries_lba = htole64 (nr_lbas - 33);
+ header->nr_partition_entries = htole32 (GPT_MIN_PARTITIONS);
+ header->size_partition_entry = htole32 (GPT_PT_ENTRY_SIZE);
+ header->crc_partitions =
+ htole32 (efi_crc32 (pt, GPT_PT_ENTRY_SIZE * GPT_MIN_PARTITIONS));
+
+ /* Must be computed last. */
+ header->crc = htole32 (efi_crc32 (header, sizeof *header));
+}
+
+static void
+create_gpt_partition_table_entry (const struct region *region,
+...