Skip to content

Commit

Permalink
SystemRescue+ZFS 11.02+2.2.6
Browse files Browse the repository at this point in the history
🌎 External changes:
- Upgrade SystemRescue to v11.02 and archzfs to v2.2.6.
- Reduce ISO image size to < 1 GiB by:
  - uninstalling kernel headers once `zfs-dkms` has been built;
  - removing `alsa-utils`, `pavucontrol`, `pulseaudio-alsa`, `tcl`,
    `tk`, `usb_modeswitch`, `xfburn`, and `xfce4-pulseaudio-plugin`;
  - replacing Qt6 `featherpad` with native `mousepad`;
  - downgrading `ghex` to GTK3 v3.41.1-1;
  - downgrading `linux-firmware` to smaller v20240115.9b6d0b08-2; and
  - downgrading `qtpass` to Qt5 v1.4.0-2. Fixes #15.
- Update README and add FUNDING file.

🏠 Internal changes:
- Switch over to archzfs's experimental repository.
- Change deprecated `hugo(1)` argument `--verbose` → `--logLevel info`.
- Remove `build-zfs-srm` utility script.
- Tweak initramfs compression options.

Fixes #16.
  • Loading branch information
nchevsky committed Nov 26, 2024
1 parent 6e15e90 commit 8f0100b
Show file tree
Hide file tree
Showing 16 changed files with 181 additions and 407 deletions.
2 changes: 2 additions & 0 deletions FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
custom: ['http://cash.app/$nchevsky', 'http://paypal.me/nchevsky', 'https://account.venmo.com/u/nchevsky']
github: nchevsky
132 changes: 69 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,75 @@
# SystemRescue

## Project website
Homepage: https://www.system-rescue.org/

## Project sources
This git repository contains SystemRescue sources files. This is based on
https://gitlab.archlinux.org/archlinux/archiso/

## Building SystemRescue
SystemRescue can be built for x86_64 or i686 architectures. It must be built
on archlinux if you want to build a 64bit edition, or archlinux32 if you want
to create a 32bit edition. The following packages must be installed on the
build system: archiso, grub, isomd5sum, mtools, edk2-shell, hugo.

You need to use a modified version of archiso for the build to work. This
version is provided in the custom `sysrescuerepo` repository. See the
`pacman.conf` file in the source. Either copy the `sysrescuerepo` section
into your `/etc/pacman.conf` or replace the whole `/etc/pacman.conf` file with
the one from the source. Install archiso afterwards.

