Created
November 5, 2017 23:08
-
-
Save depau/056e82b8822b1c0b25327369ec5a17e8 to your computer and use it in GitHub Desktop.
Davide's Ubuntu setup scripts
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 | |
echo "Adding Android entry to GRUB" | |
sudo tee -a /etc/grub.d/41_custom << EOF | |
menuentry "Android 7.1.2" { | |
insmod part_gpt | |
insmod fat | |
search --set=root --file /android-2017-10-24/kernel | |
#set root='hd0,gpt1' | |
#if [ x$feature_platform_search_hint = xy ]; then | |
# search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 02F3-A517 | |
#else | |
# search --no-floppy --fs-uuid --set=root 02F3-A517 | |
#fi | |
linux /android-2017-10-24/kernel quiet root=/dev/ram0 androidboot.selinux=permissive buildvariant=eng | |
initrd /android-2017-10-24/initrd.img | |
} | |
EOF | |
echo "Setting HiDPI font for GRUB" | |
sudo grub-mkfont -s 32 -o /boot/grub/fonts/SourceCodePro-R.pf2 ~/.fonts/s/SourceCodePro-Regular.ttf | |
sudo tee -a /etc/default/grub << EOF | |
GRUB_FONT="/boot/grub/fonts/SourceCodePro-R.pf2" | |
EOF | |
sudo update-grub | |
echo "Setting HiDPI Plymouth theme" | |
sudo update-alternatives --set default.plymouth "/usr/share/plymouth/themes/ubuntu-logo/ubuntu-logo-scale-2.plymouth" | |
echo "Adding VTE symlink for Tilix" | |
sudo ln -s /etc/profile.d/vte-2.91.sh /etc/profile.d/vte.sh | |
echo "Adding GIMP PPA" | |
sudo add-apt-repository -y ppa:otto-kesselgulasch/gimp | |
echo "Adding Sublime Text PPA" | |
sudo apt install -y apt-transport-https | |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
echo "Updating software catalog" | |
sudo apt update | |
echo "Installing software" | |
sudo apt install ubuntu-gnome-desktop sublime-text chromium-browser chrome-gnome-shell geary tilix vim git zsh | |
echo "Setting vim as default editor" | |
sudo update-alternatives --set editor "/usr/bin/vim.basic" | |
echo "Setting zsh as default shell" | |
sudo chsh -s /usr/bin/zsh depaulicious | |
sudo chsh -s /usr/bin/zsh root |
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 | |
echo "Mounting new root ($1) to /mnt" | |
sudo mount $1 /mnt | |
echo "Adding crypttab entries" | |
sudo tee -a /mnt/etc/crypttab << EOF | |
clearbeans /dev/data/cryptbeans none luks,discard | |
EOF | |
echo "Adding fstab entries" | |
sudo tee -a /mnt/etc/fstab << EOF | |
/dev/mapper/clearbeans /home/depaulicious btrfs subvol=home@ubuntu 0 2 | |
/dev/mapper/clearbeans /home/depaulicious/Beans btrfs subvol=@beans 0 2 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment