Commit graph

31 commits

Author SHA1 Message Date
Gerd v. Egidy 253e1fed4f fix build with newer glibc due to libnss symlinks
Newer glibc versions do not provide nss libraries like libnss_files
as fully versioned files and symlinks anymore, but just have libnss_files.so.2.
archiso expected symlinks and this leads to build failures.

Adapt the archiso patch to the new file scheme.

Fixes #314
2022-12-15 23:01:02 +01:00
Gerd v. Egidy f4f582edb4 Implement new autorun configuration ( #287)
- Implement a new style configuring autorun scripts ("autorun.exec"), more suited to a YAML config file than the old style (#287)
- The old style autorun scripts are still fully supported, they are loaded into keys from "1000-autorun" to "1026-autorunF"
- change the default for ar_nowait to true
- add "shell" option for new autorun exec scripts: let bash interpret the command instead of directly forking it from python
- allow to wait for keypress with a countdown timer, all keys are accepted now (instead of just enter as in the past)
- fix is_elf_binary
- improve output and logging (#253)
- use curl instead of wget for downloading scripts from URLs
- bind-mount /run/archios/bootmnt in case of copytoram to create a stable path for the new-style scripts
- deprecate storing autorun scripts in the root of the boot disk (#252)
- don't check /var/autorun/cdrom for autorun scripts anymore, it was not documented and there are more than enough better alternatives
2022-10-11 19:29:13 +00:00
Gerd v. Egidy 0f01ff896a allow using https urls in archiso_http_srv by disabling CA checks
archiso_http_srv is used in initramfs and we don't have a database
of trusted CAs there. So ignore all CA checks to allow downloading
from https at all.
2022-09-14 22:33:01 +02:00
Gerd v. Egidy ba97b5ce78 don't keep airootfs.sfs in ram twice when using archiso_http_srv (#56)
Without this patch, airootfs.sfs is downloaded to /run/archiso/httpspace
and then copied to /run/archiso/bootmnt. copytoram is automatically
activated, which copies it to /run/archiso/copytoram and removes
/run/archiso/bootmnt. The original /run/archiso/httpspace was kept,
wasting ram.

This patch gets rid of /run/archiso/httpspace and directly downloads
to /run/archiso/bootmnt. This is then copied to copytoram and bootmnt
removed, so we don't keep two copies in ram anymore.
2022-09-14 22:26:10 +02:00
Gerd v. Egidy 533a4cab7e add cow_label and cow_directory options to the global scope of the yaml config file
Allows to set to set the persistent backing store options via the yaml config too and
not only through boot commandline options.
2022-08-05 22:05:02 +02:00
Gerd v. Egidy 59aab67d6d fix dns requests in sysrescue-configuration.lua (#291)
The dns library used by lua requires /etc/hosts to exist, otherwise all
requests for name resolution are denied. This meant that using the
sysrescuecfg boot option with a http URL and hostname did not work
while using an IP worked.

This patch adds an empty /etc/hosts file to the initramfs image to fix this.
2022-07-26 22:05:42 +02:00
Gerd v. Egidy d024b66e04 add patch for archiso to fix dns name resolution in the initramfs stage
glibc recently changed how dns name resolution is implemented. It now
needs additional .so files that are loaded dynamically. Include these
files in the initramfs image.
2022-07-05 21:34:36 +02:00
Gerd v. Egidy b21ff875a7 allow the same values for booleans during initramfs as in the python scripts
True values are 'y', 'yes', 't', 'true', 'on', '1', '1.0';
false values are 'n', 'no', 'f', 'false', 'off', '0', '0.0'.
2022-06-06 22:51:16 +02:00
Gerd v. Egidy 85fa76051d don't throw an error on nonexistent config entries for "copytoram" "checksum" "loadsrm"
This can happen when there is no config yaml at all, for example when booting via PXE
2022-06-06 13:34:09 +02:00
Gerd v. Egidy e87660beeb execute sysrescue-configuration.lua only once
Before this patch sysrescue-configuration.lua was executed twice each boot:
(1) during initramfs stage (2) in the regular system as sysrescue-configuration.service

While in theory both runs should create the same output, this isn't guaranteed and
differences could appear for example because of network issues. Finding and debugging
these is difficult because the output of sysrescue-configuration.lua created during
initramfs isn't available anymore when the final system is running.

This patch lets sysrescue-configuration.lua just run once during initramfs. The
output JSON file is then written to the new tmpfs mounted dir /run/archiso/config/.
This dir is also made the new default location for sysrescue-effective-config.json.

A symlink from /etc/sysrescue/sysrescue-effective-config.json to the new location
is created for compatibility with previous releases.
2022-04-25 20:31:18 +02:00
Francois Dupoux ca6bcd6548 Implement the primary configuration processing script in lua (#251) 2022-01-26 20:07:53 +00:00
fdupoux bc817e38bb Allow autorun scripts to be located in a folder at the root of the ISO 2022-01-08 17:14:01 +00:00
Francois Dupoux e037cc089c Name the folder for configuration files "sysrescue.d" rather than "config.d" (#170) 2022-01-03 13:39:43 +00:00
Francois Dupoux c91a4bf8f4 Make the search for config files with a yaml extension case insensitive 2022-01-02 15:49:24 +00:00
fdupoux 5d02c31cfe Do not let yaml config disable early boot options enabled in boot command line 2022-01-02 09:21:07 +00:00
fdupoux fc16e66218 Add missing line breaks in archiso-v43-06-copytoram.patch 2022-01-02 08:58:05 +00:00
Francois Dupoux 2f02fc21c1 Support for configuring early boot options using the yaml configuration files 2022-01-01 18:27:06 +00:00
Francois Dupoux 7c5ce8cfdf Initial support for defining the global configuration with yaml file (#170) 2022-01-01 11:23:52 +00:00
Marcos Mello 3fb8f54e84 srm patch: override airootfs files
It is counterintuitive otherwise.
2020-08-09 21:29:11 -03:00
fdupoux 845958c67c Rename archiso patches to make it clear which version is being used 2020-08-07 17:41:15 +01:00
Marcos Mello 285ffe8969 srm patch: simplify mount command 2020-08-04 21:42:42 -03:00
fdupoux e9d0356b8c Fix to remove warning during boot when there are no autorun scripts 2020-08-02 09:01:29 +01:00
fdupoux d2f290f8e8 Copy autorun scripts to new location when copytoram is enabled (#126) 2020-07-25 14:49:56 +01:00
fdupoux ec869f6539 Added numbers to patch files to specify the right order 2020-07-25 14:18:04 +01:00
Marcos Mello 83b4b4e459 Small cosmetic tweak to loadsrm patch 2020-07-12 07:45:48 -03:00
Francois Dupoux dc2d25a286 Merge branch 'add-loadsrm' into 'master'
SystemRescueCd Modules (SRM) support

Closes #122

See merge request fdupoux/sysresccd-src!63
2020-07-12 09:42:18 +00:00
fdupoux 8ae6b8f798 Increase cow_spacesize from 256M to 25% of the RAM 2020-07-12 10:10:56 +01:00
Marcos Mello 9636b0bced SystemRescueCd Modules (SRM) support
Load *.srm files from archisobasedir, create loopback devices for
each one, mount and use them as additional overlayfs lowerdirs.

Compared to SystemRescueCd 5, it has differences:

- loadsrm must be added to kernel cmdline, othewise srm files
  will not be loaded (opt-in)
- it does not check srm checksums (.md5)
- it does not allow specify explicit file names
  (loadsrm=foo.srm,bar.srm)

Closes fdupoux/sysresccd-src#122
2020-07-11 16:26:31 -03:00
fdupoux 64237bda3a Fix PXE boot when multiple interfaces are available (#19) 2020-06-25 07:42:33 +01:00
fdupoux 8b086d9ef3 Add archiso patch to fix DHCP after PXE boot (#19) 2020-05-24 16:55:34 +01:00
fdupoux bebf31af78 Optimize squashfs compression 2020-01-26 12:17:58 +00:00