Last active
February 29, 2016 17:44
-
-
Save csabatini/6fc75b7da205eb2022b4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# format + mount disks | |
(echo c; echo u; echo n; echo p; echo 1; echo ; echo ; echo p; echo w;) | fdisk /dev/sdc | |
mkfs.ext4 /dev/sdc1 | |
mkdir -p /media/pd0 | |
mount /dev/sdc1 /media/pd0 | |
cp /etc/fstab ~/ | |
cp /etc/fstab /etc/fstab.original | |
uuid=$(blkid | grep '/dev/sdc1' | grep -oP '[-a-z0-9]{36}') | |
echo "UUID=${uuid} /media/pd0 ext4 defaults 0 0" >> ~/fstab | |
mv ~/fstab /etc/fstab | |
# install packages | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-7-jdk likewise-open5 | |
# edit /etc/sudoers for admin group | |
sed -i 's/%admin ALL=(ALL) ALL/%admin ALL=(ALL) NOPASSWD:ALL/g' /etc/sudoers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment