search for: align_cylsize

Displaying 10 results from an estimated 10 matches for "align_cylsize".

2015 Feb 20
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...ize = head * sector * 512; frac = isostat.st_size % cylsize; padding = (frac > 0) ? cylsize - frac : 0; isostat.st_size is the ISO image size in bytes. cylsize is the current granularity of 1 cylinder. My proposal has 1, 2, or 4 cylinders instead. cylsize = head * sector * 512; align_cylsize = cylsize * align_factor; frac = isostat.st_size % align_cylsize; padding = (frac > 0) ? align_cylsize - frac : 0; Numbers inserted: cylsize = 255 * 63 * 512 = 8225280 align_cylsize = 8225280 * 4 = 32901120 frac = (1085736960 + 2048) % 32901120 = 2048 padding = 3290112...
2015 Feb 20
4
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...015-02-20 10:43:49.000000000 +0100 +++ isohybrid_test.c 2015-02-20 11:01:33.000000000 +0100 @@ -947,7 +947,7 @@ main(int argc, char *argv[]) int i = 0; FILE *fp = NULL; uint8_t *buf = NULL, *bufz = NULL; - int cylsize = 0, frac = 0; + int cylsize = 0, frac = 0, align_factor, align_cylsize; size_t orig_gpt_size, free_space, gpt_size; struct iso_primary_descriptor descriptor; @@ -1058,9 +1058,20 @@ main(int argc, char *argv[]) isosize = lendian_int(descriptor.size) * lendian_short(descriptor.block_size); free_space = isostat.st_size - isosize; + /* Making su...
2015 Feb 20
0
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
> > Same result as yours. > > > Have a nice day :) > > Thomas > I was under the impression (apparently the wrong one) that your pseudo-code was adding 4 cylinders to the first example, from 132 to 136, which would be non-optimal. Since I am not a developer, I believe you when you say that such jump won't happen :). Perhaps the code will be more clear to me
2015 Feb 20
0
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
> > I wrapped the essential code into a standalone program for > playing with a few numbers: What about '-h 255 -s 63 , ISO size 1085736960' ? > I expect the average waste to be a bit less than 16 MB. Yes, but slightly misleading. For example, the "16MB average" is relevant for 255/63. Some user reading the code might not know the whole reasoning for: >
2015 Feb 20
3
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...ers ----------------------------------------------------------------- Code of isohybrid_test_mockup.c : ----------------------------------------------------------------- #include <stdlib.h> #include <stdio.h> int main(int argc, char **argv) { int cylsize = 0, frac = 0, align_factor, align_cylsize; int padding; unsigned long img_size; int head, sector; sscanf(argv[1], "%d", &head); sscanf(argv[2], "%d", &sector); sscanf(argv[3], "%lu", &img_size); /* Begin of isohybrid.c code */ /* Making sure that the resulting image size is divisible...
2015 Feb 20
0
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
> Hi, > > > Hopefully I am explaining it better this time. > > Our ideas of implementation are supposed to yield the > same result. > Hmm, I am not sure. Or perhaps I am misunderstanding your code. Let me try with an example (or two). For this example, let's assume: -h 255 -s 63 ISO size: 1'085'736'960 bytes ( > 1GiB) This size happens to be a
2015 Feb 19
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
Hi, > Hopefully I am explaining it better this time. Our ideas of implementation are supposed to yield the same result. As said, i am willing to implement my proposal in a copy of isohybrid.c, if somebody wants to test it. Advantages and disadvantages should be obvious. Interested users please send util/isohybrid.c from your local SYSLINUX source code installation to me. Just to be sure
2015 Feb 19
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...t full double cylinder align_factor = 2 else # Pad up to next full quatruple cylinder (nearly 32 MB) align_factor = 4 In isohybrid.c the resulting align_factor would be used like this: - frac = isostat.st_size % cylsize; - padding = (frac > 0) ? cylsize - frac : 0; + align_cylsize = cylsize * align_factor; + frac = isostat.st_size % align_cylsize; + padding = (frac > 0) ? align_cylsize - frac : 0; Similarly in isohybrid.in. There is no risk that the larger padding would exceed 1024 cylinders as long as the unpadded image does not exceed this limit. Nice idea, i mu...
2015 Feb 19
0
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
> Hi, > > Ady wrote: > > I am not so sure that using a different pair of '-h' and '-s' values > > would be better than using 255/63. > > But 255 * 63 is not divisible by 4 and thus can cause > trouble with virtual DVD-ROM. And my suggestion to modify the _amount_ of Cylinders was intended to overcome the "by 4" (or rather, "by
2015 Feb 19
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
Hi, Ady wrote: > I am not so sure that using a different pair of '-h' and '-s' values > would be better than using 255/63. But 255 * 63 is not divisible by 4 and thus can cause trouble with virtual DVD-ROM. > Most BIOS and most partition editors would assume this geometry. I cannot tell for BIOSes, but partition editors have options to set heads-per-cyl and