The package list contains packages which are not part of the official binary
package repositories from Arch Linux. These packages are also provided in the
`sysrescuerepo` repository. If you want to rebuild them, see
[systemrescue-custompkg](https://gitlab.com/systemrescue/systemrescue-custompkg).
Create a local repository out of them with `repo-add`, host it on a webserver
and then adapt pacman.conf.

The build process requires the systemrescue-website repository which is included
as git submodule. So when checking out this repository, make sure to check out
the submodule too. This can be done for example with
`git clone --recurse-submodules https://gitlab.com/systemrescue/systemrescue-sources.git`

The build process can be started by running the build.sh script. It will create
a large "work" sub-directory and the ISO file will be written in the "out"
sub-directory.

## Building SystemRescue with docker
If you are not running archlinux, you can run the build process in docker
containers. You need to have a Linux system running with docker installed
and configured. You can use the scripts provided in the `docker` folder of
this repository.

You must export the environment variable named `sysrescuearch` before you
run the two helper scripts. It should be set as either `x86_64` or `i686`
depending on the target architecture for which you want to build the ISO image.

After this, you need to run the script which builds a new docker image, and
then the script which uses this docker image to builds the ISO image. The second
script will pass the arguments it receives to the main `build.sh` script.

For example you can build a 64bit version of SystemRescue in docker using these commands:
```
export sysrescuearch="x86_64"
./docker/build-docker-image.sh
./docker/build-iso-image.sh -v
# Overview

**SystemRescue+ZFS** is a fork of the [SystemRescue](http://www.system-rescue.org/) distribution (based on [Arch Linux](https://archlinux.org/)) with the following improvements:

- [ZFS](https://github.com/archzfs/archzfs/) supported out of the box
- [Serial console](#serial-console) enabled for all boot options, including [Memtest86+](https://www.memtest.org/)
- EFI boot progress indicators for the kernel/initramfs/system stages
- [ISO image](https://github.com/nchevsky/systemrescue-zfs/releases) below 1 GiB in size

# Serial console

A serial terminal is enabled out of the box on `ttyS0`/`COM1` at 115,200 baud. If these settings are unsuitable, adjust the configuration of the appropriate bootloader and the [kernel](https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html), then [build](#building) a new image.

## Bootloader

| [GRUB](https://www.gnu.org/software/grub/manual/grub/grub.html) (EFI boot) | [SYSLINUX](https://wiki.syslinux.org/wiki/index.php?title=SYSLINUX) (legacy boot) |
| --- | --- |
| 📍 [`efiboot/grub/grubsrcd.cfg`](efiboot/grub/grubsrcd.cfg)<br/>`serial --unit=0 --speed=115200 …` | 📍 [`syslinux/sysresccd_head.cfg`](syslinux/sysresccd_head.cfg)<br/>`SERIAL 0 115200` |

## Kernel

📍 [`build.sh`](build.sh)<br/>`consoles='console=ttyS0,115200 …'`

# Building

```sh
$ sudo ./build.sh [-d] [-v]
```

## Including your SystemRescueModules
If you want to include your own [SystemRescueModules][srm], place their srm files
in the [srm](./srm) directory of the repository before running the build script.
- `-d`: Use fast compression, significantly speeding up development builds.
- `-v`: Print more information while building (strongly recommended).

## Dependencies

[srm]: https://www.system-rescue.org/Modules/
[Arch Linux](https://archlinux.org/download/) with the following packages installed:
- `arch-install-scripts`
- `archiso` from the custom [SystemRescue repository](https://sysrescuerepo.system-rescue.org/) ⚠️
- `base-devel`
- `edk2-shell`
- `grub`
- `hugo`
- `isomd5sum`
- `mtools`

## Project sponsors
## Rebuilds

Infrastructure for SystemRescue is sponsored by:
The state of successful [build steps](#steps) is persisted in `work/build.make_*` files. If such a file exists for a given build step, `build.sh` skips that step indefinitely. State files must be manually deleted for any steps that one wants reexecuted.

### Full rebuild

```sh
$ sudo rm work/build.make_*
```

|&nbsp;&nbsp;&nbsp; [<img src="https://www.system-rescue.org/images/fastly_logo_large.png" width=150 alt="fastly">](https://www.fastly.com)&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; [<img src="https://www.system-rescue.org/images/netcup_logo_large.png" width=150 alt="netcup">](https://www.netcup.eu)&nbsp;&nbsp;&nbsp; |
### Partial rebuild

Delete the state file for the desired step **and any downstream steps**. For example, if you have customized the GRUB configuration, you must remove `build.make_efi` and its successors `build.make_efiboot` and `build.make_iso`.

## Steps

1. `make_pacman_conf`
2. `make_basefs`
3. `make_documentation`
4. `make_packages`
5. `make_customize_airootfs`
6. `make_setup_mkinitcpio`
7. `make_boot`
8. `make_boot_extra`
9. `make_syslinux`
10. `make_isolinux`
11. `make_efi`
12. `make_efiboot`
13. `make_prepare`
14. `make_imageinfo`
15. `make_iso`
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.02
11.02+2.2.6
22 changes: 11 additions & 11 deletions airootfs/etc/issue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
\e[01;31m ========= \e[01;37mSystemRescue %ISO_VERSION% (%ISO_ARCH%)\e[01;31m ======== \e[01;37m\l\e[00;37m/6\e[01;31m =========
\e[00;31mhttps://www.system-rescue.org/
\e[01;31m============== \e[01;37m%ISO_APPLICATION% %ISO_VERSION%\e[01;31m --- \e[01;37m\l \e[01;31m==============
\e[01;31m%ISO_URL%

\e[00;31m*\e[01;31m Console environment\e[00;37m :
Run \e[01;37msetkmap\e[00;37m to choose the keyboard layout (also accessible with the arrow up key)
Run \e[01;37mmanual\e[00;37m to read the documentation of SystemRescue
\e[00;31m*\e[01;31m Console environment:\e[00;37m
Run \e[01;37msetkmap\e[00;37m or press ↑ to choose the keyboard layout.
Run \e[01;37mmanual\e[00;37m to read the SystemRescue documentation.

\e[00;31m*\e[01;31m Graphical environment\e[00;37m :
Type \e[01;37mstartx\e[00;37m to run the graphical environment
X.Org comes with the XFCE environment and several graphical tools:
\e[00;31m-\e[00;37m Partition manager: .. \e[01;37mgparted\e[00;37m
\e[00;31m-\e[00;37m Web browser: ........ \e[01;37mfirefox\e[00;37m
\e[00;31m-\e[00;37m Text editor: ........ \e[01;37mfeatherpad\e[00;37m
\e[00;31m*\e[01;31m Graphical environment:\e[00;37m
Run \e[01;37mstartx\e[00;37m to start the graphical environment.
X.Org comes with the XFCE environment and several graphical tools:
\e[00;31m-\e[00;37m Partition manager: \e[01;37mgparted\e[00;37m
\e[00;31m-\e[00;37m Web browser: \e[01;37mfirefox\e[00;37m
\e[00;31m-\e[00;37m Text editor: \e[01;37mfeatherpad\e[00;37m

16 changes: 5 additions & 11 deletions airootfs/root/.config/xfce4/panel/launcher-5/15552316104.desktop
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
[Desktop Entry]
Name=FeatherPad
Name=Mousepad
GenericName=Text Editor
Comment=Lightweight Qt5 text editor
Exec=featherpad %F
Icon=featherpad
Comment=Simple Text Editor
Exec=mousepad
Icon=org.xfce.mousepad
Terminal=false
Type=Application
MimeType=text/plain;
Categories=Qt;Utility;TextEditor;
Categories=Utility;TextEditor;
X-KDE-StartupNotify=false;
Keywords=Text;Editor;Plaintext;
Actions=new-window;
X-XFCE-Source=file:///usr/share/applications/featherpad.desktop

[Desktop Action new-window]
Name=New Window
Exec=featherpad --win
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
<property name="expand" type="bool" value="true"/>
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-8" type="string" value="pulseaudio">
<property name="enable-keyboard-shortcuts" type="bool" value="true"/>
</property>
<property name="plugin-9" type="string" value="systray">
<property name="icon-size" type="int" value="0"/>
<property name="known-legacy-items" type="array">
Expand Down
14 changes: 10 additions & 4 deletions airootfs/root/customize_airootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf

# PulseAudio takes care of volume restore
ln -sf /dev/null /etc/udev/rules.d/90-alsa-restore.rules

# config symlink
mkdir /etc/sysrescue/
mkdir -p /etc/sysrescue/
ln -sf /run/archiso/config/sysrescue-effective-config.json /etc/sysrescue/sysrescue-effective-config.json

# Services
Expand Down Expand Up @@ -60,8 +57,17 @@ systemctl mask ldconfig.service
mkdir -p /etc/systemd/system-generators/
ln -sf /dev/null /etc/systemd/system-generators/systemd-gpt-auto-generator

# remove kernel headers (no longer needed once zfs-dkms has been installed)
mkdir -p /etc/pacman.d/hooks
ln -s /dev/null /etc/pacman.d/hooks/71-dkms-remove.hook # suppress automatic removal of zfs-dkms
pacman --noconfirm -Rs linux-lts-headers
rm /etc/pacman.d/hooks/71-dkms-remove.hook

# setup pacman signing key storage
/usr/bin/pacman-key --init
pacman-key --recv-keys 3A9917BF0DED5C13F69AC68FABEC0A1208037BE9 DDF7DB817396A49B2A2723F7403BD972F75D9D76 # archzfs (experimental, stable)
pacman-key --lsign-key 3A9917BF0DED5C13F69AC68FABEC0A1208037BE9 # archzfs (experimental)
pacman-key --lsign-key DDF7DB817396A49B2A2723F7403BD972F75D9D76 # archzfs (stable)
/usr/bin/pacman-key --populate
rm -f /etc/pacman.d/gnupg/*~

Expand Down
Loading

0 comments on commit 8f0100b

Please sign in to comment.