Skip to content

Instantly share code, notes, and snippets.

@lfuelling
Created March 4, 2015 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfuelling/d0e7eb702e2df33d152d to your computer and use it in GitHub Desktop.
Save lfuelling/d0e7eb702e2df33d152d to your computer and use it in GitHub Desktop.
Syslinux Install script
#!/bin/bash
clear
set -e
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
echo "Do you REALLY want to do this? (y/N)"
read a
if [[ $a == "Y" || $a == "y" ]]; then
echo "We gonna do it"
else
echo "quiting"
exit 1
fi
apt-get install -y extlinux syslinux-common
extlinux --install /boot/extlinux
clear fdisk -l
echo "Your HD is /dev/sda Right?"
read b
if [[ $b == "Y" || $b == "y" ]]; then
echo "sweet"
cat /usr/lib/extlinux/mbr.bin >/dev/sda
else
echo "Enter the whole path of your HD"
read DISK
cat /usr/lib/extlinux/mbr.bin >$DISK
fi
cd /tmp
wget http://pibanglinux.org/pastebin/super.tar.bz2 -O /tmp/super.tar.bz2
tar xjfv super.tar.bz2
cp -r /tmp/super /usr/share/syslinux/themes/
sed -i /etc/default/extlinux -e 's#EXTLINUX_THEME="debian"#EXTLINUX_THEME="super"#'
sed -i /etc/default/extlinux -e 's#EXTLINUX_TIMEOUT="1"#EXTLINUX_TIMEOUT="1"#'
sed -i /etc/default/extlinux -e 's#EXTLINUX_PARAMETERS="ro quiet"#EXTLINUX_PARAMETERS="quiet"#'
extlinux-update
clear
echo "Do you want to remove Grub2?"
read c
if [[ $c == "Y" || $c == "y" ]]; then
echo "Removing"
apt-get remove -y grub-common grub-pc
fi
clear
echo "Do you want to reboot"
read d
if [[ $d == "Y" || $d == "y" ]]; then
echo "Rebooting"
sleep 3s && reboot
fi
echo "bye bye"
clear
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment