From 765756ae126d57735c22d59a7c1242f01443921e Mon Sep 17 00:00:00 2001 From: David P Date: Wed, 16 May 2018 21:08:49 -0400 Subject: modify entire source according to archiso32 and remove unused configs/talkingparabola-X11 Signed-off-by: David P --- configs/talkingparabola/airootfs/etc/fstab | 0 configs/talkingparabola/airootfs/etc/hostname | 1 + configs/talkingparabola/airootfs/etc/locale.conf | 1 + configs/talkingparabola/airootfs/etc/motd | 14 ++ configs/talkingparabola/airootfs/etc/pam.d/su | 6 + .../talkingparabola/airootfs/etc/sudoers.d/g_wheel | 1 + .../airootfs/etc/systemd/scripts/choose-mirror | 26 +++ .../etc/systemd/system/choose-mirror.service | 10 ++ .../etc/systemd/system/etc-pacman.d-gnupg.mount | 8 + .../system/getty@tty1.service.d/autologin.conf | 3 + .../etc/systemd/system/livecd-alsa-unmuter.service | 15 ++ .../etc/systemd/system/pacman-init.service | 16 ++ .../airootfs/etc/udev/rules.d/81-dhcpcd.rules | 1 + .../airootfs/root/customize_airootfs.sh | 29 +++ configs/talkingparabola/airootfs/root/install.txt | 2 + .../airootfs/usr/bin/livecd-alsa-unmuter | 8 + .../talkingparabola/airootfs/usr/bin/pick-a-card | 54 ++++++ .../talkingparabola/airootfs/usr/bin/talk-to-me | 10 ++ .../airootfs/usr/share/livecd-sound/asound.conf.in | 12 ++ .../airootfs/usr/share/livecd-sound/functions | 199 +++++++++++++++++++++ configs/talkingparabola/aitab | 3 - configs/talkingparabola/build.sh | 149 ++++++++------- configs/talkingparabola/mkinitcpio.conf | 3 +- configs/talkingparabola/root-image/etc/fstab | 0 configs/talkingparabola/root-image/etc/hostname | 1 - configs/talkingparabola/root-image/etc/locale.conf | 1 - configs/talkingparabola/root-image/etc/motd | 14 -- configs/talkingparabola/root-image/etc/pam.d/su | 6 - .../root-image/etc/sudoers.d/g_wheel | 1 - .../root-image/etc/systemd/scripts/choose-mirror | 26 --- .../etc/systemd/system/choose-mirror.service | 10 -- .../etc/systemd/system/etc-pacman.d-gnupg.mount | 8 - .../system/getty@tty1.service.d/autologin.conf | 3 - .../etc/systemd/system/livecd-alsa-unmuter.service | 15 -- .../etc/systemd/system/pacman-init.service | 16 -- .../root-image/etc/udev/rules.d/81-dhcpcd.rules | 1 - .../root-image/root/customize_root_image.sh | 22 --- .../talkingparabola/root-image/root/network.html | 191 -------------------- .../root-image/usr/bin/livecd-alsa-unmuter | 8 - .../talkingparabola/root-image/usr/bin/pick-a-card | 54 ------ .../talkingparabola/root-image/usr/bin/talk-to-me | 10 -- .../usr/share/livecd-sound/asound.conf.in | 12 -- .../root-image/usr/share/livecd-sound/functions | 199 --------------------- 43 files changed, 507 insertions(+), 662 deletions(-) create mode 100644 configs/talkingparabola/airootfs/etc/fstab create mode 100644 configs/talkingparabola/airootfs/etc/hostname create mode 100644 configs/talkingparabola/airootfs/etc/locale.conf create mode 100644 configs/talkingparabola/airootfs/etc/motd create mode 100644 configs/talkingparabola/airootfs/etc/pam.d/su create mode 100644 configs/talkingparabola/airootfs/etc/sudoers.d/g_wheel create mode 100755 configs/talkingparabola/airootfs/etc/systemd/scripts/choose-mirror create mode 100644 configs/talkingparabola/airootfs/etc/systemd/system/choose-mirror.service create mode 100644 configs/talkingparabola/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount create mode 100644 configs/talkingparabola/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf create mode 100644 configs/talkingparabola/airootfs/etc/systemd/system/livecd-alsa-unmuter.service create mode 100644 configs/talkingparabola/airootfs/etc/systemd/system/pacman-init.service create mode 100644 configs/talkingparabola/airootfs/etc/udev/rules.d/81-dhcpcd.rules create mode 100755 configs/talkingparabola/airootfs/root/customize_airootfs.sh create mode 100644 configs/talkingparabola/airootfs/root/install.txt create mode 100755 configs/talkingparabola/airootfs/usr/bin/livecd-alsa-unmuter create mode 100755 configs/talkingparabola/airootfs/usr/bin/pick-a-card create mode 100755 configs/talkingparabola/airootfs/usr/bin/talk-to-me create mode 100644 configs/talkingparabola/airootfs/usr/share/livecd-sound/asound.conf.in create mode 100644 configs/talkingparabola/airootfs/usr/share/livecd-sound/functions delete mode 100644 configs/talkingparabola/aitab delete mode 100644 configs/talkingparabola/root-image/etc/fstab delete mode 100644 configs/talkingparabola/root-image/etc/hostname delete mode 100644 configs/talkingparabola/root-image/etc/locale.conf delete mode 100644 configs/talkingparabola/root-image/etc/motd delete mode 100644 configs/talkingparabola/root-image/etc/pam.d/su delete mode 100644 configs/talkingparabola/root-image/etc/sudoers.d/g_wheel delete mode 100755 configs/talkingparabola/root-image/etc/systemd/scripts/choose-mirror delete mode 100644 configs/talkingparabola/root-image/etc/systemd/system/choose-mirror.service delete mode 100644 configs/talkingparabola/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount delete mode 100644 configs/talkingparabola/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf delete mode 100644 configs/talkingparabola/root-image/etc/systemd/system/livecd-alsa-unmuter.service delete mode 100644 configs/talkingparabola/root-image/etc/systemd/system/pacman-init.service delete mode 100644 configs/talkingparabola/root-image/etc/udev/rules.d/81-dhcpcd.rules delete mode 100755 configs/talkingparabola/root-image/root/customize_root_image.sh delete mode 100644 configs/talkingparabola/root-image/root/network.html delete mode 100755 configs/talkingparabola/root-image/usr/bin/livecd-alsa-unmuter delete mode 100755 configs/talkingparabola/root-image/usr/bin/pick-a-card delete mode 100755 configs/talkingparabola/root-image/usr/bin/talk-to-me delete mode 100644 configs/talkingparabola/root-image/usr/share/livecd-sound/asound.conf.in delete mode 100644 configs/talkingparabola/root-image/usr/share/livecd-sound/functions (limited to 'configs/talkingparabola') diff --git a/configs/talkingparabola/airootfs/etc/fstab b/configs/talkingparabola/airootfs/etc/fstab new file mode 100644 index 0000000..e69de29 diff --git a/configs/talkingparabola/airootfs/etc/hostname b/configs/talkingparabola/airootfs/etc/hostname new file mode 100644 index 0000000..8aaf41b --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/hostname @@ -0,0 +1 @@ +parabolaiso diff --git a/configs/talkingparabola/airootfs/etc/locale.conf b/configs/talkingparabola/airootfs/etc/locale.conf new file mode 100644 index 0000000..01ec548 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/locale.conf @@ -0,0 +1 @@ +LANG=en_US.UTF-8 diff --git a/configs/talkingparabola/airootfs/etc/motd b/configs/talkingparabola/airootfs/etc/motd new file mode 100644 index 0000000..e4c893c --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/motd @@ -0,0 +1,14 @@ + +=============================================================================== + + Parabola GNU/Linux-libre live media _DATE_ + + To install Parabola, the system must be connected to the internet. + For instructions, enter this command: + less install.txt + + Press the function keys while holding Alt to switch virtual terminals. + This allows entering commands without closing less. + +=============================================================================== + diff --git a/configs/talkingparabola/airootfs/etc/pam.d/su b/configs/talkingparabola/airootfs/etc/pam.d/su new file mode 100644 index 0000000..a291042 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/pam.d/su @@ -0,0 +1,6 @@ +#%PAM-1.0 +auth sufficient pam_rootok.so +auth sufficient pam_wheel.so trust use_uid +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so diff --git a/configs/talkingparabola/airootfs/etc/sudoers.d/g_wheel b/configs/talkingparabola/airootfs/etc/sudoers.d/g_wheel new file mode 100644 index 0000000..8c45359 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/sudoers.d/g_wheel @@ -0,0 +1 @@ +%wheel ALL=(ALL) NOPASSWD: ALL diff --git a/configs/talkingparabola/airootfs/etc/systemd/scripts/choose-mirror b/configs/talkingparabola/airootfs/etc/systemd/scripts/choose-mirror new file mode 100755 index 0000000..13c9f69 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/systemd/scripts/choose-mirror @@ -0,0 +1,26 @@ +#!/bin/bash + +get_cmdline() { + local param + for param in $(< /proc/cmdline); do + case "${param}" in + $1=*) echo "${param##*=}"; + return 0 + ;; + esac + done +} + +mirror=$(get_cmdline mirror) +[[ $mirror = auto ]] && mirror=$(get_cmdline parabolaiso_http_srv) +[[ $mirror ]] || exit 0 + +mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig +cat >/etc/pacman.d/mirrorlist << EOF +# +# Parabola GNU/Linux-libre repository mirrorlist +# Generated by parabolaiso +# + +Server = ${mirror%%/}/\$repo/os/\$arch +EOF diff --git a/configs/talkingparabola/airootfs/etc/systemd/system/choose-mirror.service b/configs/talkingparabola/airootfs/etc/systemd/system/choose-mirror.service new file mode 100644 index 0000000..1e4d771 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/systemd/system/choose-mirror.service @@ -0,0 +1,10 @@ +[Unit] +Description=Choose mirror from the kernel command line +ConditionKernelCommandLine=mirror + +[Service] +Type=oneshot +ExecStart=/etc/systemd/scripts/choose-mirror + +[Install] +WantedBy=multi-user.target diff --git a/configs/talkingparabola/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount b/configs/talkingparabola/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount new file mode 100644 index 0000000..4eab551 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount @@ -0,0 +1,8 @@ +[Unit] +Description=Temporary /etc/pacman.d/gnupg directory + +[Mount] +What=tmpfs +Where=/etc/pacman.d/gnupg +Type=tmpfs +Options=mode=0755 diff --git a/configs/talkingparabola/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf b/configs/talkingparabola/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf new file mode 100644 index 0000000..d1d8474 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux diff --git a/configs/talkingparabola/airootfs/etc/systemd/system/livecd-alsa-unmuter.service b/configs/talkingparabola/airootfs/etc/systemd/system/livecd-alsa-unmuter.service new file mode 100644 index 0000000..e3b9073 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/systemd/system/livecd-alsa-unmuter.service @@ -0,0 +1,15 @@ +[Unit] +Description=Unmute All Sound Card Controls For Use With The Live TalkingParabola Environment +# This needs to run after the audio device becomes available. +Wants=systemd-udev-settle.service +After=systemd-udev-settle.service sound.target +DefaultDependencies=no +Before=shutdown.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/livecd-alsa-unmuter +StandardOutput=syslog + +[Install] +WantedBy=sound.target diff --git a/configs/talkingparabola/airootfs/etc/systemd/system/pacman-init.service b/configs/talkingparabola/airootfs/etc/systemd/system/pacman-init.service new file mode 100644 index 0000000..3414ebc --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/systemd/system/pacman-init.service @@ -0,0 +1,16 @@ +[Unit] +Description=Initializes Pacman keyring +Wants=haveged.service +After=haveged.service +Requires=etc-pacman.d-gnupg.mount +After=etc-pacman.d-gnupg.mount + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/pacman-key --init +ExecStart=/usr/bin/pacman-key --populate archlinux +ExecStart=/usr/bin/pacman-key --populate parabola + +[Install] +WantedBy=multi-user.target diff --git a/configs/talkingparabola/airootfs/etc/udev/rules.d/81-dhcpcd.rules b/configs/talkingparabola/airootfs/etc/udev/rules.d/81-dhcpcd.rules new file mode 100644 index 0000000..970da69 --- /dev/null +++ b/configs/talkingparabola/airootfs/etc/udev/rules.d/81-dhcpcd.rules @@ -0,0 +1 @@ +ACTION=="add", SUBSYSTEM=="net", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service" diff --git a/configs/talkingparabola/airootfs/root/customize_airootfs.sh b/configs/talkingparabola/airootfs/root/customize_airootfs.sh new file mode 100755 index 0000000..8767d11 --- /dev/null +++ b/configs/talkingparabola/airootfs/root/customize_airootfs.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e -u + +sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen +locale-gen + +ln -sf /usr/share/zoneinfo/UTC /etc/localtime + +usermod -s /usr/bin/zsh root +cp -aT /etc/skel/ /root/ + +useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /usr/bin/zsh parabola + +chmod 750 /etc/sudoers.d +chmod 440 /etc/sudoers.d/g_wheel + +sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config +sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist +sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf + +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 + +systemctl enable multi-user.target pacman-init.service choose-mirror.service livecd-alsa-unmuter.service brltty.service +systemctl set-default multi-user.target + +sed -i "s/_DATE_/$(date +%Y.%m.%d)/" /etc/motd diff --git a/configs/talkingparabola/airootfs/root/install.txt b/configs/talkingparabola/airootfs/root/install.txt new file mode 100644 index 0000000..a594b97 --- /dev/null +++ b/configs/talkingparabola/airootfs/root/install.txt @@ -0,0 +1,2 @@ +View this installation guide online at +https://wiki.parabola.nu/Installation_Guide diff --git a/configs/talkingparabola/airootfs/usr/bin/livecd-alsa-unmuter b/configs/talkingparabola/airootfs/usr/bin/livecd-alsa-unmuter new file mode 100755 index 0000000..6de05a0 --- /dev/null +++ b/configs/talkingparabola/airootfs/usr/bin/livecd-alsa-unmuter @@ -0,0 +1,8 @@ +#!/bin/bash + +# Properly initialize the sound card so that we have audio at boot. +# This script is released under the GNU General Public License. +source /usr/share/livecd-sound/functions + +preinit_levels all +sanify_levels all diff --git a/configs/talkingparabola/airootfs/usr/bin/pick-a-card b/configs/talkingparabola/airootfs/usr/bin/pick-a-card new file mode 100755 index 0000000..7f469e8 --- /dev/null +++ b/configs/talkingparabola/airootfs/usr/bin/pick-a-card @@ -0,0 +1,54 @@ +#!/bin/bash + +# If there are multiple usable sound cards, prompt the user to choose one, +# using auditory feedback. +# This script is released under the GNU General Public License. + +source /usr/share/livecd-sound/functions + +nwords() { + echo $# +} + +is_numeric() { + local str=$1 + expr match "$str" '[[:digit:]]\+$' > /dev/null 2>&1 +} + +set_default_card() { + local card=$1 + sed -e "s/%card%/$card/g" < /usr/share/livecd-sound/asound.conf.in \ + > /etc/asound.conf +} + +play_on_card() { + local card=$1 file=$2 + aplay "-Dplughw:$card,0" "$file" +} + +set -f +usable_cards="$(list_non_pcsp_cards)" +num_usable_cards=$(nwords $usable_cards) + +if [ "$num_usable_cards" -eq 1 ]; then + exit 0 +fi + +for card in $usable_cards; do + if ! is_numeric "$card"; then + continue + fi + play_on_card "$card" /usr/share/livecd-sound/sounds/pick-a-card.wav& +done +wait +sleep 1 +for card in $usable_cards; do + if ! is_numeric "$card"; then + continue + fi + play_on_card "$card" /usr/share/livecd-sound/sounds/beep.wav + if read -t 10; then + set_default_card "$card" + break + fi +done diff --git a/configs/talkingparabola/airootfs/usr/bin/talk-to-me b/configs/talkingparabola/airootfs/usr/bin/talk-to-me new file mode 100755 index 0000000..73998d8 --- /dev/null +++ b/configs/talkingparabola/airootfs/usr/bin/talk-to-me @@ -0,0 +1,10 @@ +#!/bin/sh +started_flag=/run/speech-is-running +if [ -f $started_flag ]; then + exit 0 +fi +systemctl stop espeakup +sleep 5 +pick-a-card +systemctl start espeakup +touch $started_flag diff --git a/configs/talkingparabola/airootfs/usr/share/livecd-sound/asound.conf.in b/configs/talkingparabola/airootfs/usr/share/livecd-sound/asound.conf.in new file mode 100644 index 0000000..851f829 --- /dev/null +++ b/configs/talkingparabola/airootfs/usr/share/livecd-sound/asound.conf.in @@ -0,0 +1,12 @@ +pcm.!default { + type plug + slave.pcm { + type hw + card %card% + } +} + +ctl.!default { + type hw + card %card% +} diff --git a/configs/talkingparabola/airootfs/usr/share/livecd-sound/functions b/configs/talkingparabola/airootfs/usr/share/livecd-sound/functions new file mode 100644 index 0000000..e517795 --- /dev/null +++ b/configs/talkingparabola/airootfs/usr/share/livecd-sound/functions @@ -0,0 +1,199 @@ +# Functions for setting up sound on the live CD. +# This library is released under the GNU General Public License, +# and it incorporates code from the /etc/init.d/alsa-utils included with +# Ubuntu 8.04. Proper credit also goes to Debian. + +# Start code copied from Debian / Ubuntu: + +bugout () { + printf "/etc/rc.d/livecdsound: programming error" + stat_fail +} + +echo_card_indices() +{ + if [ -f /proc/asound/cards ] ; then + sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards + fi +} + +filter_amixer_output() +{ + sed \ + -e '/Unable to find simple control/d' \ + -e '/Unknown playback setup/d' \ + -e '/^$/d' +} + +# The following functions try to set many controls. +# No card has all the controls and so some of the attempts are bound to fail. +# Because of this, the functions can't return useful status values. + +# $1 +# $2 +# $CARDOPT +unmute_and_set_level() +{ + { [ "$2" ] && [ "$CARDOPT" ] ; } || bugout + amixer $CARDOPT -q set "$1" "$2" unmute 2>&1 | filter_amixer_output || : + return 0 +} + +# $1 +# $CARDOPT +mute_and_zero_level() +{ + { [ "$1" ] && [ "$CARDOPT" ] ; } || bugout + amixer $CARDOPT -q set "$1" "0%" mute 2>&1 | filter_amixer_output || : + return 0 +} + +# $1 +# $2 "on" | "off" +# $CARDOPT +switch_control() +{ + { [ "$2" ] && [ "$CARDOPT" ] ; } || bugout + amixer $CARDOPT -q set "$1" "$2" 2>&1 | filter_amixer_output || : + return 0 +} + +# $1 +sanify_levels_on_card() +{ + CARDOPT="-c $1" + + unmute_and_set_level "Front" "80%" + unmute_and_set_level "Master" "80%" + unmute_and_set_level "Master Mono" "80%" + unmute_and_set_level "Master Digital" "80%" # E.g., cs4237B + unmute_and_set_level "Playback" "80%" + unmute_and_set_level "Headphone" "100%" + unmute_and_set_level "PCM" "80%" + unmute_and_set_level "PCM,1" "80%" # E.g., ess1969 + unmute_and_set_level "DAC" "80%" # E.g., envy24, cs46xx + unmute_and_set_level "DAC,0" "80%" # E.g., envy24 + unmute_and_set_level "DAC,1" "80%" # E.g., envy24 + unmute_and_set_level "Synth" "80%" + unmute_and_set_level "CD" "80%" + unmute_and_set_level "PC Speaker" "100%" + + mute_and_zero_level "Mic" + mute_and_zero_level "IEC958" # Ubuntu #19648 + + # Intel P4P800-MX + switch_control "Master Playback Switch" on + switch_control "Master Surround" on + + # Trident/YMFPCI/emu10k1: + unmute_and_set_level "Wave" "80%" + unmute_and_set_level "Music" "80%" + unmute_and_set_level "AC97" "80%" + + # DRC: + unmute_and_set_level "Dynamic Range Compression" "80%" + + # Required for HDA Intel (hda-intel): + unmute_and_set_level "Front" "80%" + + # Required for SB Live 7.1/24-bit (ca0106): + unmute_and_set_level "Analog Front" "80%" + + # Required at least for Via 823x hardware on DFI K8M800-MLVF Motherboard + switch_control "IEC958 Capture Monitor" off + + # Required for hardware allowing toggles for AC97 through IEC958, + # valid values are 0, 1, 2, 3. Needs to be set to 0 for PCM1. + unmute_and_set_level "IEC958 Playback AC97-SPSA" "0" + + # Required for newer Via hardware + unmute_and_set_level "VIA DXS,0" "80%" + unmute_and_set_level "VIA DXS,1" "80%" + unmute_and_set_level "VIA DXS,2" "80%" + unmute_and_set_level "VIA DXS,3" "80%" + + # Required on some notebooks with ICH4: + switch_control "Headphone Jack Sense" off + switch_control "Line Jack Sense" off + + # Some machines need one or more of these to be on; + # others need one or more of these to be off: + # + # switch_control "External Amplifier" on + switch_control "Audigy Analog/Digital Output Jack" on + switch_control "SB Live Analog/Digital Output Jack" on + + # D1984 -- Thinkpad T61/X61 + switch_control "Speaker" on + switch_control "Headphone" on + + # HDA-Intel w/ "Digital" capture mixer (See Ubuntu #193823) + unmute_and_set_level "Digital" "80%" + + return 0 +} + +# $1 | "all" +sanify_levels() +{ + TTSDML_RETURNSTATUS=0 + case "$1" in + all) + for CARD in $(echo_card_indices) ; do + sanify_levels_on_card "$CARD" || TTSDML_RETURNSTATUS=1 + done + ;; + *) + sanify_levels_on_card "$1" || TTSDML_RETURNSTATUS=1 + ;; + esac + return $TTSDML_RETURNSTATUS +} + +# $1 +preinit_levels_on_card() +{ + CARDOPT="-c $1" + + # Silly dance to activate internal speakers by default on PowerMac + # Snapper and Tumbler + id=`cat /proc/asound/card$1/id 2>/dev/null` + if [ "$id" = "Snapper" -o "$id" = "Tumbler" ]; then + switch_control "Auto Mute" off + switch_control "PC Speaker" off + switch_control "Auto Mute" on + fi +} + +# $1 | "all" +preinit_levels() +{ + TTSDML_RETURNSTATUS=0 + case "$1" in + all) + for CARD in $(echo_card_indices) ; do + preinit_levels_on_card "$CARD" || TTSDML_RETURNSTATUS=1 + done + ;; + *) + preinit_levels_on_card "$1" || TTSDML_RETURNSTATUS=1 + ;; + esac + return $TTSDML_RETURNSTATUS +} + +# End copied code. + +# List all cards that *should* be usable for PCM audio. In my experience, +# the console speaker (handled by the pcsp driver) isn't a suitable playback +# device, so we'll exclude it. +list_non_pcsp_cards() +{ + for card in $(echo_card_indices); do + local cardfile="/proc/asound/card${card}/id" + if [ -r "$cardfile" -a -f "$cardfile" ] && \ + [ "$(cat "$cardfile")" != pcsp ]; then + echo "$card" + fi + done +} diff --git a/configs/talkingparabola/aitab b/configs/talkingparabola/aitab deleted file mode 100644 index b7e9a17..0000000 --- a/configs/talkingparabola/aitab +++ /dev/null @@ -1,3 +0,0 @@ -# -root-image / i686 xz ext4 50% -root-image / x86_64 xz ext4 50% diff --git a/configs/talkingparabola/build.sh b/configs/talkingparabola/build.sh index 80caa2c..7432e6e 100755 --- a/configs/talkingparabola/build.sh +++ b/configs/talkingparabola/build.sh @@ -8,13 +8,19 @@ iso_version=$(date +%Y.%m.%d) install_dir=parabola work_dir=work out_dir=out -data_dir=/usr/share/parabolaiso/data +gpg_key= arch=$(uname -m) verbose="" -pacman_conf=${work_dir}/pacman.conf script_path=$(readlink -f ${0%/*}) -initcpio_dir=${script_path}/../../parabolaiso/initcpio + +# Init system. Options are: +# - openrc +# - runit +# - systemd +# +# Default is systemd +init=systemd _usage () { @@ -46,56 +52,76 @@ run_once() { fi } -# Setup custom pacman.conf with current cache directories. +# Setup custom pacman.conf with current cache directories and custom mirrorlist. make_pacman_conf() { local _cache_dirs _cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) - sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${script_path}/pacman.conf > ${pacman_conf} + sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${script_path}/pacman.conf > ${work_dir}/pacman.conf } -# Base installation, plus needed packages (root-image) +# Base installation, plus needed packages (airootfs) make_basefs() { - setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${pacman_conf}" -D "${install_dir}" init - setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${pacman_conf}" -D "${install_dir}" -p "memtest86+ mkinitcpio-nfs-utils nbd" install + setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -i "${init}" init + setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -i "${init}" -p "haveged memtest86+ mkinitcpio-nfs-utils nbd zsh" install } -# Additional packages (root-image) +# Additional packages (airootfs) make_packages() { - setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${pacman_conf}" -D "${install_dir}" -p "$(grep -h -v ^# ${script_path}/packages.{both,${arch}})" install + setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "$(grep -h -v ^# ${script_path}/packages.{both,${arch}})" install +} + +# Needed packages for x86_64 EFI boot +make_packages_efi() { + setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "efitools" install } -# Copy mkinitcpio parabolaiso hooks and build initramfs (root-image) +# Copy mkinitcpio parabolaiso hooks and build initramfs (airootfs) make_setup_mkinitcpio() { local _hook + mkdir -p ${work_dir}/${arch}/airootfs/etc/initcpio/hooks + mkdir -p ${work_dir}/${arch}/airootfs/etc/initcpio/install for _hook in parabolaiso parabolaiso_shutdown parabolaiso_pxe_common parabolaiso_pxe_nbd parabolaiso_pxe_http parabolaiso_pxe_nfs parabolaiso_loop_mnt; do - cp ${initcpio_dir}/hooks/${_hook} ${work_dir}/${arch}/root-image/usr/lib/initcpio/hooks - cp ${initcpio_dir}/install/${_hook} ${work_dir}/${arch}/root-image/usr/lib/initcpio/install + cp /usr/lib/initcpio/hooks/${_hook} ${work_dir}/${arch}/airootfs/etc/initcpio/hooks + cp /usr/lib/initcpio/install/${_hook} ${work_dir}/${arch}/airootfs/etc/initcpio/install done - cp ${initcpio_dir}/install/parabolaiso_kms ${work_dir}/${arch}/root-image/usr/lib/initcpio/install - cp ${initcpio_dir}/hooks/parabolaiso_shutdown ${work_dir}/${arch}/root-image/usr/lib/initcpio - cp ${script_path}/mkinitcpio.conf ${work_dir}/${arch}/root-image/etc/mkinitcpio-parabolaiso.conf - setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${pacman_conf}" -D "${install_dir}" -r 'mkinitcpio -c /etc/mkinitcpio-parabolaiso.conf -k /boot/vmlinuz-linux-libre -g /boot/parabolaiso.img' run + sed -i "s|/usr/lib/initcpio/|/etc/initcpio/|g" ${work_dir}/${arch}/airootfs/etc/initcpio/install/parabolaiso_shutdown + cp /usr/lib/initcpio/install/parabolaiso_kms ${work_dir}/${arch}/airootfs/etc/initcpio/install + cp /usr/lib/initcpio/parabolaiso_shutdown ${work_dir}/${arch}/airootfs/etc/initcpio + cp ${script_path}/mkinitcpio.conf ${work_dir}/${arch}/airootfs/etc/mkinitcpio-parabolaiso.conf + gnupg_fd= + if [[ ${gpg_key} ]]; then + gpg --export ${gpg_key} >${work_dir}/gpgkey + exec 17<>${work_dir}/gpgkey + fi + PARABOLAISO_GNUPG_FD=${gpg_key:+17} setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -r 'mkinitcpio -c /etc/mkinitcpio-parabolaiso.conf -k /boot/vmlinuz-linux-libre -g /boot/parabolaiso.img' run + if [[ ${gpg_key} ]]; then + exec 17<&- + fi } -# Customize installation (root-image) -make_customize_root_image() { - cp -af ${script_path}/root-image ${work_dir}/${arch} +# Customize installation (airootfs) +make_customize_airootfs() { + cp -af ${script_path}/airootfs ${work_dir}/${arch} + + curl -o ${work_dir}/${arch}/airootfs/etc/pacman.d/mirrorlist 'https://www.parabola.nu/mirrorlist/?country=all&protocol=http&use_mirror_status=on' - iso_version="${iso_version}" setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${pacman_conf}" -D "${install_dir}" -r '/root/customize_root_image.sh' run - rm ${work_dir}/${arch}/root-image/root/customize_root_image.sh + lynx -dump -nolist 'https://wiki.parabola.nu/index.php/Installation_Guide?action=render' >> ${work_dir}/${arch}/airootfs/root/install.txt + + setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -r '/root/customize_airootfs.sh' run + rm ${work_dir}/${arch}/airootfs/root/customize_airootfs.sh } # Prepare kernel/initramfs ${install_dir}/boot/ make_boot() { mkdir -p ${work_dir}/iso/${install_dir}/boot/${arch} - cp ${work_dir}/${arch}/root-image/boot/parabolaiso.img ${work_dir}/iso/${install_dir}/boot/${arch}/parabolaiso.img - cp ${work_dir}/${arch}/root-image/boot/vmlinuz-linux-libre ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz + cp ${work_dir}/${arch}/airootfs/boot/parabolaiso.img ${work_dir}/iso/${install_dir}/boot/${arch}/parabolaiso.img + cp ${work_dir}/${arch}/airootfs/boot/vmlinuz-linux-libre ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz } # Add other aditional/extra files to ${install_dir}/boot/ make_boot_extra() { - cp ${work_dir}/${arch}/root-image/boot/memtest86+/memtest.bin ${work_dir}/iso/${install_dir}/boot/memtest - cp ${work_dir}/${arch}/root-image/usr/share/licenses/common/GPL2/license.txt ${work_dir}/iso/${install_dir}/boot/memtest.COPYING + cp ${work_dir}/${arch}/airootfs/boot/memtest86+/memtest.bin ${work_dir}/iso/${install_dir}/boot/memtest + cp ${work_dir}/${arch}/airootfs/usr/share/licenses/common/GPL2/license.txt ${work_dir}/iso/${install_dir}/boot/memtest.COPYING } # Prepare /${install_dir}/boot/syslinux @@ -106,27 +132,30 @@ make_syslinux() { s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/iso/${install_dir}/boot/syslinux/${_cfg##*/} done cp ${script_path}/syslinux/splash.png ${work_dir}/iso/${install_dir}/boot/syslinux - cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/*.c32 ${work_dir}/iso/${install_dir}/boot/syslinux - cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/lpxelinux.0 ${work_dir}/iso/${install_dir}/boot/syslinux - cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/memdisk ${work_dir}/iso/${install_dir}/boot/syslinux + cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/*.c32 ${work_dir}/iso/${install_dir}/boot/syslinux + cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/lpxelinux.0 ${work_dir}/iso/${install_dir}/boot/syslinux + cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/memdisk ${work_dir}/iso/${install_dir}/boot/syslinux mkdir -p ${work_dir}/iso/${install_dir}/boot/syslinux/hdt - gzip -c -9 ${work_dir}/${arch}/root-image/usr/share/hwdata/pci.ids > ${work_dir}/iso/${install_dir}/boot/syslinux/hdt/pciids.gz - gzip -c -9 ${work_dir}/${arch}/root-image/usr/lib/modules/*-gnu-*/modules.alias > ${work_dir}/iso/${install_dir}/boot/syslinux/hdt/modalias.gz + gzip -c -9 ${work_dir}/${arch}/airootfs/usr/share/hwdata/pci.ids > ${work_dir}/iso/${install_dir}/boot/syslinux/hdt/pciids.gz + gzip -c -9 ${work_dir}/${arch}/airootfs/usr/lib/modules/*-gnu-*/modules.alias > ${work_dir}/iso/${install_dir}/boot/syslinux/hdt/modalias.gz } # Prepare /isolinux make_isolinux() { mkdir -p ${work_dir}/iso/isolinux sed "s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg - cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/isolinux.bin ${work_dir}/iso/isolinux/ - cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/isohdpfx.bin ${work_dir}/iso/isolinux/ - cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/ldlinux.c32 ${work_dir}/iso/isolinux/ + cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isolinux.bin ${work_dir}/iso/isolinux/ + cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isohdpfx.bin ${work_dir}/iso/isolinux/ + cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/ldlinux.c32 ${work_dir}/iso/isolinux/ } # Prepare /EFI make_efi() { mkdir -p ${work_dir}/iso/EFI/boot - cp ${work_dir}/x86_64/root-image/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/iso/EFI/boot/bootx64.efi + cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/iso/EFI/boot/bootx64.efi + cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/iso/EFI/boot/ + + cp ${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/iso/EFI/boot/loader.efi mkdir -p ${work_dir}/iso/loader/entries cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/iso/loader/ @@ -137,17 +166,17 @@ make_efi() { s|%INSTALL_DIR%|${install_dir}|g" \ ${script_path}/efiboot/loader/entries/parabolaiso-x86_64-usb.conf > ${work_dir}/iso/loader/entries/parabolaiso-x86_64.conf - # EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell ) - cp ${data_dir}/Shell.efi ${work_dir}/iso/EFI/shellx64_v2.efi - # EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell ) - cp ${data_dir}/Shell_Full.efi ${work_dir}/iso/EFI/shellx64_v1.efi + # EFI Shell 2.0 for UEFI 2.3+ + curl -o ${work_dir}/iso/EFI/shellx64_v2.efi https://raw.githubusercontent.com/tianocore/edk2/master/ShellBinPkg/UefiShell/X64/Shell.efi + # EFI Shell 1.0 for non UEFI 2.3+ + curl -o ${work_dir}/iso/EFI/shellx64_v1.efi https://raw.githubusercontent.com/tianocore/edk2/master/EdkShellBinPkg/FullShell/X64/Shell_Full.efi } # Prepare efiboot.img::/EFI for "El Torito" EFI boot mode make_efiboot() { mkdir -p ${work_dir}/iso/EFI/parabolaiso - truncate -s 38M ${work_dir}/iso/EFI/parabolaiso/efiboot.img - mkfs.vfat -n PARABOLAISO_EFI ${work_dir}/iso/EFI/parabolaiso/efiboot.img + truncate -s 64M ${work_dir}/iso/EFI/parabolaiso/efiboot.img + mkfs.fat -n PARABOLAISO_EFI ${work_dir}/iso/EFI/parabolaiso/efiboot.img mkdir -p ${work_dir}/efiboot mount ${work_dir}/iso/EFI/parabolaiso/efiboot.img ${work_dir}/efiboot @@ -157,7 +186,10 @@ make_efiboot() { cp ${work_dir}/iso/${install_dir}/boot/x86_64/parabolaiso.img ${work_dir}/efiboot/EFI/parabolaiso/parabolaiso.img mkdir -p ${work_dir}/efiboot/EFI/boot - cp ${work_dir}/x86_64/root-image/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi + cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi + cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/efiboot/EFI/boot/ + + cp ${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/efiboot/EFI/boot/loader.efi mkdir -p ${work_dir}/efiboot/loader/entries cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/efiboot/loader/ @@ -171,27 +203,20 @@ make_efiboot() { cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/ cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/ - umount ${work_dir}/efiboot -} - -# Copy aitab -make_aitab() { - mkdir -p ${work_dir}/iso/${install_dir} - cp ${script_path}/aitab ${work_dir}/iso/${install_dir}/aitab + umount -d ${work_dir}/efiboot } -# Build all filesystem images specified in aitab (.fs.sfs .sfs) +# Build airootfs filesystem image make_prepare() { - cp -a -l -f ${work_dir}/${arch}/root-image ${work_dir} + cp -a -l -f ${work_dir}/${arch}/airootfs ${work_dir} setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}" -D "${install_dir}" pkglist - setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}" -D "${install_dir}" prepare - rm -rf ${work_dir}/root-image - # rm -rf ${work_dir}/${arch}/root-image (if low space, this helps) + setarch ${arch} mkparabolaiso ${verbose} -w "${work_dir}" -D "${install_dir}" ${gpg_key:+-g ${gpg_key}} prepare + rm -rf ${work_dir}/airootfs + # rm -rf ${work_dir}/${arch}/airootfs (if low space, this helps) } # Build ISO make_iso() { - mkparabolaiso ${verbose} -w "${work_dir}" -D "${install_dir}" checksum mkparabolaiso ${verbose} -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-dual.iso" } @@ -205,7 +230,7 @@ if [[ ${arch} != x86_64 ]]; then _usage 1 fi -while getopts 'N:V:L:D:w:o:vh' arg; do +while getopts 'N:V:L:D:w:o:g:vh' arg; do case "${arg}" in N) iso_name="${OPTARG}" ;; V) iso_version="${OPTARG}" ;; @@ -213,6 +238,7 @@ while getopts 'N:V:L:D:w:o:vh' arg; do D) install_dir="${OPTARG}" ;; w) work_dir="${OPTARG}" ;; o) out_dir="${OPTARG}" ;; + g) gpg_key="${OPTARG}" ;; v) verbose="-v" ;; h) _usage 0 ;; *) @@ -226,12 +252,17 @@ mkdir -p ${work_dir} run_once make_pacman_conf -# Do all stuff for each root-image +# Do all stuff for each airootfs for arch in i686 x86_64; do run_once make_basefs run_once make_packages +done + +run_once make_packages_efi + +for arch in i686 x86_64; do run_once make_setup_mkinitcpio - run_once make_customize_root_image + run_once make_customize_airootfs done for arch in i686 x86_64; do @@ -245,8 +276,6 @@ run_once make_isolinux run_once make_efi run_once make_efiboot -run_once make_aitab - for arch in i686 x86_64; do run_once make_prepare done diff --git a/configs/talkingparabola/mkinitcpio.conf b/configs/talkingparabola/mkinitcpio.conf index 1006d1d..9448579 100644 --- a/configs/talkingparabola/mkinitcpio.conf +++ b/configs/talkingparabola/mkinitcpio.conf @@ -1,2 +1,3 @@ -HOOKS="base udev memdisk parabolaiso_shutdown parabolaiso parabolaiso_loop_mnt parabolaiso_pxe_common parabolaiso_pxe_nbd parabolaiso_pxe_http parabolaiso_pxe_nfs parabolaiso_kms block pcmcia filesystems keyboard" +MODULES="loop" +HOOKS=(base udev memdisk parabolaiso_shutdown parabolaiso parabolaiso_loop_mnt parabolaiso_pxe_common parabolaiso_pxe_nbd parabolaiso_pxe_http parabolaiso_pxe_nfs parabolaiso_kms block pcmcia filesystems keyboard) COMPRESSION="xz" diff --git a/configs/talkingparabola/root-image/etc/fstab b/configs/talkingparabola/root-image/etc/fstab deleted file mode 100644 index e69de29..0000000 diff --git a/configs/talkingparabola/root-image/etc/hostname b/configs/talkingparabola/root-image/etc/hostname deleted file mode 100644 index 8aaf41b..0000000 --- a/configs/talkingparabola/root-image/etc/hostname +++ /dev/null @@ -1 +0,0 @@ -parabolaiso diff --git a/configs/talkingparabola/root-image/etc/locale.conf b/configs/talkingparabola/root-image/etc/locale.conf deleted file mode 100644 index 01ec548..0000000 --- a/configs/talkingparabola/root-image/etc/locale.conf +++ /dev/null @@ -1 +0,0 @@ -LANG=en_US.UTF-8 diff --git a/configs/talkingparabola/root-image/etc/motd b/configs/talkingparabola/root-image/etc/motd deleted file mode 100644 index a126999..0000000 --- a/configs/talkingparabola/root-image/etc/motd +++ /dev/null @@ -1,14 +0,0 @@ - -=============================================================================== - - Parabola live media _DATE_ - - To install Parabola, the system must be connected to the internet. - For instructions, enter this command: - lynx network.html - - Press the function keys while holding Alt to switch virtual terminals. - This allows entering commands without closing lynx. - -=============================================================================== - diff --git a/configs/talkingparabola/root-image/etc/pam.d/su b/configs/talkingparabola/root-image/etc/pam.d/su deleted file mode 100644 index a291042..0000000 --- a/configs/talkingparabola/root-image/etc/pam.d/su +++ /dev/null @@ -1,6 +0,0 @@ -#%PAM-1.0 -auth sufficient pam_rootok.so -auth sufficient pam_wheel.so trust use_uid -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so diff --git a/configs/talkingparabola/root-image/etc/sudoers.d/g_wheel b/configs/talkingparabola/root-image/etc/sudoers.d/g_wheel deleted file mode 100644 index 8c45359..0000000 --- a/configs/talkingparabola/root-image/etc/sudoers.d/g_wheel +++ /dev/null @@ -1 +0,0 @@ -%wheel ALL=(ALL) NOPASSWD: ALL diff --git a/configs/talkingparabola/root-image/etc/systemd/scripts/choose-mirror b/configs/talkingparabola/root-image/etc/systemd/scripts/choose-mirror deleted file mode 100755 index 13c9f69..0000000 --- a/configs/talkingparabola/root-image/etc/systemd/scripts/choose-mirror +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -get_cmdline() { - local param - for param in $(< /proc/cmdline); do - case "${param}" in - $1=*) echo "${param##*=}"; - return 0 - ;; - esac - done -} - -mirror=$(get_cmdline mirror) -[[ $mirror = auto ]] && mirror=$(get_cmdline parabolaiso_http_srv) -[[ $mirror ]] || exit 0 - -mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig -cat >/etc/pacman.d/mirrorlist << EOF -# -# Parabola GNU/Linux-libre repository mirrorlist -# Generated by parabolaiso -# - -Server = ${mirror%%/}/\$repo/os/\$arch -EOF diff --git a/configs/talkingparabola/root-image/etc/systemd/system/choose-mirror.service b/configs/talkingparabola/root-image/etc/systemd/system/choose-mirror.service deleted file mode 100644 index 1e4d771..0000000 --- a/configs/talkingparabola/root-image/etc/systemd/system/choose-mirror.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Choose mirror from the kernel command line -ConditionKernelCommandLine=mirror - -[Service] -Type=oneshot -ExecStart=/etc/systemd/scripts/choose-mirror - -[Install] -WantedBy=multi-user.target diff --git a/configs/talkingparabola/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount b/configs/talkingparabola/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount deleted file mode 100644 index 4eab551..0000000 --- a/configs/talkingparabola/root-image/etc/systemd/system/etc-pacman.d-gnupg.mount +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Temporary /etc/pacman.d/gnupg directory - -[Mount] -What=tmpfs -Where=/etc/pacman.d/gnupg -Type=tmpfs -Options=mode=0755 diff --git a/configs/talkingparabola/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf b/configs/talkingparabola/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf deleted file mode 100644 index d1d8474..0000000 --- a/configs/talkingparabola/root-image/etc/systemd/system/getty@tty1.service.d/autologin.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux diff --git a/configs/talkingparabola/root-image/etc/systemd/system/livecd-alsa-unmuter.service b/configs/talkingparabola/root-image/etc/systemd/system/livecd-alsa-unmuter.service deleted file mode 100644 index e3b9073..0000000 --- a/configs/talkingparabola/root-image/etc/systemd/system/livecd-alsa-unmuter.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Unmute All Sound Card Controls For Use With The Live TalkingParabola Environment -# This needs to run after the audio device becomes available. -Wants=systemd-udev-settle.service -After=systemd-udev-settle.service sound.target -DefaultDependencies=no -Before=shutdown.target - -[Service] -Type=oneshot -ExecStart=/usr/bin/livecd-alsa-unmuter -StandardOutput=syslog - -[Install] -WantedBy=sound.target diff --git a/configs/talkingparabola/root-image/etc/systemd/system/pacman-init.service b/configs/talkingparabola/root-image/etc/systemd/system/pacman-init.service deleted file mode 100644 index 3414ebc..0000000 --- a/configs/talkingparabola/root-image/etc/systemd/system/pacman-init.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Initializes Pacman keyring -Wants=haveged.service -After=haveged.service -Requires=etc-pacman.d-gnupg.mount -After=etc-pacman.d-gnupg.mount - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/bin/pacman-key --init -ExecStart=/usr/bin/pacman-key --populate archlinux -ExecStart=/usr/bin/pacman-key --populate parabola - -[Install] -WantedBy=multi-user.target diff --git a/configs/talkingparabola/root-image/etc/udev/rules.d/81-dhcpcd.rules b/configs/talkingparabola/root-image/etc/udev/rules.d/81-dhcpcd.rules deleted file mode 100644 index 970da69..0000000 --- a/configs/talkingparabola/root-image/etc/udev/rules.d/81-dhcpcd.rules +++ /dev/null @@ -1 +0,0 @@ -ACTION=="add", SUBSYSTEM=="net", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service" diff --git a/configs/talkingparabola/root-image/root/customize_root_image.sh b/configs/talkingparabola/root-image/root/customize_root_image.sh deleted file mode 100755 index 4ff8528..0000000 --- a/configs/talkingparabola/root-image/root/customize_root_image.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -set -e -u - -sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen -locale-gen - -ln -sf /usr/share/zoneinfo/UTC /etc/localtime - -usermod -s /usr/bin/zsh root -cp -aT /etc/skel/ /root/ - -useradd -m -p "" -g users -G "adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel" -s /usr/bin/zsh parabola - -chmod 750 /etc/sudoers.d -chmod 440 /etc/sudoers.d/g_wheel - -sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist - -systemctl enable multi-user.target pacman-init.service choose-mirror.service livecd-alsa-unmuter.service brltty.service - -sed -i "s/_DATE_/${iso_version}/" /etc/motd diff --git a/configs/talkingparabola/root-image/root/network.html b/configs/talkingparabola/root-image/root/network.html deleted file mode 100644 index 057e680..0000000 --- a/configs/talkingparabola/root-image/root/network.html +++ /dev/null @@ -1,191 +0,0 @@ -Online version: https://wiki.parabolagnulinux.org/Start_installing -

Contents

- -
-

Start installing

-

You are now presented with a shell prompt, automatically logged in as root. -

-

Change the language

-
Tip: These are optional for the majority of users. Useful only if you plan on writing in your own language in any of the configuration files, if you use diacritical marks in the Wi-Fi password, or if you would like to receive system messages (e.g. possible errors) in your own language.
-

By default, the keyboard layout is set to us. If you have a non-US keyboard layout, run: -

-
# loadkeys layout
-
-

...where layout can be fr, uk, dvorak, be-latin1, etc. See here for a comprehensive list. -

The font should also be changed, because most languages use more glyphs than the 26 letter English alphabet. Otherwise some foreign characters may show up as white squares or as other symbols. Note that the name is case-sensitive, so please type it exactly as you see it: -

-
# setfont Lat2-Terminus16
-
-

By default, the language is set to English (US). If you would like to change the language for the install process (German, in this example), remove the # in front of the locale you want from /etc/locale.gen, along with English (US). Please choose the UTF-8 entry. -

Use Ctrl+X to exit, and when prompted to save changes, press Y and Enter to use the same filename. -

-
# nano /etc/locale.gen
-
-en_US.UTF-8 UTF-8
-de_DE.UTF-8 UTF-8
-
# locale-gen
-# export LANG=de_DE.UTF-8
-
-

