search for: gpt_header

Displaying 17 results from an estimated 17 matches for "gpt_header".

Did you mean: get_header
2011 Aug 05
3
isolinux: Generate GPT and Mac bootable images
...03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, + 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, + 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D +}; + +struct iso_primary_descriptor { + uint8_t ignore [80]; + uint32_t size; + uint8_t ignore2 [44]; + uint16_t block_size; +}; + +struct gpt_header { + uint64_t signature; + uint32_t revision; + uint32_t headerSize; + uint32_t headerCRC; + uint32_t reserved; + uint64_t currentLBA; + uint64_t backupLBA; + uint64_t firstUsableLBA; + uint64_t lastUsableLBA; + uuid_t diskGUID; + uint64_t partitionEntriesLBA; + u...
2019 Feb 19
0
[PATCH nbdkit 1/4] common: Move some GPT functionality to a common directory.
...USED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef NBDKIT_GPT_H +#define NBDKIT_GPT_H + +struct gpt_header { + char signature[8]; + char revision[4]; + uint32_t header_size; + uint32_t crc; + uint32_t reserved; + uint64_t current_lba; + uint64_t backup_lba; + uint64_t first_usable_lba; + uint64_t last_usable_lba; + char guid[16]; + uint64_t partition_entries_lba; + uint32_t nr_partition_entr...
2019 Jan 20
5
[PATCH nbdkit 0/4] partition: Support MBR logical partitions.
This implements support for MBR logical partitions in nbdkit-partition-filter, complementing existing support in the partitioning plugin. Rich.
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
2014 Jun 22
0
[PATCH 4/6] utils/isohybrid.c: Write GPT backup to the very end of the image
...1, (isostat.st_size + padding - 1024) / 512, 1); + initialise_gpt(buf, 1, (isostat.st_size + padding - 512) / 512, 1); if (fseek(fp, 512, SEEK_SET)) err(1, "%s: seek error - 6", argv[0]); @@ -1122,7 +1122,7 @@ main(int argc, char *argv[]) buf += orig_gpt_size - sizeof(struct gpt_header); - initialise_gpt(buf, (isostat.st_size + padding - 1024) / 512, 1, 0); + initialise_gpt(buf, (isostat.st_size + padding - 512) / 512, 1, 0); /* Shift back far enough to write the 128 GPT entries */ buf -= 128 * sizeof(struct gpt_part_header); @@ -1132,7 +1132,7 @@ main(int argc, char *arg...
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. -
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
2020 Apr 15
0
[PATCH nbdkit 4/9] common/regions: Use new vector type to store the list of regions.
...ns/partitioning/partition-gpt.c b/plugins/partitioning/partition-gpt.c index 75b4643a..b2843414 100644 --- a/plugins/partitioning/partition-gpt.c +++ b/plugins/partitioning/partition-gpt.c @@ -88,7 +88,7 @@ create_gpt_partition_header (const void *pt, bool is_primary, uint64_t nr_lbas; struct gpt_header *header = (struct gpt_header *) out; - nr_lbas = virtual_size (&regions) / SECTOR_SIZE; + nr_lbas = virtual_size (&the_regions) / SECTOR_SIZE; memset (header, 0, sizeof *header); memcpy (header->signature, GPT_SIGNATURE, sizeof (header->signature)); @@ -122,8 +122,8 @@ cre...
2014 Jun 22
16
Announcing a patch series for isohybrid.c
Hi, following will be 6 patch proposals for isohybrid.c 1: Encode GPT partition names as UTF-16LE 2: Correct blocking factor in APM partition block counts 3: Correct end block address of first GPT partition 4: Write GPT backup to the very end of the image 5: Change all fseek(3) to fseeko(3) 6: Introduce option --mbr and make isohybrid.c compilable standalone If the form needs adjustments,
2018 Sep 17
0
[PATCH nbdkit v3 3/3] Add partitioning plugin.
...2 = htole32 (start_sector); + memcpy (&out[8], &u32, 4); + u32 = htole32 (nr_sectors); + memcpy (&out[12], &u32, 4); +} + +static void +create_gpt_partition_header (const void *pt, int is_primary, + unsigned char *out) +{ + uint64_t nr_lbas; + struct gpt_header { + char signature[8]; + char revision[4]; + uint32_t header_size; + uint32_t crc; + uint32_t reserved; + uint64_t current_lba; + uint64_t backup_lba; + uint64_t first_usable_lba; + uint64_t last_usable_lba; + char guid[16]; + uint64_t partition_entries_lba; + ui...
2019 Feb 22
0
[PATCH nbdkit v3 4/4] Add linuxdisk plugin.
...+ + /* Boot sector signature. */ + out[0x1fe] = 0x55; + out[0x1ff] = 0xaa; +} + +static void +create_gpt_partition_header (struct virtual_disk *disk, + const void *pt, bool is_primary, + unsigned char *out) +{ + uint64_t nr_lbas; + struct gpt_header *header = (struct gpt_header *) out; + + nr_lbas = virtual_size (&disk->regions) / SECTOR_SIZE; + + memset (header, 0, sizeof *header); + memcpy (header->signature, GPT_SIGNATURE, sizeof (header->signature)); + memcpy (header->revision, GPT_REVISION, sizeof (header->revision)...
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.
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
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...+ + /* Boot sector signature. */ + out[0x1fe] = 0x55; + out[0x1ff] = 0xaa; +} + +static void +create_gpt_partition_header (struct virtual_disk *disk, + const void *pt, bool is_primary, + unsigned char *out) +{ + uint64_t nr_lbas; + struct gpt_header *header = (struct gpt_header *) out; + + nr_lbas = virtual_size (&disk->regions) / SECTOR_SIZE; + + memset (header, 0, sizeof *header); + memcpy (header->signature, GPT_SIGNATURE, sizeof (header->signature)); + memcpy (header->revision, GPT_REVISION, sizeof (header->revision)...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated! The basic purpose of the patch series is to set $nbdkit_stdio_safe to "0" or "1" in sh and eval plugin scripts. To do that, I ended up adding a nicer way to manipulate environ lists, and to do that, I ended up adding a whole generic vector implementation which is applicable in a lot of different places.
2018 Jan 19
9
[PATCH nbdkit filters-v3 0/7] Introduce filters.
This is still tentative and needs a lot of work, but: - partition filter works, supporting MBR & GPT - prepare and finalize methods fixed - open method can now be changed (allowing readonly flag to be modified) - thread_model can be limited I believe I made most of the changes which were previously suggested in email. I think the only one I didn't was preventing inclusion of both
2018 Mar 08
19
[nbdkit PATCH v3 00/15] Add FUA support to nbdkit
After more than a month since v2 [1], I've finally got my FUA support series polished. This is all of my outstanding patches, even though some of them were originally posted in separate threads from the original FUA post [2], [3] [1] https://www.redhat.com/archives/libguestfs/2018-January/msg00113.html [2] https://www.redhat.com/archives/libguestfs/2018-January/msg00219.html [3]