summaryrefslogtreecommitdiff
path: root/extlinux
Commit message (Collapse)AuthorAgeFilesLines
* extlinux: use sysfs to find the device node if need beH. Peter Anvin2012-02-081-10/+66
| | | | | | | | If neither /proc/mounts nor /etc/mtab contains a functional pointer to the device node for the installer, try to see if we can find the device node by looking for a symlink in /sys/dev/block. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: clean up main.c formattingH. Peter Anvin2012-02-081-36/+35
| | | | | | Clean up some ugly formatting in main.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: main.c should not be executableH. Peter Anvin2012-02-081-0/+0
| | | | | | Remove stray x bit. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add NTFS filesystem support to Linux and Windows installersPaulo Alcantara2011-09-073-13/+67
| | | | Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
* extlinux: remove dead code in installersyslinux-4.05-pre5H. Peter Anvin2011-07-281-5/+2
| | | | | | | Remove some dead code in the installer, which caused build error with gcc 4.6 and -Werror. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* btrfs: Correctly determine the installation subvolumeYi Yang2011-07-282-32/+376
| | | | | | | There are multiple ways to set up subvolumes in btrfs. Use a general determination method which works for all schemes. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: remove wrong use of strstr()syslinux-4.05-pre4Paulo Alcantara2011-07-051-3/+1
| | | | | | | | strstr() is only used for zero-terminated strings, so OEM Name is not guaranteed to be zero-terminated. Instead, use fat_check_sb_fields() to sanity check FAT superblock. Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
* extlinux/main.c: Fix geometry handlingGene Cumm2011-05-111-2/+2
| | | | | | | | | 1) ioctl HDIO_GETGEO expects a pointer to a struct hd_geometry 2) struct stat's st_dev is the parent file used; st_rdev is what we want Reported-by: Michael Tokarev <mjt@tls.msk.ru> Tested-By: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* Add "make strip" targetH. Peter Anvin2011-05-091-0/+3
| | | | | | | | Add a "make strip" target, to make doing the official build easier. We want the official build to have stripped binaries for size reasons, so do it right and make it an actual build target. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Remove -s for host binariesH. Peter Anvin2011-05-091-1/+1
| | | | | | | | Remove -s for host binaries; current practice is to let the distro packaging systems do that themselves. For the official binaries, we should probably strip them, but via an external tool. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge remote-tracking branch 'mfleming/for-hpa/makefile-cleanup'H. Peter Anvin2011-04-261-1/+2
|\ | | | | | | | | | | | | | | Resolved Conflicts: com32/hdt/Makefile com32/sysdump/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Makefile: Move Makefile fragments into mk/Matt Fleming2011-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the MCONFIG files into a mk/ directory and give them more descriptive names. This is purely a cosmetic change to make the 'include' directives a bit more coherent by making it obvious exactly which MCONFIG file we're including. For example, in com32/lua/src/Makefile we exchange the line, include ../../MCONFIG for the much more comprehensible, include $(MAKEDIR)/com32.mk Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | extlinux: remove already_installedPaulo Alcantara2011-04-151-13/+0
| | | | | | | | Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
* | extlinux: use syslinux_already_installed instead of already_installedPaulo Alcantara2011-04-151-1/+1
|/ | | | Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
* extlinux/main.c: remove variables set but not usedH. Peter Anvin2011-03-161-3/+1
| | | | | | gcc 4.6 warns on variables set but not used, so remove them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: try to get the disk offset from sysfsH. Peter Anvin2010-08-131-5/+38
| | | | | | | | | | | It is possible(?) that HDIO_GETGEO can't return the full offset, and in either case it is too small -- only 32 bits on 32-bit platforms. Thus query sysfs for the real value, if available. sysfs also contains information for slave devices -- this is going to really matter for the md/lvm issues. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux, linux: Ignore --force in these installerssyslinux-4.02-pre4Shao Miller2010-07-191-1/+1
| | | | | | | Previous commits described this behaviour, but did not actually implement it. :) Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* libinstaller: Add --mbr, --active, and --force optionsShao Miller2010-07-031-1/+1
| | | | | | | | | | | | | | In order to consolidate the installer option-parsing system, we add the --mbr (-m), --active (-a), and --force (-f) options from the DOS, Win32, and mtools installers to libinstaller. Since the -m and -a options are not currently valid for the Linux 'syslinux' and 'extlinux' installers, we add error messages to both of these. The -f option is allowed but does nothing for them. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* installers: handle asprintf() correctlyH. Peter Anvin2010-07-021-5/+6
| | | | | | | | | | | | | It appears that the glibc version of asprintf() is braindamaged, and doesn't set the target pointer to NULL in the event of an error (only returns -1). Therefore we need to check the return value. Just in case someone else made the *opposite* error, also check the pointer. Bleh. The glibc documentation states that *BSD sets the pointer to NULL, but instead of following that, the glibc people put warn_unused_result on asprintf. Sigh. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: set bsHidden for loop devicesH. Peter Anvin2010-06-261-5/+8
| | | | | | | If we are on a loop device, set bsHidden based on the loopback device offset. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: modify the layout for btrfsH. Peter Anvin2010-06-251-9/+13
| | | | | | | | | Put the btrfs boot code right after the boot sector (they are really one image anyway). Align the ADV with the end of the boot region, so we can locate it for modification as necessary, and the offset don't end up shifting with different boot image sizes. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'master' of ssh://terminus.zytor.com/pub/git/syslinux/syslinuxsyslinux-4.00-pre59H. Peter Anvin2010-06-241-15/+46
|\
| * extlinux: fix ADV handling, so extlinux.sys -> ldlinux.sys actually worksH. Peter Anvin2010-06-241-9/+16
| | | | | | | | | | | | | | Do the appropriate thing for various error cases, so that the migration code actually does the right thing. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * extlinux: add code to automate extlinux.sys -> ldlinux.sys migrationH. Peter Anvin2010-06-241-16/+40
| | | | | | | | | | | | | | | | - Be able to modify the ADV either in extlinux.sys or ldlinux.sys - Be able to preserve the ADV from extlinux.sys - Remove extlinux.sys when installing ldlinux.sys Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Move modify_adv() into common codeH. Peter Anvin2010-06-231-25/+0
|/ | | | | | | modify_adv() should be used by any installer which uses the common CLI, so it should go into syslxopt.c. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* win32: vacuous ADV supportH. Peter Anvin2010-06-221-0/+1
| | | | | | | | Install an empty ADV in the Windows installer to keep it from being broken. In order to do that, separate the Unix-specific ADV I/O functions from the generic data structure manipulation. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge syslinux/extlinux patch code and core codeH. Peter Anvin2010-06-203-240/+32
| | | | | | | | Merge the SYSLINUX and EXTLINUX patching code and core code, removing EXTLINUX as a separate derivative. All the disk-based systems now use the same code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Reduce sector 1 space pressure; further merge installer codesyslinux-4.00-pre52H. Peter Anvin2010-06-201-57/+70
| | | | | | | | | | Reduce sector 1 space pressure by moving objects that aren't needed by Sector 1 proper into an "extended patch area". While we're mucking with the installer code, make the syslxint and extlinux installer code even more similar. It should now be pretty straightforward to outright merge the code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Move Linux ioctl header magic into a single fileH. Peter Anvin2010-06-162-500/+1
| | | | | | | Put all the Linux ioctl header magic into a single shared file, and try to make it as generally useful as possible. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: don't compile with -O0H. Peter Anvin2010-06-151-1/+1
| | | | | | -O0 is good for debugging, but sucks for production. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Fix prototype for generate_extentsH. Peter Anvin2010-06-151-1/+1
| | | | | | Add missing const Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: remove debugging printf'sH. Peter Anvin2010-06-151-2/+0
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Switch to 64-bit sector pointers everywhereH. Peter Anvin2010-06-152-9/+71
| | | | | | | | | | | | Switch to consistent use of 64-bit sector pointers; this should enable booting even for individual *partitions* larger than 2 TB. In order to not slow down the boot too much, switch the initial load from an enumeration to an extent map. This means the table gets larger (since we have to assume the worst case), but it simplifies the Sector 1 code (since we can push all the hard stuff into the installer), and will speed up booting in the general case. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Implement !GPT protocol in Syslinux core; handle offset > 2 TBH. Peter Anvin2010-06-141-3/+4
| | | | | | | | | | | | | | | Implement the !GPT handover protocol in the Syslinux core, and handle partition offsets above 2 TB. We do not yet handle filesystem sizes above 2 TB, but that should be a reasonably straightforward extension at this time (need to switch to 8-byte block pointers). This finally meant moving getlinsec out of the boot sector, since it no longer fits. Instead have a very simple getonesec implementation in the boot sector. getlinsec still fits in Sector 1, although it doesn't leave space for very many block pointers. That's still better than adding yet another boot loader stage, however. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* syslinux: don't break -o just yet; print warning and resumeH. Peter Anvin2010-06-091-2/+2
| | | | | | | -o has been supported for a very long time; recommend using -t instead, but for now proceed with an error message. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Clean up warnings in previous checkinH. Peter Anvin2010-06-091-0/+5
| | | | | | | Clean up warnings in checkin 146c34a2 Make syslinux installer real "pathbased" Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: add a --menu-save optionThomas Bächler2010-06-071-1/+8
| | | | | | | | Add the --menu-save option to set the MENU SAVE value from the running system using extlinux. From: Thomas Bächler <thomas@archlinux.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* unify common parts of extlinux and syslinux installerAlek Du2010-05-203-463/+45
| | | | | | | | | | | Thus we can share same command line options and reduce a lot of dup code... Seems like a big patch, but the changes are quite safe, no much logical change. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* syslinux: fix sector arraysAlek Du2010-05-201-1/+1
| | | | | | | | | The first sector ptr is in bs->NextSector not in the array in the patch_area. And actually the ADV sectors counting is wrong for a while ... Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* installers: fix warningsH. Peter Anvin2010-05-121-0/+2
| | | | | | CLean up warnings in the installers. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: handle cases of a single level of directoriessyslinux-4.00-pre39H. Peter Anvin2010-04-281-4/+16
| | | | | | | We had a boundary condition error where a single-level directory from the global root (e.g. /boot) would be incorrectly truncated; fix that. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* extlinux: centralize file flags setting; add FAT supportsyslinux-4.00-pre32H. Peter Anvin2010-03-041-37/+79
| | | | | | | Centralize the poking at file flags. Add FAT support to file flags setting (S bit). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* extlinux: don't report failure after writing a FAT superblockH. Peter Anvin2010-03-041-6/+9
| | | | | | | Missing parens made us return failure after successfully writing a FAT superblock. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pathbased: Add FAT support to extlinux and let FAT be "true" pathbasedAlek Du2010-02-102-12/+103
| | | | | | | | Now extlinux can install FAT partition now, and FAT honors patched path area. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pathbased: fix relative path in the extlinux installerAlek Du2010-02-101-1/+1
| | | | | | | | Fix a bug in the extlinux installer where the relative path is not found correctly. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'fsc' into pathbasedH. Peter Anvin2010-02-101-1/+1
|\ | | | | | | | | | | | | Resolved Conflicts: core/fs/ext2/ext2.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Merge branch 'master' into fscH. Peter Anvin2010-01-241-1/+1
| |\ | | | | | | | | | | | | | | | Conflicts: com32/lib/MCONFIG com32/lib/readdir.c
| | * Makefile: replace -W -Wall with centralized $(GCCWARN)H. Peter Anvin2010-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace -W -Wall hardcoded into a bunch of Makefiles with $(GCCWARN), a centralized variable defined in the root MCONFIG. Add -Wstrict-prototypes to the list of global warnings: we should never have non-prototyped declarations. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | extlinux: make installer rewrite the whole fileH. Peter Anvin2010-01-221-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | With the additional patchable areas outside the main patch area, it is now much more complicated to keep track of a high water mark of what needs to be modified. It's easier to just rewrite the whole thing. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | pathbased: clean up diskstart address numbers, 256 byte subvolsH. Peter Anvin2010-01-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Clean up the uses of hard-coded addresses in diskstart.inc. Furthermore, the btrfs spec allows 255 characters for a subvolume, so we might as well allocate that much. Signed-off-by: H. Peter Anvin <hpa@zytor.com>