1
0
Fork 0
mirror of https://github.com/tailix/loadwarka.git synced 2024-11-03 04:33:26 -05:00

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

View file

@ -103,6 +103,19 @@ bool create_mbr_file(
mbr.info.magic = MBR_MAGIC; mbr.info.magic = MBR_MAGIC;
mbr.info.disk_id = disk_id; mbr.info.disk_id = disk_id;
mbr.info.reserved = 0; 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) { if (bootstrap_filename) {