[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable
From: |
Thomas Schmitt |
Subject: |
Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable |
Date: |
Mon, 27 Feb 2017 13:37:11 +0100 |
Hi,
it turned out that the cripling of the 0x00 partition by --mbr-force-bootable
and the lack of boot flag without that option have the same cause.
The program part which sets the boot flag considers a partition of
type 0x00 as empty.
I now added the constraint that also the block count must be 0 in
order not to attribute the boot flag to partiton 1 by default.
This also keeps --mbr-force-bootable from touching that partition.
I will have to investigate which other program parts consider 0x00
to be unused and how to properly determine whether a partition slot
is indeed unused.
If you are interested in testing the preliminary fix:
=======================================================================
--- libisofs/system_area.c 2017-02-27 09:01:09 +0000
+++ libisofs/system_area.c 2017-02-27 12:24:50 +0000
@@ -1799,7 +1799,7 @@
int ret, int_img_blocks, sa_type, i, will_append = 0, do_isohybrid = 0;
int first_partition = 1, last_partition = 4, apm_flag, part_type = 0;
int gpt_count = 0, gpt_idx[128], apm_count = 0, no_boot_mbr = 0;
- int offset_flag = 0, risk_of_ee = 0;
+ int offset_flag = 0, risk_of_ee = 0, slot_unused, j;
uint32_t img_blocks, gpt_blocks, mbrp1_blocks, pml_blocks;
uint64_t blk;
uint8_t *wpt;
@@ -2125,7 +2125,15 @@
break;
if (i >= 4) { /* no bootable/active flag set yet */
for (i = 0; i < 4; i++) {
- if (buf[446 + 16 * i + 4] != 0x00 &&
+ slot_unused = 0;
+ if (buf[446 + 16 * i + 4] == 0x00) {
+ for (j= 0; j < 4; j++)
+ if (buf[446 + 16 * i + 12 + j] != 0x00)
+ break;
+ if (j >= 4)
+ slot_unused = 1;
+ slot_unused = 1;
+ }
+ if ((!slot_unused) &&
buf[446 + 16 * i + 4] != 0xee &&
buf[446 + 16 * i + 4] != 0xef) {
buf[446 + 16 * i] |= 0x80;
=======================================================================
Have a nice day :)
Thomas
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, (continued)
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Carlo Caione, 2017/02/21
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Carlo Caione, 2017/02/24
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Thomas Schmitt, 2017/02/24
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Carlo Caione, 2017/02/26
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Carlo Caione, 2017/02/26
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Thomas Schmitt, 2017/02/26
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Thomas Schmitt, 2017/02/27
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Carlo Caione, 2017/02/27
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Thomas Schmitt, 2017/02/27
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable,
Thomas Schmitt <=
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Thomas Schmitt, 2017/02/27
- Re: [Bug-xorriso] Acer Aspire V5-121 doesn't see USB ISO as bootable, Carlo Caione, 2017/02/27