GPT - GUID Partition Table
Install via npm
$ npm install --save gpt
What can I do with this?
- Format disks / images
- Fix a partition table, recover a deleted partition
- Recover the GUID Partition Table from its backup
- Locate partitions which are inaccessible / ignored by the OS
- Verify the integrity of the primary GPT against its backup
Usage
var GPT = require( 'gpt' )
var gpt = GPT.parse( buffer, options )
var gpt = new GPT({
blockSize: 512,
headerSize: 92,
currentLBA: 1,
backupLBA: 123456,
firstLBA: 34,
lastLBA: 556789,
tableOffset: 2,
entries: 128,
entrySize: 128,
})
var buffer = gpt.toBuffer()
var headerBuffer = gpt.toBuffer( true, false )
var tableBuffer = gpt.toBuffer( false, true )
gpt.verify( backupGPT )