Last active
October 23, 2023 00:43
-
-
Save mjcc30/0c7ae5da601737dac1da8ec8584d9fe5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
echo " .__ __ .__ .__ "; | |
echo " |__| ____ _______/ |______ | | | | "; | |
echo " | |/ \ / ___/\ __\__ \ | | | | "; | |
echo " | | | \\___ \ | | / __ \| |_| |__ "; | |
echo " |__|___| /____ > |__| (____ /____/____/ "; | |
echo " \/ \/ \/ "; | |
echo " "; | |
# test on virtualbox 85G | |
# gpt table | |
# partion: | |
# size path type tag name | |
# 2G /boot/efi efi boot boot | |
# 3G swap swap swap | |
# lv2 group | |
# 30G / btrfs root | |
# 50G /home btrfs home | |
echo "Ce programme d'installation s'installe sur fedora silverblue et kinoite " | |
echo "Sauvegarde de l'etat initial" | |
# snapshot | |
sudo ostree admin pin 0 | |
echo "Mises à jour du système" | |
sudo rpm-ostree update --preview | |
sleep 5 | |
clear | |
sudo rpm-ostree upgrade | |
sleep 5 | |
clear | |
echo "Migration vers fedora 36" | |
sudo ostree remote refs fedora | |
sudo rpm-ostree rebase fedora:fedora/36/x86_64/silverblue | |
sleep 5 | |
clear | |
# Upgrade to rawhide: | |
# rpm-ostree rebase fedora/rawhide/x86_64/system | |
# Rollback to a previous version: | |
# rpm-ostree rollback fedora/35/x86_64/system | |
# or | |
# rpm-ostree rollback | |
echo "Activation des mises à jour automatique du système" | |
# Change AutomaticUpdatePolicy to check | |
sudo sed -i 's|^#AutomaticUpdatePolicy=none|AutomaticUpdatePolicy=check|' /etc/rpm-ostreed.conf | |
# After that you need to reload rpm-ostree and enable the automatic timer. | |
sudo rpm-ostree reload | |
sudo systemctl enable rpm-ostreed-automatic.timer --now | |
sleep 5 | |
clear | |
echo "Ajout de distrobox" | |
sudo rpm-ostree install distrobox | |
sleep 5 | |
clear | |
echo "Ajouts des remotes Flatpak et autre repos (RPM Fusion, Copr)\n" | |
echo "Flathub remotes" | |
# Fedora Flatpaks remote: | |
flatpak remote-add --if-not-exists fedora oci+https://registry.fedoraproject.org | |
# Flathub remote: | |
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
# Flathub Beta remote: | |
flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo | |
# KDE nightly remote: | |
flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo | |
# GNOME nightly remote: | |
flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo | |
sleep 5 | |
clear | |
# After the repositories are added, you need to update the application catalog. | |
# In this way, you will be able to manage applications directly from the store without going to flathub.org. | |
echo "Mise à jour du catalogue de flatpack" | |
flatpak update --appstream | |
# After that, you can use the store to update Flatpak applications directly from the terminal | |
echo "Mise à jour des apps dans flatpack" | |
flatpak update | |
sleep 5 | |
clear | |
echo "Ajout des RPM Fusion repos" | |
sudo rpm-ostree install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm | |
sudo rpm-ostree install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm | |
sleep 5 | |
clear | |
echo "Copr repos\n" | |
echo "Pour installer des repos depuis Copr:" | |
echo "sudo ostree remote add <name-of-repo> <repository-url-\$releasever-\$basearch>" | |
echo "Example (Heroic Games launcher repo):" | |
echo "sudo ostree remote add heroic-games-launcher https://download.copr.fedorainfracloud.org/results/atim/heroic-games-launcher/fedora-\$releasever-\$basearch/" | |
sleep 5 | |
clear | |
echo "instalation d'apps flatpack" | |
echo "Libre Office, VLC" | |
# Libre Office | |
flatpak install flathub org.libreoffice.LibreOffice | |
# VLC | |
flatpak install flathub org.videolan.VLC | |
sleep 5 | |
clear | |
# Installing the Nvidia driver and a specific kernel | |
# If you have installed RPM Fusion repositories, you can install the Nvidia driver. | |
# sudo rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia | |
# If you are using the Nvidia System Management Interface (nvidia-smi) or CUDA: | |
# sudo rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia-cuda | |
# If you want specific kernel, you can always download a kernel from Koji and install it on Fedora Silverblue: | |
# sudo rpm-ostree override replace ./kernel*.rpm | |
# If you want to install multiple kernels, you will need to pin your deployment by issuing the ostree admin pin 0 command then use the same code above. | |
# After restarting, if you pin the new kernel, then you will have two deployments with specific kernels. | |
# Remember that you must update them individually because you cannot pin two deployments at the same time. | |
# Toolbx | |
echo "Creation d'une toolbox" | |
toolbox create | |
toolbox list | |
sleep 5 | |
clear | |
# Keep the container updated by running sudo dnf update periodically. | |
# Tip: add fastestmirror=1 and max_parallel_downloads=10 /etc/dnf/dnf.conf | |
# Layering packages | |
# If you want to remove all layered packages: | |
# $ rpm-ostree uninstall --all | |
# tlp, tlp-rdw: helps to reduce the battery use on laptops | |
# stacer: system optimizer and monitoring | |
# WoeUSB: for preparing bootable Windows ISO images | |
# unrar: for extracting and viewing RAR archives | |
# rpm-ostree tips | |
# If you want to remove all overlays, overrides and initramfs: | |
# sudo rpm-ostree ex reset | |
# avoid rebooting after installing packages. | |
# sudo rpm-ostree install --apply-live htop | |
# Substitute system with kinoite or silverblue in the below examples. | |
# Listing packages | |
# To list the installed RPM packages: | |
# $ rpm -qa | |
# However, if you want to list the packages in the repositories, you must enter Toolbx. | |
# dnf list | |
# To search for a specific RPM package: | |
# dnf search <packagename> | |
# Miscellaneous tips | |
# search packages | |
# 1 flatpak. | |
# 2 toolbx. | |
# 3 rpm-ostree | |
# 4 Install Windows in a virtual machine or on a separate partition or hard drive and configure multi-booting. | |
# Uses RPM Fusion, and Copr repositories only as possible. | |
# only KDE (Fedora Kinoite) GNOME (Fedora Silverblue) desktop environments are officially supported by the Fedora Project. | |
# System to stay speed, avoid doing too much customization (global theme, Conky, Plank, etc.) | |
# to preview video files: | |
# do not install Dolphin from Flatpak | |
# sudo rpm-ostree install ffmpegthumbs kffmpegthumbnailer. | |
# For Kinoite users: | |
# global theme: download theme from the KDE Store and enter: | |
# kpackagetool5 -i /home/username/theme folder | |
# it is possible to install Windows fonts without any package layering. | |
# enable hardware video acceleration if you have an Intel Graphics 4600 chipset: | |
# sudo rpm-ostree install intel-gpu-tools libva-intel-driver libva-intel-hybrid-driver libva-utils libva-vdpau-driver libvdpau-va-gl mpv vdpauinfo | |
# to contribute to Fedora Silverblue or Kinoite or get more information | |
# https://docs.fedoraproject.org/en-US/fedora-silverblue/ | |
# https://docs.fedoraproject.org/en-US/fedora-kinoite/ | |
clear | |
sudo rpm-ostree status | |
sleep 5 | |
clear | |
uname -a | |
sleep 5 | |
echo "Installation finis" | |
sleep 5 | |
sudo systemctl reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment