summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid P. <megver83@parabola.nu>2024-02-22 19:24:50 -0300
committerDavid P. <megver83@parabola.nu>2024-02-22 19:24:50 -0300
commit0905241b661d03b6ae57f0fd4cfd4a756e5342b8 (patch)
treeffdeeda342badb5b5f0d19d49289600667d309a5
parentc08dd4465ae9b51d12f4b3af9c85a17724dd8744 (diff)
add baseline profileHEADmaster
-rw-r--r--baseline/airootfs/etc/mkinitcpio.d/linux-libre.preset8
-rw-r--r--baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf4
-rw-r--r--baseline/grub/grub.cfg105
-rw-r--r--baseline/grub/loopback.cfg73
-rw-r--r--baseline/packages.x86_6410
-rw-r--r--baseline/pacman.conf117
-rw-r--r--baseline/profiledef.sh20
-rw-r--r--baseline/replace.txt9
-rw-r--r--baseline/syslinux/syslinux-linux-libre.cfg5
-rw-r--r--baseline/syslinux/syslinux.cfg9
10 files changed, 360 insertions, 0 deletions
diff --git a/baseline/airootfs/etc/mkinitcpio.d/linux-libre.preset b/baseline/airootfs/etc/mkinitcpio.d/linux-libre.preset
new file mode 100644
index 0000000..67fc938
--- /dev/null
+++ b/baseline/airootfs/etc/mkinitcpio.d/linux-libre.preset
@@ -0,0 +1,8 @@
+# mkinitcpio preset file for the 'linux-libre' package on archiso
+
+PRESETS=('archiso')
+
+ALL_kver='/boot/vmlinuz-linux-libre'
+archiso_config='/etc/mkinitcpio.conf.d/archiso.conf'
+
+archiso_image="/boot/initramfs-linux-libre.img"
diff --git a/baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf b/baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf
new file mode 100644
index 0000000..6e75f25
--- /dev/null
+++ b/baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf
@@ -0,0 +1,4 @@
+title Parabola GNU/Linux-libre (x86_64, UEFI)
+linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux-libre
+initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux-libre.img
+options archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID%
diff --git a/baseline/grub/grub.cfg b/baseline/grub/grub.cfg
new file mode 100644
index 0000000..2cc31db
--- /dev/null
+++ b/baseline/grub/grub.cfg
@@ -0,0 +1,105 @@
+# Load partition table and file system modules
+insmod part_gpt
+insmod part_msdos
+insmod fat
+insmod iso9660
+insmod ntfs
+insmod ntfscomp
+insmod exfat
+insmod udf
+
+# Use graphics-mode output
+if loadfont "${prefix}/fonts/unicode.pf2" ; then
+ insmod all_video
+ set gfxmode="auto"
+ terminal_input console
+ terminal_output console
+fi
+
+# Enable serial console
+insmod serial
+insmod usbserial_common
+insmod usbserial_ftdi
+insmod usbserial_pl2303
+insmod usbserial_usbdebug
+if serial --unit=0 --speed=115200; then
+ terminal_input --append serial
+ terminal_output --append serial
+fi
+
+# Search for the ISO volume
+if [ -z "${ARCHISO_UUID}" ]; then
+ if [ -z "${ARCHISO_HINT}" ]; then
+ regexp --set=1:ARCHISO_HINT '^\(([^)]+)\)' "${cmdpath}"
+ fi
+ search --no-floppy --set=root --file '%ARCHISO_SEARCH_FILENAME%' --hint "${ARCHISO_HINT}"
+ probe --set ARCHISO_UUID --fs-uuid "${root}"
+fi
+
+# Get a human readable platform identifier
+if [ "${grub_platform}" == 'efi' ]; then
+ archiso_platform='UEFI'
+ if [ "${grub_cpu}" == 'x86_64' ]; then
+ archiso_platform="x64 ${archiso_platform}"
+ elif [ "${grub_cpu}" == 'i386' ]; then
+ archiso_platform="IA32 ${archiso_platform}"
+ else
+ archiso_platform="${grub_cpu} ${archiso_platform}"
+ fi
+elif [ "${grub_platform}" == 'pc' ]; then
+ archiso_platform='BIOS'
+else
+ archiso_platform="${grub_cpu} ${grub_platform}"
+fi
+
+# Set default menu entry
+default=parabola
+timeout=15
+timeout_style=menu
+
+
+# Menu entries
+
+menuentry "Parabola GNU/Linux-libre (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'parabola' {
+ set gfxpayload=keep
+ linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-libre archisobasedir=%INSTALL_DIR% archisodevice=UUID=${ARCHISO_UUID}
+ initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-libre.img
+}
+
+if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
+ menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
+ set gfxpayload=800x600,1024x768
+ linux /boot/memtest86+/memtest.efi
+ }
+fi
+if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
+ menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
+ set gfxpayload=800x600,1024x768
+ linux /boot/memtest86+/memtest
+ }
+fi
+if [ "${grub_platform}" == 'efi' ]; then
+ if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
+ menuentry 'UEFI Shell' {
+ chainloader /shellx64.efi
+ }
+ elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
+ menuentry 'UEFI Shell' {
+ chainloader /shellia32.efi
+ }
+ fi
+
+ menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
+ fwsetup
+ }
+fi
+
+menuentry 'System shutdown' --class shutdown --class poweroff {
+ echo 'System shutting down...'
+ halt
+}
+
+menuentry 'System restart' --class reboot --class restart {
+ echo 'System rebooting...'
+ reboot
+}
diff --git a/baseline/grub/loopback.cfg b/baseline/grub/loopback.cfg
new file mode 100644
index 0000000..3ecc404
--- /dev/null
+++ b/baseline/grub/loopback.cfg
@@ -0,0 +1,73 @@
+# https://www.supergrubdisk.org/wiki/Loopback.cfg
+
+# Search for the ISO volume
+search --no-floppy --set=archiso_img_dev --file "${iso_path}"
+probe --set archiso_img_dev_uuid --fs-uuid "${archiso_img_dev}"
+
+# Get a human readable platform identifier
+if [ "${grub_platform}" == 'efi' ]; then
+ archiso_platform='UEFI'
+ if [ "${grub_cpu}" == 'x86_64' ]; then
+ archiso_platform="x64 ${archiso_platform}"
+ elif [ "${grub_cpu}" == 'i386' ]; then
+ archiso_platform="IA32 ${archiso_platform}"
+ else
+ archiso_platform="${grub_cpu} ${archiso_platform}"
+ fi
+elif [ "${grub_platform}" == 'pc' ]; then
+ archiso_platform='BIOS'
+else
+ archiso_platform="${grub_cpu} ${grub_platform}"
+fi
+
+# Set default menu entry
+default=parabola
+timeout=15
+timeout_style=menu
+
+
+# Menu entries
+
+menuentry "Parabola GNU/Linux-libre (%ARCH%, ${archiso_platform})" --class arch --class gnu-linux --class gnu --class os --id 'parabola' {
+ set gfxpayload=keep
+ linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-libre archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}"
+ initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-libre.img
+}
+
+if [ "${grub_platform}" == 'efi' -a "${grub_cpu}" == 'x86_64' -a -f '/boot/memtest86+/memtest.efi' ]; then
+ menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
+ set gfxpayload=800x600,1024x768
+ linux /boot/memtest86+/memtest.efi
+ }
+fi
+if [ "${grub_platform}" == 'pc' -a -f '/boot/memtest86+/memtest' ]; then
+ menuentry 'Run Memtest86+ (RAM test)' --class memtest86 --class gnu --class tool {
+ set gfxpayload=800x600,1024x768
+ linux /boot/memtest86+/memtest
+ }
+fi
+if [ "${grub_platform}" == 'efi' ]; then
+ if [ "${grub_cpu}" == 'x86_64' -a -f '/shellx64.efi' ]; then
+ menuentry 'UEFI Shell' {
+ chainloader /shellx64.efi
+ }
+ elif [ "${grub_cpu}" == "i386" -a -f '/shellia32.efi' ]; then
+ menuentry 'UEFI Shell' {
+ chainloader /shellia32.efi
+ }
+ fi
+
+ menuentry 'UEFI Firmware Settings' --id 'uefi-firmware' {
+ fwsetup
+ }
+fi
+
+menuentry 'System shutdown' --class shutdown --class poweroff {
+ echo 'System shutting down...'
+ halt
+}
+
+menuentry 'System restart' --class reboot --class restart {
+ echo 'System rebooting...'
+ reboot
+}
diff --git a/baseline/packages.x86_64 b/baseline/packages.x86_64
new file mode 100644
index 0000000..b0cfbdb
--- /dev/null
+++ b/baseline/packages.x86_64
@@ -0,0 +1,10 @@
+base
+cloud-init
+hyperv
+linux-libre
+mkinitcpio
+mkinitcpio-archiso
+openssh
+pv
+qemu-guest-agent
+syslinux
diff --git a/baseline/pacman.conf b/baseline/pacman.conf
new file mode 100644
index 0000000..59821bc
--- /dev/null
+++ b/baseline/pacman.conf
@@ -0,0 +1,117 @@
+#
+# /etc/pacman.conf
+#
+# See the pacman.conf(5) manpage for option and repository directives
+
+#
+# GENERAL OPTIONS
+#
+[options]
+# The following paths are commented out with their default values listed.
+# If you wish to use different paths, uncomment and update the paths.
+#RootDir = /
+#DBPath = /var/lib/pacman/
+#CacheDir = /var/cache/pacman/pkg/
+#LogFile = /var/log/pacman.log
+#GPGDir = /etc/pacman.d/gnupg/
+#HookDir = /etc/pacman.d/hooks/
+HoldPkg = pacman glibc
+#XferCommand = /usr/bin/curl -C - -f %u > %o
+#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
+#CleanMethod = KeepInstalled
+#UseDelta = 0.7
+Architecture = auto
+
+# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
+#IgnorePkg =
+#IgnoreGroup =
+
+#NoUpgrade =
+#NoExtract =
+
+# Misc options
+#UseSyslog
+#Color
+#NoProgressBar
+# We cannot check disk space from within a chroot environment
+#CheckSpace
+#VerbosePkgLists
+ParallelDownloads = 5
+
+# By default, pacman accepts packages signed by keys that its local keyring
+# trusts (see pacman-key and its man page), as well as unsigned packages.
+SigLevel = Required DatabaseOptional
+LocalFileSigLevel = Optional
+#RemoteFileSigLevel = Required
+
+# NOTE: You must run `pacman-key --init` before first using pacman; the local
+# keyring can then be populated with the keys of all Arch/Parabola packagers
+# with `pacman-key --populate archlinux` and `pacman-key --populate parabola`.
+
+#
+# REPOSITORIES
+# - can be defined here or included from another file
+# - pacman will search repositories in the order defined here
+# - local/custom mirrors can be added here or in separate files
+# - repositories listed first will take precedence when packages
+# have identical names, regardless of version number
+# - URLs will have $repo replaced by the name of the current repo
+# - URLs will have $arch replaced by the name of the architecture
+#
+# Repository entries are of the format:
+# [repo-name]
+# Server = ServerName
+# Include = IncludePath
+#
+# The header [repo-name] is crucial - it must be present and
+# uncommented to enable the repo.
+#
+
+# The testing repositories are disabled by default. To enable, uncomment the
+# repo name header and Include lines. You can add preferred servers immediately
+# after the header, and they will be used before the default mirrors.
+
+#[libre-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+[libre]
+Include = /etc/pacman.d/mirrorlist
+
+[core]
+Include = /etc/pacman.d/mirrorlist
+
+[extra]
+Include = /etc/pacman.d/mirrorlist
+
+#[pcr-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+[pcr]
+Include = /etc/pacman.d/mirrorlist
+
+# If you want to run 32 bit applications on your x86_64 system,
+# enable the libre-multilib, multilib and pcr-multilib repositories as required here.
+
+#[libre-multilib-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+#[libre-multilib]
+#Include = /etc/pacman.d/mirrorlist
+
+#[multilib-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+#[multilib]
+#Include = /etc/pacman.d/mirrorlist
+
+#[pcr-multilib-testing]
+#Include = /etc/pacman.d/mirrorlist
+
+#[pcr-multilib]
+#Include = /etc/pacman.d/mirrorlist
+
+# An example of a custom package repository. See the pacman manpage for
+# tips on creating your own repositories.
+#[custom]
+#SigLevel = Optional TrustAll
+#Server = file:///home/custompkgs
diff --git a/baseline/profiledef.sh b/baseline/profiledef.sh
new file mode 100644
index 0000000..7738365
--- /dev/null
+++ b/baseline/profiledef.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+# shellcheck disable=SC2034
+
+iso_name="parabola-baseline"
+iso_label="PARA_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
+iso_publisher="Parabola GNU/Linux-libre <https://parabola.nu>"
+iso_application="Parabola GNU/Linux-libre baseline"
+iso_version="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y.%m.%d)"
+install_dir="parabola"
+buildmodes=('iso')
+bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
+ 'uefi-ia32.grub.esp' 'uefi-x64.grub.esp'
+ 'uefi-ia32.grub.eltorito' 'uefi-x64.grub.eltorito')
+arch="x86_64"
+pacman_conf="pacman.conf"
+airootfs_image_type="erofs"
+airootfs_image_tool_options=('-zlzma,109' -E 'ztailpacking,fragments,dedupe')
+file_permissions=(
+ ["/etc/shadow"]="0:0:400"
+)
diff --git a/baseline/replace.txt b/baseline/replace.txt
new file mode 100644
index 0000000..85d07b5
--- /dev/null
+++ b/baseline/replace.txt
@@ -0,0 +1,9 @@
+airootfs/etc/mkinitcpio.d/linux.preset:airootfs/etc/mkinitcpio.d/linux-libre.preset
+efiboot/loader/entries/01-archiso-x86_64-linux.conf
+grub/grub.cfg
+grub/loopback.cfg
+packages.x86_64
+pacman.conf
+profiledef.sh
+syslinux/syslinux.cfg
+syslinux/syslinux-linux.cfg:syslinux/syslinux-linux-libre.cfg
diff --git a/baseline/syslinux/syslinux-linux-libre.cfg b/baseline/syslinux/syslinux-linux-libre.cfg
new file mode 100644
index 0000000..2d10b2f
--- /dev/null
+++ b/baseline/syslinux/syslinux-linux-libre.cfg
@@ -0,0 +1,5 @@
+LABEL parabola
+MENU LABEL Parabola GNU/Linux-libre (x86_64, BIOS)
+LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-libre
+INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-libre.img
+APPEND archisobasedir=%INSTALL_DIR% archisodevice=UUID=%ARCHISO_UUID%
diff --git a/baseline/syslinux/syslinux.cfg b/baseline/syslinux/syslinux.cfg
new file mode 100644
index 0000000..8e419f6
--- /dev/null
+++ b/baseline/syslinux/syslinux.cfg
@@ -0,0 +1,9 @@
+SERIAL 0 115200
+UI menu.c32
+MENU TITLE Parabola GNU/Linux-libre
+MENU CLEAR
+
+DEFAULT parabola
+TIMEOUT 30
+
+INCLUDE syslinux-linux-libre.cfg