Commit graph

265 commits

Author SHA1 Message Date
Francois Dupoux b3a96e065a
Remove the community repository (#409) 2025-03-15 08:10:43 +00:00
Daniel Richard G dbc09046b4 Add build-zfs-srm, a script to build ZFS support for SystemRescue 2024-02-27 22:27:19 -05:00
Francois Dupoux cc19b334a9 Remove /root/.config/autostart/nm-applet.desktop because of duplicate nm-applet icon (#366) 2024-01-27 14:14:37 +00:00
Francois Dupoux a0fda2e85e Update xfce panel configuration 2023-12-18 20:50:55 +00:00
Francois Dupoux c2717519b6 Adding the battery icon to the panel 2023-12-17 13:11:51 +00:00
Francois Dupoux a9a30e5913 Enabled the screensaver to save energy 2023-12-17 13:11:15 +00:00
Gerd v. Egidy 5cf652ec56 Add new option "ssh_known_hosts" to the sysconfig section of the yaml config
It allows to preconfigure a list of known host keys.
But the primary use case will probably be trusting signatures from SSH CAs for host keys.

Example:
---
sysconfig:
    ssh_known_hosts:
        myhost.example.org: "ssh-ed25519 AAAAC3NzaC1l...JJTO48B"
        "@cert-authority *.mydomain.org": "ssh-rsa AAAAB3NzaC1y...Zhk0="
2023-10-03 20:17:14 +02:00
Gerd v. Egidy 4869d2c2f8 Fix findroot loop when the password to any encrypted device is unknown (#342)
Do this by asking max 6 times for a password, then continue with the next device.

Also fix a bug when an encrypted device on LVM leads to the same device
name for the encrypted and unencrypted device.
2023-09-25 22:30:58 +02:00
Gerd v. Egidy 99fb673748 Fix using findroot when /sbin/init is an absolute symlink (#340)
Also add basic safeguards against bad usrmerge implementations:
that would be when /sbin is a absolute symlink instead of a relative one.
2023-09-25 21:44:03 +02:00
Francois Dupoux 38e0e2e25b Disable recent features by default on ext4 to improve compatibility (#330) 2023-05-06 07:54:59 +01:00
Francois Dupoux 97b97427ae Add /etc/mke2fs.conf to control the default features 2023-05-06 07:50:49 +01:00
Marcos Mello 81205cae65 Enable nm-applet's application indicator support
Application indicators are supported since xfce4-panel 4.16.0. Update panel's systray configuration accordingly:

- show-frame was removed.

d77b3b382d
8a9c40600a

- size-max was renamed to icon-size. Specifying 0 means "Adjust size automatically".

3d12067c08
37b15df58c

- names-visible was renamed to known-items (application indicator) and known-legacy-items (xembed).

6e5e8f5f61
7a0b8c36bc
2023-04-23 16:28:23 -03:00
Marcos Mello fd32da99ec Mask systemd-gpt-auto-generator rather than delete it 2023-04-14 20:09:50 -03:00
Gerd v. Egidy 3412251fe4 don't look for autorun scripts in the root of the iso image anymore
This has been deprecated for some time and conflicts with the (preferred) "autorun" dir in there
2023-03-16 22:20:58 +01:00
Gerd v. Egidy 31a301d8c1 remove more deprecated autorun features: scripts without shebang, scripts with windows line endings 2023-03-16 22:17:48 +01:00
Gerd v. Egidy 8015cebfbe remove autoruns= boot commandline option (replaced with ar_suffixes option) 2023-03-16 22:13:15 +01:00
Gerd v. Egidy 11dc58b506 implement autostarting programs when the X desktop is opened: gui_autostart option in YAML config
Allows either linking existing .desktop files or executing arbitrary commands.

Example config:

gui_autostart:
    100:
         desktop: "/usr/share/applications/thunar.desktop"
    200:
         exec: "bash -c \"read -p 'press any key'\""
         terminal: true
2023-03-14 23:21:46 +01:00
Gerd v. Egidy a688cf3f8f always create an empty /root/.ssh/authorized_keys with correct permissions
Precreating the file and directory makes it easier for the user to add their key
since the correct permissions are already set.

This does not interfere with using the yaml config to set a key or using
the mechanisms described in https://systemd.io/CREDENTIALS/
2023-03-11 18:32:07 +01:00
Gerd v. Egidy 95ee025eb9 mask archlinux-keyring-wkd-sync.timer service
When it runs it could confuse the pacman key database, which we want to
keep in the original release state to make the snapshot config work.
2022-12-18 22:02:49 +01:00
Gerd v. Egidy 04fa4bc9c0 Wrap downloads by pacman in another faketime call to cancel the one in "pacman-faketime"
Without this second faketime call the TLS certificate validity times will pose a problem when
downloading from https mirrors.

Hopefully fixes #313 for good.
2022-12-16 22:22:45 +01:00
Roland Schwarzkopf f3ee66b9e5 cowpacman2srm fix - check if directory exists before searching unit files 2022-12-15 10:46:21 +01:00
Gerd v. Egidy 58169f4ed2 support configuring entries for the /etc/hosts file in the YAML config
Example config:

sysconfig:
    hosts:
        "192.168.1.1": "example.net.lan"
        "192.168.1.10": "foo.net.lan foo"
2022-12-11 21:16:30 +01:00
Gerd v. Egidy 354b550524 support configuring the content of the bash_history in the YAML config
Allows to preconfigure common commands so that they can be accessed by just pressing
the up arrow key or searched with ctrl+r.

Move the "setkmap" command (which was previously hardcoded into .bash_history) into
100-defaults.yaml, allowing it to be overridden.

Example config:

sysconfig:
    bash_history:
        100: "setkmap"
        200: "reverse_ssh support.example.com 1234"

The Mapping / dict key is used for lexicographic reverse-ordering of the entries. Reverse-ordering
means the lowest key will show up first when pressing the up arrow key.
2022-12-11 19:26:14 +01:00
Gerd v. Egidy ddcd287322 remove systemd-gpt-auto-generator to prevent it automounting partitions
Given some circumstances like matching IDs and partition setup, systemd-gpt-auto-generator
will auto-mount specially marked partitions. This would interfere with SystemRescue and also
go against the no-automount policy of SystemRescue.

So remove systemd-gpt-auto-generator during build.
2022-12-11 17:48:53 +01:00
Gerd v. Egidy f57e608a69 automatically start x11 if "dovnc" option is given (#310)
VNC does not make much sense if X11 isn't running.

Automatically starting X11 on dovnc was done before SystemRescue 9.00, but
this logic seems to have been lost in the option handling code refactoring.
2022-12-10 22:13:01 +01:00
Gerd v. Egidy 54bd03d4fd use new pacman-faketime wrapper in yay-prepare 2022-12-10 21:05:17 +01:00
Gerd v. Egidy f2134ca4ab add "pacman-faketime" wrapper to work around expiring package signing keys (#313)
Also disable gpg trust caching & regeneration to not "burn" the trust database by
running pacman without the faketime wrapper once.
2022-12-10 21:02:45 +01:00
Gerd v. Egidy 75591c9551 Merge branch 'lua-copytoram' into 'main'
don't parse yaml files twice when using copytoram

See merge request systemrescue/systemrescue-sources!243
2022-10-19 18:26:46 +00:00
Gerd v. Egidy 3e74018b67 disable advertising on the firefox new-tab / welcome page 2022-10-19 20:23:33 +02:00
Gerd v. Egidy 711a9f6ea5 don't parse yaml files twice when using copytoram
since recently /run/archiso/copytoram is bind-mounted to /run/archiso/bootmnt.
This means sysrescue-configuration.lua should just load yaml files from
/run/archiso/bootmnt and not both, otherwise they would be loaded twice.
2022-10-19 20:20:13 +02:00
Gerd v. Egidy 5a32924e55 Split initialization of SystemRescue into parts done before and in parallel to networking (#304)
Configuring the nofirewall option by the sysrescue-initialize script must be done before the ip6?tables service.
Configuring the firewall should be finished before beginning to initialize the network.

But the rest of sysrescue-initialize should still be done in parallel to networking
being set up for a fast boot sequence. Also some services in sysrescue-initialize require
networking being online, for example load_srm with a remote url.

The proper way to accommodate all these needs is to split sysrescue:
sysrescue-initialize-prenet: must be finished before the network-pre.target
sysrescue-initialize-whilenet: started after sysrescue-initialize-prenet, can run in parallel
                               to networking being set up.
2022-10-16 12:33:25 +02:00
Gerd v. Egidy 61576de220 fix error handling when setting sysctl via yaml config 2022-10-15 17:30:08 +02:00
Gerd v. Egidy 98a9623a91 yay-prepare: don't reinstall packages from the sysrescuerepo
They aren't available by default. Also it is quite unlikely that a package
from AUR would actually need includes or libraries from one of them.
2022-10-11 22:36:44 +02:00
Gerd v. Egidy eac0842969 Merge branch 'yay' into 'main'
add yay AUR-helper (#139)

See merge request systemrescue/systemrescue-sources!235
2022-10-11 19:32:24 +00: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 06f9d9d397 Add sysctl option to the "sysconfig" scope of YAML config file
Allows to customize sysctl entries of the kernel from the yaml config.
2022-10-02 19:04:41 +02:00
Gerd v. Egidy 704d7a9e5c add yay AUR-helper (#139)
- call yay through a wrapper to take care of root/sudo handling
- add yay-prepare to reinstall everything that was stripped for size (like /usr/include)
- yay-prepare creates a yay user and sudo rights
- the wrapper is installed in /usr/bin/yay, we want it to clash with yay-packages that aren't adapted to SystemRescue
2022-10-02 15:34:00 +02:00
Gerd v. Egidy 1df64290fa use binutils ar and strings commands
The binutils package is installed in SystemRescue for some time, so actually use it.

The busybox ar is inferior to the binutils one, causing problems when building
some packages with yay.
2022-10-02 15:26:10 +02:00
Gerd v. Egidy dcc27afc06 add mkpasswd: hash a password for use in /etc/shadow or htpasswd
mkpasswd is finally available packaged on Arch, so add it to allow
manually replacing a password in /etc/shadow, for when chroots or
pam don't work as wanted. Also supports advanced hash algos like
yescrypt that can't be set via the pam stack yet.

Because the source for mkpasswd is part of the whois package, it
is currently packaged as part of whois. But it might get it's own
package in the future, so add a check for /usr/bin/mkpasswd during
build time.
2022-09-15 20:58:33 +02:00
Gerd v. Egidy c52dcbeeb0 mountall: show target mountpoint in output 2022-09-06 20:24:46 +02:00
Gerd v. Egidy d8de1c8199 mountall: use udevadm settle to wait for newly opened cryptodisks to appear in /dev/mapper 2022-09-06 20:19:53 +02:00
Gerd v. Egidy b0bd95a977 Add rclone option to the "sysconfig" scope of YAML config file
rclone needs a rclone.conf file before it can be used, it contains
the urls, login data and similar.

Use the sysconfig.rclone.config hierarchy instead of just sysconfig.rclone
to allow adding features later. These could be support for encrypted
rclone config files (these would then go into sysconfig.rclone.crypted_config)
or things like automounting.
2022-08-24 13:18:08 +02:00
Gerd v. Egidy 61cc03ea83 Merge branch 'lua-https-fix' into 'main'
don't do certificate verification for https downloads in the lua script

See merge request systemrescue/systemrescue-sources!227
2022-08-07 11:35:07 +00:00
Gerd v. Egidy e9549eba34 don't do certificate verification for https downloads in the lua script
it is usually run during initramfs: we don't have a CA database there, so
all https downloads would fail otherwise.

Not doing cert verification at this step is clearly documented, so no
unexpected security risk for the user.
2022-08-07 12:56:41 +02:00
Gerd v. Egidy 81db3b13db improve error message in case the lua script can't download a file
Now prints the actual error message from the http library instead of a
generic "Could not connect" message.
2022-08-07 12:53:16 +02:00
Francois Dupoux 1e8ad8d465 Merge branch 'size-reduction' into 'main'
Remove files to reduce image size

See merge request systemrescue/systemrescue-sources!221
2022-08-06 14:08:25 +00: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 c0cddfc630 add --readonly option to mountall 2022-08-01 22:40:48 +02:00
Gerd v. Egidy e3b7b2079e use already existing mountpoints in mountall when they are empty and nothing mounted 2022-08-01 22:12:52 +02:00
Gerd v. Egidy 66e5801538 remove qt 5 and 6 translations to reduce image size
Qt 5 and 6 package translation files for common widgets that programs
can opt to use. These translation files take up about 2 MB of the final
iso image.

When the translations are removed, qt is designed to show messages
in the default language, English.

SystemRescue currently contains 2 programs using qt5 and qt6. I
tested both with the default en_US.UTF-8 and custom de_DE.UTF-8 locales:

featherpad: contains it's own complete translation. It's UI uses the
configured locale and it works regardless if the qt-translations are
installed or not.

yubikey-personalization-gui: doesn't use the translations at all and
is always shown in English. Removing the qt translations doesn't change
anything.

So programs coming with SystemRescue by default aren't affected. Also
other qt programs the user could install won't be affected. Only if the
user also changes the default locale, parts of some programs might be
now shown in English, like many other parts of SystemRescue that don't
come with translations.
2022-07-31 13:02:45 +02:00