Remember, LAlt+LShift activates and deactivates the keymap. -

-

Establish an internet connection

-
Warning: As of v197, udev no longer assigns network interface names according to the wlanX and ethX naming scheme. If you are coming from a different distribution or are reinstalling Parabola and not aware of the new interface naming style, please do not assume that your wireless interface is named wlan0, or that your wired interface is named eth0. You can use the command ip link to discover the names of your interfaces.
-

The dhcpcd network daemon starts automatically during boot and it will attempt to start a wired connection. Try to ping a server to see if a connection was established. For example, gnu.org: -

-
# ping -c 3 gnu.org
-
PING gnu.org (208.118.235.148) 56(84) bytes of data.
-64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=1 ttl=47 time=183 ms
-64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=2 ttl=47 time=168 ms
-64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=3 ttl=47 time=183 ms
-
---- gnu.org ping statistics ---
-3 packets transmitted, 3 received, 0% packet loss, time 2002ms
-rtt min/avg/max/mdev = 168.131/178.357/183.914/7.248 ms
-

If you get a ping: unknown host error, first check if there is an issue with your cable or wireless signal strength. If not, you will need to set up the network manually, as explained below. Once a connection is established move on to Installation Guide. -

-

Wired

-

Follow this procedure if you need to set up a wired connection via a static IP address. -

First, disable the dhcpcd service which was started automatically at boot: -

-
# systemctl stop dhcpcd.service
-
-

Identify the name of your Ethernet interface. -

-
# ip link
-
-1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
-    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
-2: enp2s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT qlen 1000
-    link/ether 00:11:25:31:69:20 brd ff:ff:ff:ff:ff:ff
-3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT qlen 1000
-    link/ether 01:02:03:04:05:06 brd ff:ff:ff:ff:ff:ff
-

In this example, the Ethernet interface is enp2s0f0. If you are unsure, your Ethernet interface is likely to start with the letter "e", and unlikely to be "lo" or start with the letter "w". You can also use iwconfig and see which interfaces are not wireless: -

-
# iwconfig
-
enp2s0f0  no wireless extensions.
-wlp3s0    IEEE 802.11bgn  ESSID:"NETGEAR97"
-          Mode:Managed  Frequency:2.427 GHz  Access Point: 2C:B0:5D:9C:72:BF
-          Bit Rate=65 Mb/s   Tx-Power=16 dBm
-          Retry  long limit:7   RTS thr:off   Fragment thr:off
-          Power Management:on
-          Link Quality=61/70  Signal level=-49 dBm
-          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
-          Tx excessive retries:0  Invalid misc:430   Missed beacon:0
-lo        no wireless extensions.
-

In this example, neither enp2s0f0 nor the loopback device have wireless extensions, meaning enp2s0f0 is our Ethernet interface. -

You also need to know these settings: -

-
  • Static IP address. -
  • Subnet mask. -
  • Gateway's IP address. -
  • Name servers' (DNS) IP addresses. -
  • Domain name (unless you are on a local LAN, in which case you can make it up). -
-

Activate the connected Ethernet interface (e.g. enp2s0f0): -

-
# ip link set enp2s0f0 up
-
-

Add the address: -

-
# ip addr add ip_address/subnetmask dev interface_name
-
-

For example: -

-
# ip addr add 192.168.1.2/24 dev enp2s0f0
-
-

For more options, run man ip. -

Add your gateway like this, substituting your own gateway's IP address: -

-
# ip route add default via ip_address
-
-

For example: -

-
# ip route add default via 192.168.1.1
-
-

Edit resolv.conf, substituting your name servers' IP addresses and your local domain name: -

-
# nano /etc/resolv.conf
-
-nameserver 61.23.173.5
-nameserver 61.95.849.8
-search example.com
-
Note: Currently, you may include a maximum of three nameserver lines. In order to overcome this limitation, you can use a locally caching nameserver like Dnsmasq.
-

You should now have a working network connection. If you do not, check the detailed Network Configuration page. -

-

Wireless

-

Follow this procedure if you need wireless connectivity (Wi-Fi) during the installation process. -

First, identify the name of your wireless interface. -

-
# iw dev
-
phy#0
-        Interface wlp3s0
-                ifindex 3
-                wdev 0x1
-                addr 00:21:6a:5e:52:bc
-                type managed
-

In this example, wlp3s0 is the available wireless interface. If you are unsure, your wireless interface is likely to start with the letter "w", and unlikely to be "lo" or start with the letter "e". -

-
Note: If you do not see output similar to this, then your wireless driver has not been loaded. Please see Wireless Setup for more detailed information.
-

Bring the interface up with: -

-
# ip link set wlp3s0 up
-
-

If you get this error message: SIOCSIFFLAGS: No such file or directory, your wireless chipset could need a non-free firmware to function. This is not supported on Parabola. Please see Wireless Setup if you are unsure if this is the true for your particular chipset. -

Next, use netctl's wifi-menu to connect to a network: -

-
# wifi-menu wlp3s0
-
-

You should now have a working network connection. If you do not, check the detailed Wireless Setup page. -

Alternatively, use iw dev wlp3s0 scan | grep SSID to scan for available networks, then connect to a network with: -

-
# wpa_supplicant -B -i wlp3s0 -c <(wpa_passphrase "ssid" "psk")
-
-

You need to replace ssid with the name of your network (e.g. "Linksys etc...") and psk with your wireless password, leaving the quotes around the network name and password. -

Finally, you have to give your interface an IP address. This can be set manually or using the dhcp: -

-
# dhcpcd wlp3s0
-
-

If that does not work, issue the following commands: -

-
# echo 'ctrl_interface=DIR=/run/wpa_supplicant' > /etc/wpa_supplicant.conf
-# wpa_passphrase <ssid> <passphrase> >> /etc/wpa_supplicant.conf
-# ip link set <interface> up # May not be needed as dhcpcd should bring it up but may be needed for wpa_supplicant.
-# wpa_supplicant -B -D nl80211 -c /foobar.conf -i <interface name>
-# dhcpcd -A <interface name>
-
-

Analog modem, ISDN or PPPoE DSL

-

For xDSL, dial-up and ISDN connections, see Direct Modem Connection. -

-

Behind a proxy server

-

If you are behind a proxy server, you will need to export the http_proxy and ftp_proxy environment variables. See Proxy settings for more information. -

-
-

This page was retrieved from: https://wiki.parabolagnulinux.org/index.php?title=Start_installing&oldid=5138 -

-

Content is available under GNU Free Documentation License 1.3 (or at your option, any later version). -

- - - diff --git a/configs/talkingparabola/root-image/usr/bin/livecd-alsa-unmuter b/configs/talkingparabola/root-image/usr/bin/livecd-alsa-unmuter deleted file mode 100755 index 6de05a0..0000000 --- a/configs/talkingparabola/root-image/usr/bin/livecd-alsa-unmuter +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -# Properly initialize the sound card so that we have audio at boot. -# This script is released under the GNU General Public License. -source /usr/share/livecd-sound/functions - -preinit_levels all -sanify_levels all diff --git a/configs/talkingparabola/root-image/usr/bin/pick-a-card b/configs/talkingparabola/root-image/usr/bin/pick-a-card deleted file mode 100755 index 7f469e8..0000000 --- a/configs/talkingparabola/root-image/usr/bin/pick-a-card +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -# If there are multiple usable sound cards, prompt the user to choose one, -# using auditory feedback. -# This script is released under the GNU General Public License. - -source /usr/share/livecd-sound/functions - -nwords() { - echo $# -} - -is_numeric() { - local str=$1 - expr match "$str" '[[:digit:]]\+$' > /dev/null 2>&1 -} - -set_default_card() { - local card=$1 - sed -e "s/%card%/$card/g" < /usr/share/livecd-sound/asound.conf.in \ - > /etc/asound.conf -} - -play_on_card() { - local card=$1 file=$2 - aplay "-Dplughw:$card,0" "$file" -} - -set -f -usable_cards="$(list_non_pcsp_cards)" -num_usable_cards=$(nwords $usable_cards) - -if [ "$num_usable_cards" -eq 1 ]; then - exit 0 -fi - -for card in $usable_cards; do - if ! is_numeric "$card"; then - continue - fi - play_on_card "$card" /usr/share/livecd-sound/sounds/pick-a-card.wav& -done -wait -sleep 1 -for card in $usable_cards; do - if ! is_numeric "$card"; then - continue - fi - play_on_card "$card" /usr/share/livecd-sound/sounds/beep.wav - if read -t 10; then - set_default_card "$card" - break - fi -done diff --git a/configs/talkingparabola/root-image/usr/bin/talk-to-me b/configs/talkingparabola/root-image/usr/bin/talk-to-me deleted file mode 100755 index 73998d8..0000000 --- a/configs/talkingparabola/root-image/usr/bin/talk-to-me +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -started_flag=/run/speech-is-running -if [ -f $started_flag ]; then - exit 0 -fi -systemctl stop espeakup -sleep 5 -pick-a-card -systemctl start espeakup -touch $started_flag diff --git a/configs/talkingparabola/root-image/usr/share/livecd-sound/asound.conf.in b/configs/talkingparabola/root-image/usr/share/livecd-sound/asound.conf.in deleted file mode 100644 index 851f829..0000000 --- a/configs/talkingparabola/root-image/usr/share/livecd-sound/asound.conf.in +++ /dev/null @@ -1,12 +0,0 @@ -pcm.!default { - type plug - slave.pcm { - type hw - card %card% - } -} - -ctl.!default { - type hw - card %card% -} diff --git a/configs/talkingparabola/root-image/usr/share/livecd-sound/functions b/configs/talkingparabola/root-image/usr/share/livecd-sound/functions deleted file mode 100644 index e517795..0000000 --- a/configs/talkingparabola/root-image/usr/share/livecd-sound/functions +++ /dev/null @@ -1,199 +0,0 @@ -# Functions for setting up sound on the live CD. -# This library is released under the GNU General Public License, -# and it incorporates code from the /etc/init.d/alsa-utils included with -# Ubuntu 8.04. Proper credit also goes to Debian. - -# Start code copied from Debian / Ubuntu: - -bugout () { - printf "/etc/rc.d/livecdsound: programming error" - stat_fail -} - -echo_card_indices() -{ - if [ -f /proc/asound/cards ] ; then - sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards - fi -} - -filter_amixer_output() -{ - sed \ - -e '/Unable to find simple control/d' \ - -e '/Unknown playback setup/d' \ - -e '/^$/d' -} - -# The following functions try to set many controls. -# No card has all the controls and so some of the attempts are bound to fail. -# Because of this, the functions can't return useful status values. - -# $1 -# $2 -# $CARDOPT -unmute_and_set_level() -{ - { [ "$2" ] && [ "$CARDOPT" ] ; } || bugout - amixer $CARDOPT -q set "$1" "$2" unmute 2>&1 | filter_amixer_output || : - return 0 -} - -# $1 -# $CARDOPT -mute_and_zero_level() -{ - { [ "$1" ] && [ "$CARDOPT" ] ; } || bugout - amixer $CARDOPT -q set "$1" "0%" mute 2>&1 | filter_amixer_output || : - return 0 -} - -# $1 -# $2 "on" | "off" -# $CARDOPT -switch_control() -{ - { [ "$2" ] && [ "$CARDOPT" ] ; } || bugout - amixer $CARDOPT -q set "$1" "$2" 2>&1 | filter_amixer_output || : - return 0 -} - -# $1 -sanify_levels_on_card() -{ - CARDOPT="-c $1" - - unmute_and_set_level "Front" "80%" - unmute_and_set_level "Master" "80%" - unmute_and_set_level "Master Mono" "80%" - unmute_and_set_level "Master Digital" "80%" # E.g., cs4237B - unmute_and_set_level "Playback" "80%" - unmute_and_set_level "Headphone" "100%" - unmute_and_set_level "PCM" "80%" - unmute_and_set_level "PCM,1" "80%" # E.g., ess1969 - unmute_and_set_level "DAC" "80%" # E.g., envy24, cs46xx - unmute_and_set_level "DAC,0" "80%" # E.g., envy24 - unmute_and_set_level "DAC,1" "80%" # E.g., envy24 - unmute_and_set_level "Synth" "80%" - unmute_and_set_level "CD" "80%" - unmute_and_set_level "PC Speaker" "100%" - - mute_and_zero_level "Mic" - mute_and_zero_level "IEC958" # Ubuntu #19648 - - # Intel P4P800-MX - switch_control "Master Playback Switch" on - switch_control "Master Surround" on - - # Trident/YMFPCI/emu10k1: - unmute_and_set_level "Wave" "80%" - unmute_and_set_level "Music" "80%" - unmute_and_set_level "AC97" "80%" - - # DRC: - unmute_and_set_level "Dynamic Range Compression" "80%" - - # Required for HDA Intel (hda-intel): - unmute_and_set_level "Front" "80%" - - # Required for SB Live 7.1/24-bit (ca0106): - unmute_and_set_level "Analog Front" "80%" - - # Required at least for Via 823x hardware on DFI K8M800-MLVF Motherboard - switch_control "IEC958 Capture Monitor" off - - # Required for hardware allowing toggles for AC97 through IEC958, - # valid values are 0, 1, 2, 3. Needs to be set to 0 for PCM1. - unmute_and_set_level "IEC958 Playback AC97-SPSA" "0" - - # Required for newer Via hardware - unmute_and_set_level "VIA DXS,0" "80%" - unmute_and_set_level "VIA DXS,1" "80%" - unmute_and_set_level "VIA DXS,2" "80%" - unmute_and_set_level "VIA DXS,3" "80%" - - # Required on some notebooks with ICH4: - switch_control "Headphone Jack Sense" off - switch_control "Line Jack Sense" off - - # Some machines need one or more of these to be on; - # others need one or more of these to be off: - # - # switch_control "External Amplifier" on - switch_control "Audigy Analog/Digital Output Jack" on - switch_control "SB Live Analog/Digital Output Jack" on - - # D1984 -- Thinkpad T61/X61 - switch_control "Speaker" on - switch_control "Headphone" on - - # HDA-Intel w/ "Digital" capture mixer (See Ubuntu #193823) - unmute_and_set_level "Digital" "80%" - - return 0 -} - -# $1 | "all" -sanify_levels() -{ - TTSDML_RETURNSTATUS=0 - case "$1" in - all) - for CARD in $(echo_card_indices) ; do - sanify_levels_on_card "$CARD" || TTSDML_RETURNSTATUS=1 - done - ;; - *) - sanify_levels_on_card "$1" || TTSDML_RETURNSTATUS=1 - ;; - esac - return $TTSDML_RETURNSTATUS -} - -# $1 -preinit_levels_on_card() -{ - CARDOPT="-c $1" - - # Silly dance to activate internal speakers by default on PowerMac - # Snapper and Tumbler - id=`cat /proc/asound/card$1/id 2>/dev/null` - if [ "$id" = "Snapper" -o "$id" = "Tumbler" ]; then - switch_control "Auto Mute" off - switch_control "PC Speaker" off - switch_control "Auto Mute" on - fi -} - -# $1 | "all" -preinit_levels() -{ - TTSDML_RETURNSTATUS=0 - case "$1" in - all) - for CARD in $(echo_card_indices) ; do - preinit_levels_on_card "$CARD" || TTSDML_RETURNSTATUS=1 - done - ;; - *) - preinit_levels_on_card "$1" || TTSDML_RETURNSTATUS=1 - ;; - esac - return $TTSDML_RETURNSTATUS -} - -# End copied code. - -# List all cards that *should* be usable for PCM audio. In my experience, -# the console speaker (handled by the pcsp driver) isn't a suitable playback -# device, so we'll exclude it. -list_non_pcsp_cards() -{ - for card in $(echo_card_indices); do - local cardfile="/proc/asound/card${card}/id" - if [ -r "$cardfile" -a -f "$cardfile" ] && \ - [ "$(cat "$cardfile")" != pcsp ]; then - echo "$card" - fi - done -} -- cgit v1.2.2