Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The purpose of this assignment is to write a program to extract partition information from a disk image that follows a certain standard. In class,

The purpose of this assignment is to write a program to extract partition information from a disk image that follows a certain standard. In class, we looked at the MBR specification and how it encodes information about disks and partitions. For this assignment you will have to read the documented specification for the GUID Partition Table (GPT) standard (which is slowly replacing the traditional MBR format); use the Wikipedia link (https://en.wikipedia.org/wiki/GUID_Partition_Table) since it contains all the information needed to complete this assignment.

Description Write a C/C++ program called GPTInfo that reads an acquired disk image file to perform the following

tasks.

1) Verify that the GPT signature is present; if not present, your program should display an error message and exit.

2) Print the disk GUID in hex notation.

3) LBA addresses for the following: a) first usable LBA for user partitions b) last usable LBA for user partitions c) starting LBA where partition entries begin

4) Number of partition entries.

5) Size of each partition entry. Then for each partition, it should print the following information.

6) The partition type GUID (make sure you print it in the proper XXXXXXXX-XXXX-XXXX-XXXX- XXXXXXXXXXXX format). You may want to check your printed result with the GUIDs listed in the Wikipedia link; it should match one of them.

7) First and last LBA addresses of the partition. 8) Attribute flags in hex notation. 9) The name of the partition.

Unless otherwise specified, all numeric values should be printed in the decimal format followed by hex notation. Make sure there is proper byte-level padding when printing hex values. E.g. the decimal number 10 should be printed as 10 (0x0A) and decimal number 320 should be printed as 320 (0x0140). When reading the specification, pay attention to how values are stored (its usually little endian unless stated).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions