-
-
Save clintar/6a7411e386cd2da83611f3d8654c92e1 to your computer and use it in GitHub Desktop.
Script for installing xanmod on Pop!_OS
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/bash | |
set -e | |
for field in $(cat /proc/cmdline); do | |
if [[ "${field}" = root=* ]]; then | |
UUID=$(echo $field | awk -F= '{print $3}') | |
break | |
fi | |
done | |
if test -z ${UUID}; then | |
echo "failed to find UUID of root" | |
exit 1 | |
fi | |
cd /tmp | |
wget "https://dl.xanmod.org/xanmod-repository.deb" | |
sudo dpkg -i "xanmod-repository.deb" | |
sudo apt update | |
sudo apt install linux-xanmod -y | |
KERNEL="$(ls /boot | grep -E 'vmlinuz.*xanmod' | sort -r | head -1)" | |
INITRD="$(ls /boot | grep -E 'initrd.*xanmod' | sort -r | head -1)" | |
sudo mkdir -p "/boot/efi/EFI/xanmod/" | |
sudo cp "/boot/${KERNEL}" "/boot/efi/EFI/xanmod/vmlinuz.efi" | |
sudo cp "/boot/${INITRD}" "/boot/efi/EFI/xanmod/initrd.img" | |
echo "title Pop!_OS (XanMod) | |
linux /EFI/xanmod/vmlinuz.efi | |
initrd /EFI/xanmod/initrd.img | |
options root=UUID=${UUID} ro quiet loglevel=0 systemd.show_status=false splash" \ | |
| sudo tee "/boot/efi/loader/entries/Pop_OS-xanmod.conf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment