search for: isostat

Displaying 20 results from an estimated 21 matches for "isostat".

Did you mean: iostat
2014 Jun 22
0
[PATCH 4/6] utils/isohybrid.c: Write GPT backup to the very end of the image
...ils/isohybrid.c b/utils/isohybrid.c index ff6b930..1c8f0b6 100644 --- a/utils/isohybrid.c +++ b/utils/isohybrid.c @@ -1084,7 +1084,7 @@ main(int argc, char *argv[]) * Primary GPT starts at sector 1, secondary GPT starts at 1 sector * before the end of the image */ - initialise_gpt(buf, 1, (isostat.st_size + padding - 1024) / 512, 1); + initialise_gpt(buf, 1, (isostat.st_size + padding - 512) / 512, 1); if (fseek(fp, 512, SEEK_SET)) err(1, "%s: seek error - 6", argv[0]); @@ -1122,7 +1122,7 @@ main(int argc, char *argv[]) buf += orig_gpt_size - sizeof(struct gpt_header)...
2011 Aug 05
3
isolinux: Generate GPT and Mac bootable images
...1..1dcbaa1 100644 --- a/utils/isohybrid.c +++ b/utils/isohybrid.c @@ -36,14 +36,19 @@ #include <unistd.h> #include <sys/stat.h> #include <inttypes.h> +#include <uuid/uuid.h> #include "isohybrid.h" char *prog = NULL; extern int opterr, optind; +struct stat isostat; +unsigned int padding = 0; + +uuid_t disk_uuid, part_uuid, iso_uuid; uint8_t mode = 0; -enum { VERBOSE = 1 }; +enum { VERBOSE = 1 , EFI = 2 , MAC = 4}; /* user options */ uint16_t head = 64; /* 1 <= head <= 256 */ @@ -61,10 +66,150 @@ uint16_t ve[16]; uint32_t catoffset =...
2015 Feb 20
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...ll 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; align_cylsize = cylsize * align_factor; f...
2014 Jun 22
16
Announcing a patch series for isohybrid.c
Hi, following will be 6 patch proposals for isohybrid.c 1: Encode GPT partition names as UTF-16LE 2: Correct blocking factor in APM partition block counts 3: Correct end block address of first GPT partition 4: Write GPT backup to the very end of the image 5: Change all fseek(3) to fseeko(3) 6: Introduce option --mbr and make isohybrid.c compilable standalone If the form needs adjustments,
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
2010 Sep 13
5
isohybrid: seek error - 6: Invalid argument
Hello Recently while playing with bigger iso images (>2G) looks like isohybrid from syslinux-4.02 fails. Sometimes tunning heads/sectors (-h/-s) works, because no padding is needed depending of size of the image. Some debug info provided, if more info is needed please just ask. # isohybrid -v pandereta-2010.09.13-i686.iso catalogue offset: 326 ve[0]: 1, cs: 1 ve[1]: 0, cs: 1 ve[2]: 25927,
2014 Jun 22
0
[PATCH 5/6] utils/isohybrid.c: Change all fseek(3) to fseeko(3)
...display_mbr(buf, i); - if (fseek(fp, 0, SEEK_SET)) + if (fseeko(fp, (off_t) 0, SEEK_SET)) err(1, "%s: seek error - 5", argv[0]); if (fwrite(buf, sizeof(char), i, fp) != (size_t)i) @@ -1086,7 +1086,7 @@ main(int argc, char *argv[]) */ initialise_gpt(buf, 1, (isostat.st_size + padding - 512) / 512, 1); - if (fseek(fp, 512, SEEK_SET)) + if (fseeko(fp, (off_t) 512, SEEK_SET)) err(1, "%s: seek error - 6", argv[0]); if (fwrite(buf, sizeof(char), gpt_size, fp) != (size_t)gpt_size) @@ -1103,7 +1103,7 @@ main(int argc, char *argv[]) initialis...
2015 Feb 20
4
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...ize = 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 sure that the resulting image size is divisible by 2048. + (Can waste nearly 32 MB. Should be done on user request only.) + */ + if ((head * sector) % 4 == 0) + align_factor = 1; + else if ((head * sector) % 2 == 0) + align_factor = 2...
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
2014 Jun 20
3
[PATCH] isohybrid: fix overflow on 32 bit system
...utils/isohybrid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/isohybrid.c b/utils/isohybrid.c index 410bb60..23fc6c0 100644 --- a/utils/isohybrid.c +++ b/utils/isohybrid.c @@ -1126,7 +1126,7 @@ main(int argc, char *argv[]) * end of the image */ - if (fseek(fp, (isostat.st_size + padding) - orig_gpt_size - 512, + if (fseeko(fp, (isostat.st_size + padding) - orig_gpt_size - 512, SEEK_SET)) err(1, "%s: seek error - 8", argv[0]); -- 1.9.1
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
2014 May 12
4
[PATCH] isohybrid: fix overflow on 32 bit system
...e, 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 enough back that the gpt header is 512 bytes before the * end of the image */ + real_offset = (isostat.st_size + padding) - orig_gpt_size - 512; - if (fseek(fp, (isostat.st_size + padding) - orig_gpt_size - 512, - SEEK_SET)) + fseek(fp, 0, SEEK_SET); + while (real_offset > LONG_MAX) { + if (fseek(fp, LONG_MAX, SEEK_CUR)) + err(1, "%s: seek error - 8", argv[0]); + real_offset -=...
2015 Feb 19
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...or = 1 else if (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...
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
2014 Jun 22
0
isohybrid has 2 variants
...offset * 2048, SEEK_SET)) The call has to become something like if (fseeko(fp, ((off_t) catoffset) * 2048, SEEK_SET)) Adresses which are surely smaller than 31 bit could be left unchanged. E.g.: if (fseek(fp, 17 * 2048, SEEK_SET)) Kai Kang's change is already (off_t), because of isostat.st_size as of man 2 stat. Have a nice day :) Thomas
2012 May 06
1
isohybrid.c, problem reports and questions
Hi, i am currently exploring the boot data of Matthew Garret's Fedora LiveCD. For that i read utils/isohybrid.c from git resp. 4.05. (I assume Matthew used options --efi --mac --type 0 .) Some stumblestones showed up: ----------------------------------------------------------------------- In initialise_gpt() i see unhealthy usage of string constants. Like: memcpy(part->name,
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 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
...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 divisible by 2048. An ISO image may have a...
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: