Last active
February 4, 2022 18:54
-
-
Save digitalsparky/2cd10f58ee4db9a8da97fdfd620c3426 to your computer and use it in GitHub Desktop.
PopOS Xanmod Edge Install
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" | |
rm -f xanmod-repository.deb | |
sudo apt update | |
sudo apt install linux-xanmod-edge -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" | |
cat <<EOF | sudo tee "/boot/efi/loader/entries/Pop_OS-xanmod.conf" | |
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 | |
EOF | |
sudo cp "/boot/efi/loader/loader.conf" "/boot/efi/loader/loader.conf.pre-xanmod" | |
cat <<EOF | sudo tee "/boot/efi/loader/loader.conf" | |
default Pop-OS-xanmod | |
EOF | |
echo "Setup complete, you can now reboot." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment