search for: patch_file_and_bootblock

Displaying 17 results from an estimated 17 matches for "patch_file_and_bootblock".

2012 Aug 02
0
[PATCH 1/3] ALPHA: make sector size dynamic in extlinux
...->start = (unsigned int)li.lo_offset >> SECTOR_SHIFT; + geo->start = (unsigned int)li.lo_offset / sector_size; else if (!sysfs_get_offset(devfd, &geo->start)) { - /* OK */ + geo->start /= (sector_size / SECTOR_SIZE); } return rv; @@ -220,6 +232,7 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) struct fat_boot_sector *sbs; char *dirpath, *subpath, *xdirpath; int rv; + unsigned sector_size; dirpath = realpath(dir, NULL); if (!dirpath || stat(dir, &dirst)) { @@ -262,7 +275,8 @@ static int patch_file_and_bootblock(int fd,...
2012 May 23
3
installing extlinux on image files
Hi, is there any way to install extlinux on a _not_ mounted ext4 image? I can easily write the extlinux.sys manually to a fixed inode, and prepend a prebuild mbr, but is there anything else i am missing? patch_file_and_bootblock does a couple of magic things, that are beyond me. The devices are simple images that run in virtualbox, so do i really need all of the blocksize magic? thanks.
2012 Sep 10
19
Initial support for sector size >512
This set of patches add some support for sector size >512. Currently it fixes extlinux, MBR for GPT and ext partitions. Other code is unaffected. This set of patches has been tested on a read Dell machine running a beta firmware.
2010 May 30
1
Why does the extlinux installer rewrite the first sector of extlinux.sys?
Hi, I don't get the point of the write-patch-rewrite sequence. Why is it done this way? I mean, why patch the first sector if you rewrite it anyway? Or why rewrite it, if you don't patch it? (I didn't check whether patch_file_and_bootblock touches the first sector or not.) -- Thanks, Feri.
2012 Aug 02
0
[PATCH 2/3] ALPHA: first try to fix adv problem
...o.ziglio at citrix.com> --- extlinux/main.c | 40 +++++++++++++++++++++++++++++++++++----- 1 files changed, 35 insertions(+), 5 deletions(-) diff --git a/extlinux/main.c b/extlinux/main.c index e40b4d7..61eaad1 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -275,7 +275,8 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) dprintf("subpath = %s\n", subpath); totalbytes = get_size(devfd); - sector_size = get_sector_size(devfd); + /* FIXME support greater sector sizes for BTRFS */ + sector_size = fs_type == BTRFS ? SECTOR_SIZE : get_sector_size(devfd);...
2015 Nov 13
4
[PATCH] extlinux: code cleanup and simplification
...hoo.fr> --- extlinux/main.c | 113 +++++++++++++++++++++++++++----------------------------- 1 file changed, 55 insertions(+), 58 deletions(-) diff --git a/extlinux/main.c b/extlinux/main.c index 6871fb1..a2a396a 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -338,6 +338,59 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) return rv; } +static int ext_read_adv_offset(int devfd, off_t offset) +{ + const size_t adv_size = 2 * ADV_SIZE; + + if (xpread(devfd, syslinux_adv, adv_size, offset) != adv_size) + return -1; + + return syslinux_validate_adv(syslinux_adv) ?...
2015 Nov 18
0
[PATCH] extlinux: code cleanup and simplification
...gt; +++++++++++++++++++++++++++----------------------------- > 1 file changed, 55 insertions(+), 58 deletions(-) > > diff --git a/extlinux/main.c b/extlinux/main.c > index 6871fb1..a2a396a 100644 > --- a/extlinux/main.c > +++ b/extlinux/main.c > @@ -338,6 +338,59 @@ static int patch_file_and_bootblock(int fd, const char > *dir, int devfd) > return rv; > } > > +static int ext_read_adv_offset(int devfd, off_t offset) > +{ > + const size_t adv_size = 2 * ADV_SIZE; > + > + if (xpread(devfd, syslinux_adv, adv_size, offset) != adv_size) > + return -1; &gt...
2015 Nov 26
0
[syslinux:master] extlinux: code cleanup and simplification
...r.com> --- extlinux/main.c | 113 +++++++++++++++++++++++++++----------------------------- 1 file changed, 55 insertions(+), 58 deletions(-) diff --git a/extlinux/main.c b/extlinux/main.c index a715963..a7ebd49 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -338,6 +338,59 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) return rv; } +static int ext_read_adv_offset(int devfd, off_t offset) +{ + const size_t adv_size = 2 * ADV_SIZE; + + if (xpread(devfd, syslinux_adv, adv_size, offset) != adv_size) + return -1; + + return syslinux_validate_adv(syslinux_adv) ?...
2015 Nov 18
1
[PATCH] extlinux: code cleanup and simplification
...gt; +++++++++++++++++++++++++++----------------------------- >? 1 file changed, 55 insertions(+), 58 deletions(-) > > diff --git a/extlinux/main.c b/extlinux/main.c > index 6871fb1..a2a396a 100644 > --- a/extlinux/main.c > +++ b/extlinux/main.c > @@ -338,6 +338,59 @@ static int patch_file_and_bootblock(int fd, const char > *dir, int devfd) >? ? ? return rv; >? } > > +static int ext_read_adv_offset(int devfd, off_t offset) > +{ > +? ? const size_t adv_size = 2 * ADV_SIZE; > + > +? ? if (xpread(devfd, syslinux_adv, adv_size, offset) != adv_size) > +? ? ? return -1; &gt...
2014 Dec 24
14
[PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem
Hello syslinux, Merry Christmas! These patches will make extlinux work with umounted ext2/3/4 filesystem, for example: $ extlinux -i /dev/sdXN or $ extlinux -i file_block Also it can work with something like: $ extlinux /dev/sdXN --reset-adv or $ extlinux file_block --reset-adv We don't use a new option (I planed to use "-d" but it is already in use), it will check whether the
2015 Nov 13
4
[PATCH 1/4] extlinux: simplification
...il: free(file); free(oldfile); - free(c32file); return 1; } @@ -655,9 +674,6 @@ bail: since the cow feature of btrfs will move the ldlinux.sys every where */ int btrfs_install_file(const char *path, int devfd, struct stat *rst) { - char *file; - int fd, rv; - patch_file_and_bootblock(-1, path, devfd); if (xpwrite(devfd, (const char _force *)boot_image, boot_image_len, BTRFS_EXTLINUX_OFFSET) @@ -680,32 +696,7 @@ int btrfs_install_file(const char *path, int devfd, struct stat *rst) * it doesn't need to be within the first 64K. The Syslinux core * has enoug...
2015 Jan 02
13
[PATCH 0/9] linux/syslinux: support ext2/3/4 device
Hello, Happy New Year! These patches make syslinux/linux support ext2/3/4, and it doesn't require the root privilege, I'd like to add a separate e2fs/syslinux, if that is more appropriate, it should be easy to do that. I put these patches on github so that you can easily get them in case you'd like to test them. (The repo's name is sys_tmp, which avoids confusing others, I will
2013 Jul 22
1
[PATCH 1/1 v2] Add UFS1/2 support to Extlinux installer.
...t 64K blank area is used to store boot sector + * and boot image, the boot sector is from 0~512, the boot image starts after + */ #define BTRFS_BOOTSECT_AREA 65536 #define BTRFS_EXTLINUX_OFFSET SECTOR_SIZE #define BTRFS_SUBVOL_MAX 256 /* By btrfs specification */ @@ -308,12 +312,12 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) nsect += 2; /* Two sectors for the ADV */ sectp = alloca(sizeof(sector_t) * nsect); if (fs_type == EXT2 || fs_type == VFAT || fs_type == NTFS || - fs_type == XFS) { + fs_type == XFS || fs_type == UFS1) { if (sectmap(fd, sectp, nsect)) { perr...
2013 Jul 12
2
[PATCH 001/001] Add UFS1/2 support to Extlinux installer.
...t 64K blank area is used to store boot sector + * and boot image, the boot sector is from 0~512, the boot image starts after + */ #define BTRFS_BOOTSECT_AREA 65536 #define BTRFS_EXTLINUX_OFFSET SECTOR_SIZE #define BTRFS_SUBVOL_MAX 256 /* By btrfs specification */ @@ -308,12 +312,12 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) nsect += 2; /* Two sectors for the ADV */ sectp = alloca(sizeof(sector_t) * nsect); if (fs_type == EXT2 || fs_type == VFAT || fs_type == NTFS || - fs_type == XFS) { + fs_type == XFS || fs_type == UFS1) { if (sectmap(fd, sectp, nsect)) { perr...
2014 May 29
3
[PATCH 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Wrote the documentation below. I think it would be good to push the doc to the wiki as soon as the UFS support gets merged. Unix Fast File System (UFS/FFS) 1/2 on Syslinux - (usage/install) ----- There is a confusion about the name of this file system, then I decided to contact the author who replied: "The name has always been
2012 Sep 03
1
[GIT-PULL] XFS filesystem driver
...TOR_SHIFT) +#define XFS_SUPPORTED_BLOCKSIZE 4096 /* 4 KiB filesystem block size */ + /* the btrfs partition first 64K blank area is used to store boot sector and boot image, the boot sector is from 0~512, the boot image starts after */ #define BTRFS_BOOTSECT_AREA 65536 @@ -295,7 +307,8 @@ int patch_file_and_bootblock(int fd, const char *dir, int devfd) nsect = (boot_image_len + SECTOR_SIZE - 1) >> SECTOR_SHIFT; nsect += 2; /* Two sectors for the ADV */ sectp = alloca(sizeof(sector_t) * nsect); - if (fs_type == EXT2 || fs_type == VFAT || fs_type == NTFS) { + if (fs_type == EXT2 || fs...
2014 May 29
3
[PATCH v2 0/2] UFS1/2 support series
From: Raphael S. Carvalho <raphael.scarv at gmail.com> Change since v1: * Fix bug on dentry structure (thank you specification; btw, sarcasm), and consequently a bug on ufs_readdir. * Add readlink support (applied tests for symlinks whose destionation path were stored in blk pointers and the file itself). * Several improvements. Wrote the documentation below. I think it would be good to