summaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2014-12-25 21:15:01 +0100
committermakefu <github@syntax-fehler.de>2014-12-25 21:15:01 +0100
commitabd5b2c8f074ae26c2680048640c47e10566bd39 (patch)
tree9dbdc63edbababec6412992dabba84089117b472 /boot
parentc0f39b57888603595aa37d5abbdad0f52a525184 (diff)
parent8db6cecf6f088ebac98a6be15d920ab412a1c510 (diff)
Merge branch 'master' of ssh://github.com/krebscode/painload
everything stays the same in inspector_wifi Conflicts: recon/inspect_wifi/.gitignore recon/inspect_wifi/README.md recon/inspect_wifi/TODO recon/inspect_wifi/inspector_wifi recon/inspect_wifi/plugins/01open recon/inspect_wifi/plugins/02alice recon/inspect_wifi/plugins/02easybox recon/inspect_wifi/plugins/02tplink recon/inspect_wifi/plugins/plugin_core recon/inspector_wifi/.gitignore recon/inspector_wifi/README.md recon/inspector_wifi/TODO recon/inspector_wifi/inspector_wifi recon/inspector_wifi/plugins/01open recon/inspector_wifi/plugins/02alice recon/inspector_wifi/plugins/02easybox recon/inspector_wifi/plugins/02tplink recon/inspector_wifi/plugins/plugin_core recon/wifi_inspector/.gitignore recon/wifi_inspector/README.md recon/wifi_inspector/TODO recon/wifi_inspector/inspector_wifi recon/wifi_inspector/plugins/01open recon/wifi_inspector/plugins/02alice recon/wifi_inspector/plugins/02easybox recon/wifi_inspector/plugins/02tplink recon/wifi_inspector/plugins/plugin_core
Diffstat (limited to 'boot')
-rw-r--r--boot/arch_install.sh117
-rw-r--r--boot/lighttpd.conf12
l---------boot/painload.sh1
l---------boot/retiolum.sh1
4 files changed, 131 insertions, 0 deletions
diff --git a/boot/arch_install.sh b/boot/arch_install.sh
new file mode 100644
index 00000000..ee23ed20
--- /dev/null
+++ b/boot/arch_install.sh
@@ -0,0 +1,117 @@
+#/bin/sh
+green='\e[0;32m'
+red='\e[0;31m'
+nc='\e[0m'
+
+if find /dev/disk/by-label/ -name ARCH_\* |xargs readlink |grep sda; then
+ if test -e /dev/sdb; then
+ rootdisk='/dev/sdb'
+ else
+ echo "$red could not find rootdrive $nc"
+ echo "$red You're on your own, good luck! $nc"
+ fi
+else
+ rootdisk='/dev/sda'
+fi
+
+echo -e "$green Your rootdisk is $rootdisk $nc"
+sleep 3
+
+echo -e "$green Starting network $nc"
+dhcpcd
+ping -c 1 google.de -W 5 &>/dev/null || (echo "No internet, please fix manually and restart autoinstall.sh !!!!" && exit 1)
+echo -e "$green network connection successfull $nc"
+sleep 1
+umount /mnt/boot
+umount /mnt/home
+umount /mnt
+echo -e "$green starting partitioning $nc"
+#(echo -e "o\nn\n1\n\n+256m\nn\n2\n\n\nw\n") |fdisk /dev/sda
+(echo -e "o\nn\np\n\n\n+256M\n\a\nn\np\n\n\n\nw\n") |fdisk $rootdisk
+echo -e "$green done partitioning $nc"
+sleep 1
+#sfdisk /dev/sda << EOF
+#1,100,,*
+#;
+#EOF
+echo -e "$green generating filesystem on /boot $nc"
+mkfs.ext2 ${rootdisk}1
+echo -e "$green Done! $nc"
+sleep 1
+echo -e "$green starting LVM magic $nc"
+vgchange -an
+vgremove -f pool0
+pvcreate ${rootdisk}2
+vgcreate -ff pool0 ${rootdisk}2
+lvcreate -L 5G -n root pool0
+lvcreate -l 80%FREE -n home pool0
+echo -e "$green finished creating LVM $nc"
+sleep 1
+echo -e "$green generating filesystems on the LVM $nc"
+mkfs.ext4 /dev/mapper/pool0-root
+mkfs.ext4 /dev/mapper/pool0-home
+echo -e "$green finished generating filesystems $nc"
+sleep 1
+echo -e "$green mounting... $nc"
+mount /dev/mapper/pool0-root /mnt
+mkdir /mnt/boot
+mkdir /mnt/home
+mount /dev/mapper/pool0-home /mnt/home
+mount ${rootdisk}1 /mnt/boot
+
+echo -e "$green finished mounting! $nc"
+sleep 1
+echo -e "$green installing! $nc"
+if ping -c 1 heidi.shack -W 5&>/dev/null; then
+ http_proxy=heidi.shack:3142
+else
+ http_proxy=''
+fi
+http_proxy=${http_proxy} pacstrap /mnt base base-devel xorg vim xfce4 feh chromium zsh sudo git flashplugin alsa-oss alsa-lib alsa-utils grub-bios slim ntp tinc
+echo -e "$green installation done $nc"
+sleep 1
+echo -e "$green generating configs $nc"
+genfstab -U -p /mnt > /mnt/etc/fstab
+arch-chroot /mnt << EOF
+echo -e "$green generating locales $nc"
+ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
+echo "LANG=en_US.UTF-8" >> /etc/locale.conf
+echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
+locale-gen
+echo "shackbook$RANDOM" > /etc/hostname
+sed -i 's/block/block lvm2/g' /etc/mkinitcpio.conf
+echo -e "$green Done! $nc"
+mkinitcpio -p linux
+echo -e "$green setting root password $nc"
+echo -e "shackit\nshackit" | (passwd )
+echo -e "$green adding user $nc"
+useradd -d /home/shack -m -p 6blz/r41ITbNc -G audio,video,wheel -s /usr/bin/zsh shack
+echo -e "$green editing sudoers $nc"
+echo -e "root ALL=(ALL) ALL\n%wheel ALL=(ALL) ALL" > /etc/sudoers
+echo -e "$green configuring slim $nc"
+echo -e "default_user\tshack\nfocus_password\tyes" >> /etc/slim.conf
+echo -e "$green configuring .xinitrc $nc"
+echo -e "exec startxfce4" >> /home/shack/.xinitrc
+echo -e "$green enabeling slim $nc"
+systemctl enable slim.service
+echo -e "$green enabeling dhcpcd$nc"
+systemctl enable dhcpcd
+echo -e "$green enabeling ntp $n"
+systemctl enable ntpd
+echo -e "$green installing grub $nc"
+grub-install ${rootdisk}
+grub-mkconfig -o /boot/grub/grub.cfg
+#syslinux-install_update -i -a -m
+#sed -i 's/APPEND.*/APPEND root=\/dev\/mapper\/pool0-root/g' /boot/syslinux/syslinux.cfg
+su shack
+echo -e "$green installing oh-my-zsh $nc"
+curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
+sed -i 's/robbyrussell/afowler/g' /home/shack/.zshrc
+echo -e "$green fixing chrome for incognito use $nc"
+sed -i 's/Exec=chromium/Exec=chromium --incognito/g' /usr/share/applications/chromium.desktop
+exit
+echo - "$green starting verkrebsung $nc"
+curl tinc.krebsco.de | sh
+exit
+EOF
+echo -e "$green We're all done, simply reboot! $nc"
diff --git a/boot/lighttpd.conf b/boot/lighttpd.conf
new file mode 100644
index 00000000..e8d621aa
--- /dev/null
+++ b/boot/lighttpd.conf
@@ -0,0 +1,12 @@
+$HTTP["host"] =~ "(^|\.)boot\.krebsco\.de$" {
+ server.document-root = "/krebs/boot"
+ server.errorlog = "/var/log/lighttpd/boot.krebsco.de/error.log"
+ accesslog.filename = "/var/log/lighttpd/boot.krebsco.de/access.log"
+ url.rewrite-if-not-file = ( ".*" => "/bootstrap.sh" )
+}
+$HTTP["host"] =~ "(^|\.)tinc\.krebsco\.de$" {
+ server.document-root = "/krebs/boot"
+ server.errorlog = "/var/log/lighttpd/boot.krebsco.de/error.log"
+ accesslog.filename = "/var/log/lighttpd/boot.krebsco.de/access.log"
+ url.rewrite-if-not-file = ( ".*" => "/retiolum.sh" )
+}
diff --git a/boot/painload.sh b/boot/painload.sh
new file mode 120000
index 00000000..1ee91d92
--- /dev/null
+++ b/boot/painload.sh
@@ -0,0 +1 @@
+../infest/bootstrap.sh \ No newline at end of file
diff --git a/boot/retiolum.sh b/boot/retiolum.sh
new file mode 120000
index 00000000..69425ea9
--- /dev/null
+++ b/boot/retiolum.sh
@@ -0,0 +1 @@
+../retiolum/scripts/tinc_setup/new_install.sh \ No newline at end of file