RC1 installer refinements

This commit is contained in:
bhaiest 2022-05-05 07:19:36 +00:00
parent bf2ac9b1b8
commit 301b7a791c
5 changed files with 143 additions and 81 deletions

View File

@ -43,10 +43,16 @@ Prerequistes:
- UEFI-enabled device
- Disabled secure boot
Installation types:
- 1) barebones: Barebones OS-only installation, resembles vanilla Arch Linux installation
- 2) gameonly: Steam Deck UI only (AMD GPU only; no desktop), as said, this doesn't ship any DE, and only has Steam Deck UI installed.
- 3) deckperience: Full SteamOS 3 experience, Includes proper session switching, KDE Plasma and media apps, Chromium preinstalled
Installation:
- Flash the ISO from `releases` tab using [BalenaEtcher](https://www.balena.io/etcher/) or by typing `sudo dd if=SteamOS.iso of=/dev/sd(your flash drive) bs=4M status=progress oflag=sync`
- Boot into ISO
- Run `holoinstall`
- Select your installation flavor
- Enter drive node, starting from `for ex. sda or nvme0n1` when asked
- Take your favourite hot beverage, and wait till it installs :)

View File

@ -0,0 +1,3 @@
#!/bin/zsh
sudo pkill -f "gamescope*"
fi

View File

@ -1,2 +1,3 @@
#!/bin/bash
# There will be an actual system updater soon :)
exit 7

View File

@ -1,94 +1,146 @@
#!/bin/zsh
echo "SteamOS 3 Installer, beta 1 (x86_64)"
echo "Start time: $(date)"
# HoloISO Installer v2
# This defines all of the current variables.
CMD_PACMAN_INSTALL=(/usr/bin/pacman --noconfirm -S --needed)
CMD_PACMAN_UPDATE=(/usr/bin/pacman -Sy)
CPU_VENDOR=$(cat /proc/cpuinfo | grep 'vendor' | uniq | cut -c 13-)
SYSTEM_LOCALE="${SYSTEM_LOCALE:-en_US.UTF-8 UTF-8}"
HOLO_INSTALL_DIR="${HOLO_INSTALL_DIR:-/mnt}"
# Installation begins here
echo "Starting installation..."
${CMD_PACMAN_UPDATE}
echo "db update complete!"
lsblk
read "?Enter your desired drive node here (for example, sda or nvme0n1): " DRIVEDEVICE
read "?WARNING: This drive is going to be erased fully. Press enter to continue, or CTRL+Z to terminate"
# This defines the partition detection:
DEVICE="/dev/${DRIVEDEVICE}"
INSTALLDEVICE="${DEVICE}"
echo ${DEVICE} | grep -q -P "^/dev/(nvme|loop|mmcblk)"
if [ $? -eq 0 ]; then
INSTALLDEVICE="${DEVICE}p"
INSTALLDEVICE="${DEVICE}p"
fi
echo "Creating partitions..."
parted ${DEVICE} mklabel gpt
parted ${DEVICE} mkpart primary fat32 2M 256M
parted ${DEVICE} set 1 boot on
parted ${DEVICE} set 1 esp on
parted ${DEVICE} mkpart primary btrfs 256M 100%
root_partition="${INSTALLDEVICE}2"
mkfs -t vfat ${INSTALLDEVICE}1
fatlabel ${INSTALLDEVICE}1 HOLOEFI
mkfs -t btrfs -f ${root_partition}
btrfs filesystem label ${root_partition} holo-root
if [[ "${CPU_VENDOR}" == "AuthenticAMD" ]]; then
UCODE_INSTALL_MSG="AMD CPU detected, installing AMD ucode..."
UCODE_INSTALL="amd-ucode"
else
UCODE_INSTALL_MSG="Intel CPU detected, installing Intel ucode..."
UCODE_INSTALL="intel-ucode"
fi
echo "Partition creating complete, mounting and pacstrapping..."
mount -t btrfs -o subvol=/,compress-force=zstd:1,discard,noatime,nodiratime ${root_partition} ${HOLO_INSTALL_DIR}
pacstrap -i ${HOLO_INSTALL_DIR} base base-devel amd-ucode intel-ucode linux-neptune linux-firmware
echo "Base system installation done, generating fstab..."
genfstab -U -p /mnt >> /mnt/etc/fstab
cp /etc/pacman.conf /mnt/etc/pacman.conf
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
cp /etc/holoinstall/steamos-session-select /mnt/usr/bin/steamos-session-select
cp /etc/holoinstall/steamos-update /mnt/usr/bin/steamos-update
arch-chroot ${HOLO_INSTALL_DIR} chmod +x /usr/bin/steamos-session-select
arch-chroot ${HOLO_INSTALL_DIR} chmod +x /usr/bin/steamos-update
read "?Enter your hostname for this installation: " HOLOHOSTNAME
echo ${HOLOHOSTNAME} > ${HOLO_INSTALL_DIR}/etc/hostname
read "?Enter your username for this installation: " HOLOUSER
read "?Enter your user password for this installation: " HOLOPASS
echo "Creating user ${HOLOUSER}..."
echo -e "root\nroot" | arch-chroot ${HOLO_INSTALL_DIR} passwd root
arch-chroot ${HOLO_INSTALL_DIR} useradd --create-home ${HOLOUSER}
echo -e "${HOLOPASS}\n${HOLOPASS}" | arch-chroot ${HOLO_INSTALL_DIR} passwd ${HOLOUSER}
echo "${HOLOUSER} ALL=(root) NOPASSWD:ALL" > ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER}
chmod 0440 ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER}
echo "127.0.1.1 ${HOLOHOSTNAME}" >> ${HOLO_INSTALL_DIR}/etc/hosts
cp /etc/holoinstall/osinfo /mnt/etc/os-release
echo "Installing bootloader..."
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_UPDATE}
mkdir ${HOLO_INSTALL_DIR}/boot/efi
mount -t vfat ${INSTALLDEVICE}1 ${HOLO_INSTALL_DIR}/boot/efi
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_INSTALL} efibootmgr sddm neofetch core/grub mkinitcpio networkmanager inetutils
arch-chroot ${HOLO_INSTALL_DIR} systemctl enable NetworkManager systemd-timesyncd
arch-chroot ${HOLO_INSTALL_DIR} grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=holo --removable
arch-chroot ${HOLO_INSTALL_DIR} grub-mkconfig -o /boot/grub/grub.cfg
arch-chroot ${HOLO_INSTALL_DIR} sed -i 's/Arch Linux/SteamOS/g' /boot/grub/grub.cfg
echo "Installing DE and dependencies..."
# Updates pacman db for chroot
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_UPDATE}
# Installs DE
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_INSTALL} archlinux-keyring curl vlc kwrite zsh noto-fonts-cjk tar yay git go plasma-meta plasma-nm ffmpegthumbs kdegraphics-thumbnailers gwenview glxinfo dolphin konsole steamdeck-kde-presets chromium steam-jupiter-stable gamescope mangohud cheese vulkan-radeon lib32-vulkan-radeon jupiter-hw-support pipewire-alsa pipewire-jack lib32-pipewire-jack pipewire-pulse pipewire-v4l2 spectacle lib32-pipewire-v4l2 pipewire lib32-pipewire pipewire-media-session
# Installs more stuff
echo "Installing Bluetooth dependencies..."
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_INSTALL} bluez bluez-utils blueman bluez-qt
arch-chroot ${HOLO_INSTALL_DIR} systemctl enable bluetooth
arch-chroot ${HOLO_INSTALL_DIR} usermod -a -G rfkill ${HOLOUSER}
echo "Configuring Steam Deck UI by default..."
mkdir ${HOLO_INSTALL_DIR}/etc/sddm.conf.d
echo "[Autologin]
base_os_install() {
lsblk
read "?Enter your desired drive node here (for example, sda or nvme0n1): " DRIVEDEVICE
read "?WARNING: This drive is going to be erased fully. Press enter to continue, or CTRL+Z to terminate"
echo "Creating partitions..."
sfdisk --delete ${DEVICE}
wipefs -a ${DEVICE}
parted ${DEVICE} mklabel gpt
parted ${DEVICE} mkpart primary fat32 2M 256M
parted ${DEVICE} set 1 boot on
parted ${DEVICE} set 1 esp on
parted ${DEVICE} mkpart primary btrfs 256M 100%
root_partition="${INSTALLDEVICE}2"
mkfs -t vfat ${INSTALLDEVICE}1
fatlabel ${INSTALLDEVICE}1 HOLOEFI
mkfs -t btrfs -f ${root_partition}
btrfs filesystem label ${root_partition} holo-root
echo "Partition creating complete, mounting and pacstrapping..."
echo "${UCODE_INSTALL_MSG}"
mount -t btrfs -o subvol=/,compress-force=zstd:1,discard,noatime,nodiratime ${root_partition} ${HOLO_INSTALL_DIR}
pacstrap -i ${HOLO_INSTALL_DIR} base base-devel ${UCODE_INSTALL} core/linux core/linux-headers linux-neptune linux-neptune-headers linux-firmware
echo "Base system installation done, generating fstab..."
genfstab -U -p /mnt >> /mnt/etc/fstab
cp /etc/pacman.conf /mnt/etc/pacman.conf
cp /etc/pacman.d/mirrorlist /mnt/etc/pacman.d/mirrorlist
read "?Enter your hostname for this installation: " HOLOHOSTNAME
echo ${HOLOHOSTNAME} > ${HOLO_INSTALL_DIR}/etc/hostname
read "?Enter your username for this installation: " HOLOUSER
read "?Enter your user password for this installation: " HOLOPASS
echo "Creating user ${HOLOUSER}..."
echo -e "root\nroot" | arch-chroot ${HOLO_INSTALL_DIR} passwd root
arch-chroot ${HOLO_INSTALL_DIR} useradd --create-home ${HOLOUSER}
echo -e "${HOLOPASS}\n${HOLOPASS}" | arch-chroot ${HOLO_INSTALL_DIR} passwd ${HOLOUSER}
echo "${HOLOUSER} ALL=(root) NOPASSWD:ALL" > ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER}
chmod 0440 ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER}
echo "127.0.1.1 ${HOLOHOSTNAME}" >> ${HOLO_INSTALL_DIR}/etc/hosts
cp /etc/holoinstall/osinfo /mnt/etc/os-release
echo "Installing bootloader..."
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_UPDATE}
mkdir ${HOLO_INSTALL_DIR}/boot/efi
mount -t vfat ${INSTALLDEVICE}1 ${HOLO_INSTALL_DIR}/boot/efi
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_INSTALL} efibootmgr sddm neofetch core/grub mkinitcpio networkmanager inetutils
arch-chroot ${HOLO_INSTALL_DIR} systemctl enable NetworkManager systemd-timesyncd
arch-chroot ${HOLO_INSTALL_DIR} grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=holo --removable
arch-chroot ${HOLO_INSTALL_DIR} grub-mkconfig -o /boot/grub/grub.cfg
arch-chroot ${HOLO_INSTALL_DIR} sed -i 's/Arch Linux/SteamOS/g' /boot/grub/grub.cfg
echo "Setting up locale..."
echo "${SYSTEM_LOCALE}" >> ${HOLO_INSTALL_DIR}/etc/locale.gen
arch-chroot ${HOLO_INSTALL_DIR} locale-gen
echo "LANG=$(echo ${SYSTEM_LOCALE} | cut -d' ' -f1)" > ${HOLO_INSTALL_DIR}/etc/locale.conf
}
gamescope_only_install() {
cp /etc/holoinstall/steamos-restart-sddm /mnt/usr/bin/steamos-session-select
cp /etc/holoinstall/steamos-update /mnt/usr/bin/steamos-update
arch-chroot ${HOLO_INSTALL_DIR} chmod +x /usr/bin/steamos-session-select
arch-chroot ${HOLO_INSTALL_DIR} chmod +x /usr/bin/steamos-update
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_UPDATE}
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_INSTALL} archlinux-keyring gamescope mangohud noto-fonts-cjk noto-fonts glxinfo vulkan-radeon lib32-vulkan-radeon steam-jupiter-stable jupiter-hw-support pipewire-alsa pipewire-jack lib32-pipewire-jack pipewire-pulse pipewire-v4l2 lib32-pipewire-v4l2 pipewire lib32-pipewire pipewire-media-session bluez bluez-utils blueman bluez-qt curl zsh yay git go tar ffmpegthumbs
arch-chroot ${HOLO_INSTALL_DIR} usermod -a -G rfkill ${HOLOUSER}
echo "Configuring Steam Deck UI..."
mkdir ${HOLO_INSTALL_DIR}/etc/sddm.conf.d
echo "[Autologin]
User=${HOLOUSER}
Session=gamescope-wayland.desktop" >> ${HOLO_INSTALL_DIR}/etc/sddm.conf.d/autologin.conf
mkdir /mnt/home/${HOLOUSER}/Desktop
cp /etc/holoinstall/steamos-gamemode.desktop /mnt/home/${HOLOUSER}/Desktop/steamos-gamemode.desktop
arch-chroot ${HOLO_INSTALL_DIR} chmod +x /home/${HOLOUSER}/Desktop/steamos-gamemode.desktop
# Services
echo "Setting up locale..."
echo "${SYSTEM_LOCALE}" >> ${HOLO_INSTALL_DIR}/etc/locale.gen
arch-chroot ${HOLO_INSTALL_DIR} locale-gen
echo "LANG=$(echo ${SYSTEM_LOCALE} | cut -d' ' -f1)" > ${HOLO_INSTALL_DIR}/etc/locale.conf
arch-chroot ${HOLO_INSTALL_DIR} systemctl enable sddm
echo "Installation complete! You may reboot now!"
arch-chroot ${HOLO_INSTALL_DIR} systemctl enable sddm bluetooth
}
full_install() {
cp /etc/holoinstall/steamos-session-select /mnt/usr/bin/steamos-session-select
cp /etc/holoinstall/steamos-update /mnt/usr/bin/steamos-update
arch-chroot ${HOLO_INSTALL_DIR} chmod +x /usr/bin/steamos-session-select
arch-chroot ${HOLO_INSTALL_DIR} chmod +x /usr/bin/steamos-update
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_UPDATE}
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_INSTALL} archlinux-keyring curl vlc kwrite zsh noto-fonts-cjk tar yay git go plasma-meta plasma-nm ffmpegthumbs kdegraphics-thumbnailers gwenview glxinfo dolphin konsole steamdeck-kde-presets chromium steam-jupiter-stable gamescope mangohud cheese vulkan-radeon lib32-vulkan-radeon jupiter-hw-support pipewire-alsa pipewire-jack lib32-pipewire-jack pipewire-pulse pipewire-v4l2 spectacle lib32-pipewire-v4l2 pipewire lib32-pipewire pipewire-media-session
echo "Installing Bluetooth dependencies..."
arch-chroot ${HOLO_INSTALL_DIR} ${CMD_PACMAN_INSTALL} bluez bluez-utils blueman bluez-qt
arch-chroot ${HOLO_INSTALL_DIR} systemctl enable bluetooth
arch-chroot ${HOLO_INSTALL_DIR} usermod -a -G rfkill ${HOLOUSER}
echo "Configuring Steam Deck UI by default..."
mkdir ${HOLO_INSTALL_DIR}/etc/sddm.conf.d
echo "[Autologin]
User=${HOLOUSER}
Session=gamescope-wayland.desktop" >> ${HOLO_INSTALL_DIR}/etc/sddm.conf.d/autologin.conf
mkdir /mnt/home/${HOLOUSER}/Desktop
cp /etc/holoinstall/steamos-gamemode.desktop /mnt/home/${HOLOUSER}/Desktop/steamos-gamemode.desktop
arch-chroot ${HOLO_INSTALL_DIR} chmod +x /home/${HOLOUSER}/Desktop/steamos-gamemode.desktop
arch-chroot ${HOLO_INSTALL_DIR} systemctl enable sddm
}
# The installer itself. Good wuck.
echo "SteamOS 3 Installer, RC1 alpha zero (x86_64)"
echo "Start time: $(date)"
echo "Please choose installation type:"
echo "1) barebones: Barebones OS-only installation"
echo "2) gameonly: Steam Deck UI only (AMD GPU only; no desktop)"
echo "3) deckperience: Full SteamOS 3 experience"
read "?Enter your choice here: " HOLO_INSTALL_TYPE
if [[ "${HOLO_INSTALL_TYPE}" == "1" ]]; then
echo "Installing SteamOS, barebones configuration..."
base_os_install
echo "Installation finished! You may reboot now, or type arch-chroot /mnt to make further changes"
else
echo "Invalid choice. Exiting installer..."
fi
if [[ "${HOLO_INSTALL_TYPE}" == "2" ]]; then
echo "Installing SteamOS, gameonly configuration..."
base_os_install
gamescope_only_install
echo "Installation finished! You may reboot now, or type arch-chroot /mnt to make further changes"
fi
if [[ "${HOLO_INSTALL_TYPE}" == "3" ]]; then
echo "Installing SteamOS, deckperience configuration..."
base_os_install
full_install
echo "Installation finished! You may reboot now, or type arch-chroot /mnt to make further changes"
fi
echo "End time: $(date)"

View File

@ -2,10 +2,10 @@
# shellcheck disable=SC2034
iso_name="SteamOS_Holo_RC1"
iso_label="ARCH_$(date +%Y%m)"
iso_label="HOLO_$(date +%Y%m)"
iso_publisher="theVakhovske <https://github.com/bhaiest>"
iso_application="SteamOS Live/Rescue CD"
iso_version="2022-05-03-54c364c_amdgpu"
iso_version="$(date +%Y%m%d_%H%M)_amdgpu"
install_dir="arch"
buildmodes=('iso')
bootmodes=('uefi-x64.systemd-boot.esp' 'uefi-x64.systemd-boot.eltorito')