search for: cylsiz

Displaying 19 results from an estimated 19 matches for "cylsiz".

Did you mean: cylsize
2009 Apr 24
1
[PATCH 1/2] Support iso images over 2GB in isohybrid
...nged, 1 insertions(+), 2 deletions(-) diff --git a/utils/isohybrid.in b/utils/isohybrid.in index 4671036..e98c59f 100644 --- a/utils/isohybrid.in +++ b/utils/isohybrid.in @@ -17,7 +17,6 @@ # use bytes; -use integer; use Fcntl; # Use this fake geometry (zipdrive-style...) @@ -92,7 +91,7 @@ $cylsize = $h*$s*512; $frac = $imgsize % $cylsize; $padding = ($frac > 0) ? $cylsize - $frac : 0; $imgsize += $padding; -$c = $imgsize/$cylsize; +$c = int($imgsize/$cylsize); if ($c > 1024) { print STDERR "Warning: more than 1024 cylinders ($c).\n"; print STDERR "Not all...
2015 Feb 20
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...es". My proposal: Granularity is still 4 cylinders. Image size is 132.0002489884843 cylinders. So the target size is the next multiple of 4: 136 cylinders. Your algorithm is more complicated than mine, because it tries to do the part of the job which is already implemented in isohybrid: cylsize = 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; al...
2015 Feb 20
4
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...-------------------------------------------------- --- isohybrid.c 2015-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.b...
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 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 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
2011 Aug 05
3
isolinux: Generate GPT and Mac bootable images
...->data_start = bendian_int(0); + part->data_count = bendian_int(efi_lba - start/2048 - 10); + part->status = bendian_int(0x01); + } +} + int main(int argc, char *argv[]) { int i = 0; FILE *fp = NULL; - struct stat isostat; uint8_t *buf = NULL, *bufz = NULL; - int cylsize = 0, frac = 0, padding = 0; + int cylsize = 0, frac = 0; + size_t orig_gpt_size, free_space, gpt_size; + struct iso_primary_descriptor descriptor; prog = strcpy(alloca(strlen(argv[0]) + 1), argv[0]); i = check_option(argc, argv); @@ -450,10 +855,21 @@ main(int argc, char *argv...
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
...ng= 0 , image size= 132.000000 cylinders ----------------------------------------------------------------- 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...
2014 Jun 21
1
isohybrid has 2 variants
Op 2014-06-20 om 15:56 schreef Ady: > > The Perl variant, isohybrid.in, seems to be getting left behind > regarding several patches. I don't recall whether there is at least > some mention in the isohybrid docs about the existence of 2 variants > included in Syslinux (and that is in addition to other isohybrid > methods outside Syslinux). Is there any reference? >
2015 Feb 18
0
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...inders would be a multiple of 2048, we would achieve #1 and #2 (and then #3), but not always #4. One possibility to help with #4 would be to loop the expected calculations of cylinders and resulting image size (please avoid reading the following as real code or calculations; it is not): "cylsize = head * sector * 512*1" ... ; evaluate the expected resulting size (multiple of 2048 bytes, and complete cylinders for the partition) ; "cylsize = head * sector * 512*2" ... ; evaluate the expected resulting size (multiple of 2048 bytes, and complete cylinders for the partitio...
2015 Feb 17
0
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
> Hi, > > at [Tails] we're in the process of shipping hybrid ISO images by > default again. We're using `isohybrid -h 255 -s 63' to do that (thanks > to the advice we got on this mailing-list a few months ago!). > > And then, we've discovered that sometimes, isohybrid produces ISO > images whose size is not a multiple of 2048 bytes. > > Who cares?
2015 Feb 17
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...t; images whose size is not a multiple of 2048 bytes. Seems to be intentional. http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/utils/isohybrid.in # Target image size: round up to a multiple of $h*$s*512 http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/utils/isohybrid.c cylsize = head * sector * 512; frac = isostat.st_size % cylsize; padding = (frac > 0) ? cylsize - frac : 0; With -h 255 -s 63, both pad to an integer number of cylinders with an impair multiple of 512 bytes. So if the number of cylinders is not divisible by 4, then the number of bytes is not d...
2015 Feb 17
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
Hi, at [Tails] we're in the process of shipping hybrid ISO images by default again. We're using `isohybrid -h 255 -s 63' to do that (thanks to the advice we got on this mailing-list a few months ago!). And then, we've discovered that sometimes, isohybrid produces ISO images whose size is not a multiple of 2048 bytes. Who cares? ... may you ask. Well, apparently, VirtualBox does:
2015 Feb 19
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...Heads * Sectors_per_track) is divisible by 2 # Pad up to next 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...
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
2015 Feb 18
5
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
Hi, Ady wrote: > Let's not forget that the goal usually is to select CHS values so that > the resulting (optical and/or other) media would boot correctly in as > many systems as possible Agreed. But we now have a report about failure of 255x63 on a popular pseudo-hardware, when the ISO is presented as DVD-ROM. (Probably there is no complaint when it gets presented as hard disk.)
2014 May 12
4
[PATCH] isohybrid: fix overflow on 32 bit system
...dlib.h> #include <string.h> #include <unistd.h> +#include <limits.h> #include <sys/stat.h> #include <inttypes.h> #include <uuid/uuid.h> @@ -888,7 +889,7 @@ main(int argc, char *argv[]) FILE *fp = NULL; uint8_t *buf = NULL, *bufz = NULL; int cylsize = 0, frac = 0; - size_t orig_gpt_size, free_space, gpt_size; + size_t orig_gpt_size, free_space, gpt_size, real_offset; struct iso_primary_descriptor descriptor; prog = strcpy(alloca(strlen(argv[0]) + 1), argv[0]); @@ -1125,9 +1126,16 @@ main(int argc, char *argv[]) * Seek far...