mirror of
https://github.com/tailix/loadwarka.git
synced 2024-11-03 04:33:26 -05:00
Create partition
This commit is contained in:
parent
db7a207d64
commit
8d7480748e
1 changed files with 13 additions and 0 deletions
13
src/main.c
13
src/main.c
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue