Create partition

This commit is contained in:
Alex Kotov 2022-01-16 21:30:11 +05:00
parent db7a207d64
commit 8d7480748e
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 13 additions and 0 deletions

View File

@ -103,6 +103,19 @@ bool create_mbr_file(
mbr.info.magic = MBR_MAGIC;
mbr.info.disk_id = disk_id;
mbr.info.reserved = 0;
// 00
mbr.info.entries[0].drive_attributes = 0;
// 00 02 00
mbr.info.entries[0].start_chs_address = 0x0200;
// 01
mbr.info.entries[0].partition_type = 1;
// 02 03 00
mbr.info.entries[0].last_chs_address = 0x0302;
// 01 00 00 00
mbr.info.entries[0].start_lba = 0x01;
// 80 00 00 00
mbr.info.entries[0].sectors_count = 0x80;
}
if (bootstrap_filename) {