search for: mbrsize

Displaying 9 results from an estimated 9 matches for "mbrsize".

2014 Jun 24
2
[syslinux:master] isohybrid: Function to write UTF-16LE strings
...> index 0011b78..e308a82 100644 > --- a/utils/isohybrid.c > +++ b/utils/isohybrid.c > @@ -593,7 +593,7 @@ read_mbr_template(char *path, uint8_t *mbr) > err(1, "could not open MBR template file `%s'", path); > clearerr(fp); > ret = fread(mbr, 1, MBRSIZE, fp); > - if (ferror(fp)) > + if (ferror(fp) || ret != MBRSIZE) > err(1, "error while reading MBR template file `%s'", path); > fclose(fp); > } Shouldn't that be in a separate commit? > @@ -786,6 +786,21 @@ reverse_uuid(uuid_t uuid) >...
2016 Dec 29
3
isohybrid boot from logical partition
Hi, Duncan Elliot wrote: > As far as I can see, this essentially trims off the first 3 bytes of the > custom isohybrid MBR image before applying it to the ISO. You probably mean this line: memcpy(mbr, &isohdpfx[hd0 + 3 * partok], MBRSIZE); The indize do not apply to bytes but to byte arrays of size MBRSIZE. extern unsigned char isohdpfx[][MBRSIZE]; (hd0 + 3 * partok) selects a particular MBR template from an array of six MBRs. See also http://www.syslinux.org/wiki/index.php?title=Isohybrid#MBR_selection It tells which iso...
2016 Dec 29
0
isohybrid boot from logical partition
...; wrote: > Hi, > > Duncan Elliot wrote: >> As far as I can see, this essentially trims off the first 3 bytes of the >> custom isohybrid MBR image before applying it to the ISO. > > You probably mean this line: > > memcpy(mbr, &isohdpfx[hd0 + 3 * partok], MBRSIZE); > > The indize do not apply to bytes but to byte arrays of size MBRSIZE. > > extern unsigned char isohdpfx[][MBRSIZE]; > > (hd0 + 3 * partok) selects a particular MBR template from an array of > six MBRs. See also > http://www.syslinux.org/wiki/index.php?title=Isohyb...
2016 Dec 28
3
isohybrid boot from logical partition
Hi, I have been attempting to set up a multi-boot USB stick (i.e. multiple bootable ISO images on the one stick) I have had good success by: - processing ISO with isohybrid (with "partok" flag) - dd'ing ISO to primary partitions on the USB stick (e.g /dev/sdc2, /dev/sdc3, /dev/sdc4) - installing grub to USB stick and configuring to chainload to these partitions To remove the limit
2014 Jun 24
0
[syslinux:master] isohybrid: Function to write UTF-16LE strings
...8a82 100644 >> --- a/utils/isohybrid.c >> +++ b/utils/isohybrid.c >> @@ -593,7 +593,7 @@ read_mbr_template(char *path, uint8_t *mbr) >> err(1, "could not open MBR template file `%s'", path); >> clearerr(fp); >> ret = fread(mbr, 1, MBRSIZE, fp); >> - if (ferror(fp)) >> + if (ferror(fp) || ret != MBRSIZE) >> err(1, "error while reading MBR template file `%s'", path); >> fclose(fp); >> } > > Shouldn't that be in a separate commit? > Yes, it really should h...
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,
2011 Aug 05
3
isolinux: Generate GPT and Mac bootable images
..._t *mbr) { int i = 0; - uint32_t psize = 0, tmp = 0; + uint32_t tmp = 0; uint8_t ptype = 0, *rbm = mbr; uint8_t bhead = 0, bsect = 0, bcyle = 0; uint8_t ehead = 0, esect = 0, ecyle = 0; @@ -340,6 +576,11 @@ initialise_mbr(uint8_t *mbr) extern unsigned char isohdpfx[][MBRSIZE]; memcpy(mbr, &isohdpfx[hd0 + 3 * partok], MBRSIZE); + + if (mode & MAC) { + memcpy(mbr, afp_header, sizeof(afp_header)); + } + mbr += MBRSIZE; /* offset 432 */ tmp = lendian_int(de_lba * 4); @@ -401,7 +642,6 @@ initialise_mbr(uint8_t...
2012 Feb 15
2
[PATCH] isohybrid: Generate MBR even when in EFI mode
...rrx(1, "setting an entry is unsupported with EFI or Mac"); break; case 'v': @@ -581,6 +587,12 @@ initialise_mbr(uint8_t *mbr) memcpy(mbr, afp_header, sizeof(afp_header)); } + if (!entry) + entry = 1; + + if (mode & EFI) + type = 0; + mbr += MBRSIZE; /* offset 432 */ tmp = lendian_int(de_lba * 4); @@ -633,6 +645,40 @@ initialise_mbr(uint8_t *mbr) tmp = lendian_int(psize); memcpy(&mbr[12], &tmp, sizeof(tmp)); } + if (i == 2 && (mode & EFI)) +...
2011 Jun 11
1
isohybrid.c patch: to support hex parameters
...optarg); ???????????? break; ? diff --git a/utils/isohybrid.h b/utils/isohybrid.h index 826e90c..eecf1ca 100644 --- a/utils/isohybrid.h +++ b/utils/isohybrid.h @@ -20,7 +20,7 @@ ? * ? */ ? -#define VERSION???? "0.11" +#define VERSION???? "0.12" ?#define BUFSIZE???? 2048 ?#define MBRSIZE????? 432 === Thank you. --- Regards ?? -Prasad PS: Please don't send me html/attachment/Fwd mails -------------- next part -------------- A non-text attachment was scrubbed... Name: isohybrid-hex-option-parsing.patch Type: application/octet-stream Size: 2248 bytes Desc: not available URL...