diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..fb73e72 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "website"] + path = website + url = https://gitlab.com/systemrescue/systemrescue-website.git diff --git a/README.md b/README.md index b9697cf..ce462d1 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ https://gitlab.archlinux.org/archlinux/archiso/ 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, mtools, edk2-shell. You need to use a modified +build system: archiso, grub, mtools, edk2-shell, hugo. You need to use a modified version of archiso for the build to work and for additional fixes and features to be present. You can find the required archiso version and patches in the "patches" folder in this git repository. @@ -26,6 +26,11 @@ The repo-add command must be used to generate the repository package index. The pacman.conf file must be updated with the address of this repository so custom packages can be accessed. +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. diff --git a/airootfs/etc/issue b/airootfs/etc/issue index fb9c910..360296e 100644 --- a/airootfs/etc/issue +++ b/airootfs/etc/issue @@ -3,6 +3,7 @@ \e[00;31m*\e[01;31m Console environment\e[00;37m : Run \e[01;37msetkmap\e[00;37m to choose the keyboard layout + Run \e[01;37mmanual\e[00;37m to read the documentation of SystemRescue \e[00;31m*\e[01;31m Graphical environment\e[00;37m : Type \e[01;37mstartx\e[00;37m to run the graphical environment diff --git a/airootfs/root/.config/xfce4/panel/launcher-11/15867834691.desktop b/airootfs/root/.config/xfce4/panel/launcher-11/15867834691.desktop index 3bce7eb..e29e29c 100644 --- a/airootfs/root/.config/xfce4/panel/launcher-11/15867834691.desktop +++ b/airootfs/root/.config/xfce4/panel/launcher-11/15867834691.desktop @@ -1,7 +1,7 @@ [Desktop Entry] Name=Manual Comment=SystemRescue manual -Exec=firefox-esr file:///usr/share/sysrescue/index.html +Exec=firefox-esr file:///usr/share/sysrescue/html/manual/index.html Icon=help-browser Terminal=false Type=Application diff --git a/airootfs/root/customize_airootfs.sh b/airootfs/root/customize_airootfs.sh index 2c8cf13..d9ecc53 100755 --- a/airootfs/root/customize_airootfs.sh +++ b/airootfs/root/customize_airootfs.sh @@ -90,6 +90,3 @@ sed -i -e '/# ==== BEGIN sysrescuerepo ====/,/# ==== END sysrescuerepo ====/d' / # Packages pacman -Q > /root/packages-list.txt expac -H M -s "%-30n %m" | sort -rhk 2 > /root/packages-size.txt - -# Generate HTML version of the manual -markdown -o usr/share/sysrescue/index.html usr/share/sysrescue/index.md diff --git a/airootfs/usr/share/sysrescue/bin/manual b/airootfs/usr/share/sysrescue/bin/manual new file mode 100755 index 0000000..1236286 --- /dev/null +++ b/airootfs/usr/share/sysrescue/bin/manual @@ -0,0 +1,3 @@ +#!/bin/bash + +elinks /usr/share/sysrescue/html/manual/index.html diff --git a/airootfs/usr/share/sysrescue/index.md b/airootfs/usr/share/sysrescue/index.md deleted file mode 100644 index 618dd82..0000000 --- a/airootfs/usr/share/sysrescue/index.md +++ /dev/null @@ -1,174 +0,0 @@ -# SystemRescue offline manual - -This page tells you more about the important programs which comes with this -system rescue distribution, and which tools can be used for common tasks. Please -use the **man** command in a terminal to get more details about these programs. - -## Packages -As SystemRescue is based on ArchLinux you can use the **pacman** command to -install additional packages using a command such as **pacman -Syu package**. -Keep in mind it may require a lot of space in the writable layer (stored in -memory by default) to download and install these packages. So it can fail if too -many packages are required. It is recommended to use a very recent SystemRescue -version in order to minimize the number of packages which need to be updated or -installed if you plan to install packages at run time. - -## Storage and disk partitioning - -* You can run **lsblk** and **blkid** in the terminal to identify block devices -* **GParted** is a graphical partition editor which displays, checks, resizes, -copies, moves, creates, formats, deletes, and modifies disk partitions. -* **GNU Parted** can also be used to manipulate partitions and it can be run -from the **parted** command in the terminal. -* **GNU ddrescue** can copy data from and to block devices just like the -standard **dd** program and it is optimized to deal with disks with bad blocks. -* **fsarchiver** and **partclone** allows you to save and restore the contents -of file systems to/from a compressed archive file. It needs to be run using the -command line from the terminal. -* You can use **fdisk**, **gdisk** and **cfdisk** to edit MBR and GPT partition -tables from the terminal -* **sfdisk** is a tool to save and restore partition tables to/from a file. -* You can use **growpart** in order to grow a partition so it uses all the space -available on the block storage. You normally need this command after you have -extended the disk of a virtual machine and need to make the additional space -usable. -* The **lvm** package provide all tools required to access Linux logical volumes -* The **dislocker** package provides commands to access disks encrypted using -bitlocker - -## Network tools - -* You can configure the network (Ethernet or wifi) very easily using the -**Network-Manager** icon located next to the clock at the bottom of the screen. -* You can also configure the network using traditional Linux commands from a -terminal. The following commands are available: **nmcli**, **ifconfig**, **ip**, -**route**, **dhclient**. -* You can use **tcpdump** if you need to see network packets being transmitted. -* Both **netcat** and **udpcast** allow to transfer data via network connections. -* You can connect to VPNs using **OpenVPN**, **WireGuard**, and **openconnect** - -## File system tools - -* Tools for the most common linux file systems are included and allow you to -create new file systems, or administrate these (check consistency, repair, -reisize, ...). You can use **e2fsprogs**, **xfsprogs**, **btrfs-progs**, ... -* You can use **ntfs-3g** if you need to access NTFS file systems and -**dosfstools** if you need to work with FAT file systems. - -## Web Browsers and Internet - -* **Firefox** is available via an icon in the taskbar if you need to search for -additional information from internet while you are using SystemRescue. -* You can also use **elinks** from a terminal if you prefer a text mode browser -* Both **curl** and **wget** allow you to download files from the command line -* The **lftp** program can be run from a terminal if you need an FTP client - -## Remote control - -* You can run an **OpenSSH client** by using the **ssh** or **sftp** commands -from a terminal -* You can also connect from another machine to the **OpenSSH server** running -on SystemRescue via the **sshd** service. You will need to set a root password -and update firewall rules to be able to connect. -* You can run **Remmina** from the menu if you need to connect to another -machine via VNC or NX, and you can run **rdekstop** from a terminal in order to -connect to remote Windows machines over RDP. -* You can use **screen**, **minicom** or **picocom** in order to connect to a -serial console. - -## Security - -* **GnuPG** is the most common command to perform encryption and decryption of -files. It can be executed via the **gpg** command from a terminal. -* **KeepassXC** is a very good tool for securely storing your passwords in a -file which is encrypted using a master password. -* The **cryptsetup** command is available if you need to access Linux encrypted -disks. -* The **chntpw** command can be used to reset Windows passwords by accessing the -disk where Windows is installed. - -## Recovery tools - -* **testdisk** is a popular disk recovery software. It recovers lost partitions -and repairs unbootable systems by repairing boot sectors. It can also be used to -recover deleted files from FAT, NTFS and ext4 filesystems. -* **photorec** is a data recovery software focused on lost files including -video, photos, documents and archives. -* **whdd** is another diagnostic and recovery tool for block devices - -## Secure deletion - -Both **wipe**, **nwipe** and **shred** are available if you need to securely -delete data. Be careful as these tools are destructive. - -## File managers - -* **Midnight Commander** is a text based file manager that you can run from the -terminal using the **mc** command. It is very convenient to manipulate files -and folders. -* **Thunar** is a graphical file manager provided as part of the XFCE environment. - -## Hardware information - -* The **lspci** and **lsusb** commands are useful to list PCI and USB devices -connected your your system, and they can display the exact hardware IDs of these -devices that are used to find the right drivers. -* The **lscpu** command displays information about the CPU. -* The **hwinfo** command can be run from the terminal and will display a detail -report about the hardware. - -## Hardware testing - -* You can run **memtest86** from the boot menu if you are booting in BIOS/Legacy -mode. This is not available if you are booting in UEFI mode. -* You can run the **memtester** command in a terminal if you want to test your -system memory. This command runs from the Linux system and hence is available if -you run in UEFI mode. Make sure you run the 64bit version if your computer has -more than 4GB of RAM so it can address all your memory. -* The **stress** commmand can be used from a terminal in order to stress tests -your system (CPU, memory, I/O, disks) - -## Boot loader and UEFI - -* The **Grub** bootloader programs can be used if you need to repair the boot -loader of your Linux distribution. -* You will need **efibootmgr** if you want to change the definitions or the -order of the UEFI boot entries on your computer. - -## Text editors - -* You can use graphical text editors such as **featherpad** and **geany** -* You can use text editors such as **vim**, **nano** and **joe** from the -terminal -* If you need an hexadecimal editor then you can use either **ghex** which has -a graphical user interface or **hexedit** from the terminal - -## Archival and file transfer - -* The **tar** command is often used to create and extract unix file archives -from the command line. -* The system comes with all the common compression programs such as **gzip**, -**xz**, **zstd**, **lz4**, **bzip2** -* You can also use the **zip** and **unzip** commands for manipulate ZIP archives -* Also **p7zip** is available using the **7z** command in the terminal if you -need to work with 7zip files. -* The **rsync** utility is very powerful for copying files either locally or -remotely over an SSH connection. You can also use **grsync** if you prefer a -graphical interface. - -## CD/DVD utilities - -* You can use CD/DVD command line utilities such as **growisofs**, **cdrecord** -and **mkisofs** if you need to work with ISO images and need to burn CD/DVD -medias from the system. Also **udftools** are available to manipulate UDF -filesystems. - -## Scripting languages - -* You can use **bash** for running scripts as well as **Perl**, **Python** and -**Ruby** dynamic languages which are all available. - -## Miscellaneous - -* **flashrom** is an utility for reading, writing, erasing and verifying flash ROM chips -* **nvme** is a tool for manipulating NVM-Express disks. diff --git a/build.sh b/build.sh index e7c2240..a101a0c 100755 --- a/build.sh +++ b/build.sh @@ -20,6 +20,7 @@ sfs_comp="xz" sfs_opts="-Xbcj x86 -b 512k -Xdict-size 512k" snapshot_date="" default_kernel_param="iomem=relaxed" +documentation_dir="/usr/share/sysrescue/html" verbose="" @@ -141,6 +142,38 @@ make_basefs() { setarch ${arch} mkarchiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" init } +# offline documentation +make_documentation() { + if ! [ -f "website/config-offline.toml" ]; then + echo "ERROR: website content missing. Did you forget to check out with git submodules?" + exit 1 + fi + + # is the documentation up to date? ignore for beta versions + if ! echo "${iso_version}" | grep -i -q "beta" && \ + ! grep -q "${iso_version}" website/content/Changes-x86/_index.md; then + echo "ERROR: current version not in changelog. Did you update the website submodule?" + exit 1 + fi + + mkdir -p "${work_dir}/${arch}/airootfs/${documentation_dir}" + + # parameters are all relative to --source dir + /usr/bin/hugo --source "website/" --config "config-offline.toml" --gc --verbose \ + --destination "../${work_dir}/${arch}/airootfs/${documentation_dir}" + RET=$? + + if ! [ "$RET" -eq 0 ]; then + echo "error generating offline documentation (returned $RET), aborting" + exit 1 + fi + + # post-process hugo output and add index.hmtl to all directory links + # required until https://github.com/gohugoio/hugo/issues/4428 is implemented + find "${work_dir}/${arch}/airootfs/${documentation_dir}" -name "*.html" \ + -exec sed -i -e 's#