├── README.md ├── debian-minimal.seed ├── debian-ubuntu-ssh-install.seed ├── debian-wheezy-backports-minimal-preseed.seed ├── debian-wheezy-backports-minimal.seed ├── debian-wheezy-backports.seed ├── ipxe ├── menu.ipxe ├── menu.livecd.ipxe ├── menu.netinstall.ipxe └── scripts │ ├── build_ipxe.sh │ ├── grub │ └── 49_ipxe │ └── install_grub_ipxe.sh ├── kickstart ├── centos5-minimal.cfg ├── centos7-minimal.cfg └── scientificlinux58-minimal.cfg ├── late_command.conf ├── late_command.rc ├── late_command.service ├── late_command.sh ├── pxe ├── isolinux.cfg ├── preseed.precise.amd64.conf ├── preseed.precise.i386.conf ├── preseed.saucy.amd64.conf ├── preseed.saucy.i386.conf ├── preseed.squeeze.amd64.conf ├── preseed.wheezy.amd64.conf ├── scripts │ ├── create.netinstall.ubuntu.cd.sh │ ├── create.network.install.iso.sh │ ├── update.ubuntu.pxe.files.cronjob │ └── update.ubuntu.pxe.files.sh └── sles10.conf ├── raid1lvm.seed ├── raid5lvm.seed ├── regular.seed └── ubuntu-minimal.seed /README.md: -------------------------------------------------------------------------------- 1 | Installation chart 2 | ======= 3 | 4 | * NET PXE boot (http://dl.panticz.de/ipxe/ipxe.pxe) 5 | * USB boot (http://dl.panticz.de/ipxe/ipxe.usb) 6 | * CD boot (http://dl.panticz.de/ipxe/ipxe.iso) 7 | * GRUB boot (http://dl.panticz.de/ipxe/ipxe.lkrn) 8 | * | 9 | * iPXE boot (Compile iPXE: https://raw.githubusercontent.com/panticz/preseed/master/ipxe/scripts/build_ipxe.sh) 10 | * http://preseed.panticz.de/< MAC_ADDRESS > 11 | * | 12 | * https://raw.githubusercontent.com/panticz/preseed/master/ipxe/menu.netinstall.ipxe 13 | * | 14 | * | Minimal Ubuntu preseed configuration 15 | * |--- https://raw.githubusercontent.com/panticz/preseed/master/ubuntu-minimal.seed 16 | * | 17 | * | Automatic partitioning, if enabled (RAID1, LVM, ...) 18 | * |--- [ https://raw.githubusercontent.com/panticz/preseed/master/regular.seed ] 19 | * |--- [ https://raw.githubusercontent.com/panticz/preseed/master/raid1lvm.seed ] 20 | * |--- [ https://raw.githubusercontent.com/panticz/preseed/master/raid5lvm.seed ] 21 | * | 22 | * | Additional client specific configuration (partitioning, languages, user, ...) 23 | * |--- http://preseed.panticz.de/< MAC_HASH >.seed 24 | * | 25 | * |--- REBOOT 26 | * | 27 | * | Additional client specific post installation (init script) 28 | * |--- https://raw.githubusercontent.com/panticz/preseed/master/late_command.conf 29 | * | 30 | * | Post installation script (applications, hardware configuration, ...) 31 | * |--- https://raw.githubusercontent.com/panticz/preseed/master/late_command.sh 32 | * | 33 | * | Client specific post installation script 34 | * |--- http://preseed.panticz.de/lc/< MAC_HASH > 35 | * | 36 | * | Installit: Automatic installation scripts (https://github.com/panticz/installit) e.g. 37 | * |--- https://raw.githubusercontent.com/panticz/installit/master/install.gnome-fallback.sh 38 | * | 39 | * |--- REBOOT 40 | * | 41 | * Installation completed, login to new system 42 | -------------------------------------------------------------------------------- /debian-minimal.seed: -------------------------------------------------------------------------------- 1 | # To access this file via http use following redirection: 2 | # http://preseed.panticz.de/preseed/debian-minimal.seed 3 | 4 | # Localization 5 | d-i debian-installer/locale string en_US.UTF-8 6 | d-i keyboard-configuration/xkb-keymap select us 7 | 8 | # Network configuration 9 | d-i netcfg/choose_interface select auto 10 | 11 | # Clock and time zone setup 12 | d-i clock-setup/ntp boolean true 13 | d-i time/zone string Europe/Berlin 14 | 15 | # Mirror settings 16 | d-i mirror/protocol string http 17 | d-i mirror/http/hostname string http://ftp2.de.debian.org 18 | d-i mirror/http/directory string /debian/ 19 | 20 | d-i debconf/priority select critical 21 | d-i auto-install/enabled boolean true 22 | 23 | # Account setup 24 | d-i passwd/root-password password t00r 25 | d-i passwd/root-password-again password t00r 26 | d-i passwd/make-user boolean false 27 | d-i user-setup/allow-password-weak boolean true 28 | 29 | # Apt setup 30 | d-i apt-setup/restricted boolean true 31 | d-i apt-setup/universe boolean true 32 | d-i apt-setup/multiverse boolean true 33 | d-i apt-setup/backports boolean true 34 | d-i apt-setup/non-free boolean true 35 | d-i apt-setup/contrib boolean true 36 | d-i apt-setup/security-updates boolean true 37 | d-i apt-setup/partner boolean true 38 | 39 | d-i hw-detect/load-firmware boolean true 40 | 41 | # Package selection 42 | tasksel tasksel/first multiselect ssh-server 43 | #d-i pkgsel/update-policy select unattended-upgrades 44 | 45 | # proxy 46 | d-i preseed/early_command string \ 47 | ping -c 1 apt-cacher > /dev/null 2>&1 && debconf-set mirror/http/proxy "http://apt-cacher:3142/" || echo 48 | 49 | # partman 50 | d-i partman/early_command string \ 51 | if [ $(cat /proc/cmdline | grep autopart | wc -l) -eq 1 ]; then \ 52 | DISCS=$(list-devices disk | wc -l) ;\ 53 | if [ ${DISCS} -gt 2 ]; then \ 54 | echo "raid5" >> /tmp/debug ;\ 55 | wget http://preseed.panticz.de/preseed/raid5lvm.seed -O /tmp/partman.cfg ;\ 56 | debconf-set-selections /tmp/partman.cfg ;\ 57 | elif [ ${DISCS} -eq 2 ]; then \ 58 | echo "raid1" >> /tmp/debug ;\ 59 | wget http://preseed.panticz.de/preseed/raid1lvm.seed -O /tmp/partman.cfg ;\ 60 | debconf-set-selections /tmp/partman.cfg ;\ 61 | else \ 62 | echo "regular" >> /tmp/debug ;\ 63 | wget http://preseed.panticz.de/preseed/regular.seed -O /tmp/partman.cfg ;\ 64 | debconf-set-selections /tmp/partman.cfg ;\ 65 | fi \ 66 | fi 67 | 68 | # Run 69 | ###d-i preseed/run string run.sh 70 | 71 | # Custom commands 72 | d-i preseed/include_command string \ 73 | MAC=$(ip link | sed -n "/BROADCAST.*UP/{n;p}" | tr -s " " | cut -d" " -f3); \ 74 | HOST=$(echo ${MAC} | md5sum | cut -d" " -f1); \ 75 | wget http://preseed.panticz.de/${HOST}.seed -P /tmp > /dev/null; \ 76 | if [ $? -eq 0 ]; then echo http://preseed.panticz.de/${HOST}.seed; fi 77 | 78 | d-i preseed/late_command string \ 79 | in-target mv /etc/rc.local /etc/rc.local.org && \ 80 | in-target wget --no-check-certificate https://raw.github.com/panticz/preseed/master/late_command.rc -O /etc/rc.local && \ 81 | in-target chmod a+x /etc/rc.local 82 | 83 | # Finishing up the installation 84 | d-i finish-install/reboot_in_progress note 85 | -------------------------------------------------------------------------------- /debian-ubuntu-ssh-install.seed: -------------------------------------------------------------------------------- 1 | d-i network-console/password password installer 2 | d-i network-console/password-again password installer 3 | d-i preseed/early_command string anna-install network-console 4 | -------------------------------------------------------------------------------- /debian-wheezy-backports-minimal-preseed.seed: -------------------------------------------------------------------------------- 1 | d-i preseed/include string \ 2 | http://preseed.panticz.de/preseed/debian-minimal.seed \ 3 | http://preseed.panticz.de/preseed/debian-wheezy-backports-minimal.seed 4 | -------------------------------------------------------------------------------- /debian-wheezy-backports-minimal.seed: -------------------------------------------------------------------------------- 1 | # install debian wheezy 2 | d-i mirror/suite string wheezy 3 | 4 | # install linux kernel from wheezy-backports 5 | d-i preseed/late_command string \ 6 | in-target apt-get install -y -t wheezy-backports linux-image-amd64 && \ 7 | in-target mv /etc/rc.local /etc/rc.local.org && \ 8 | in-target wget --no-check-certificate https://raw.github.com/panticz/preseed/master/late_command.rc -O /etc/rc.local && \ 9 | in-target chmod a+x /etc/rc.local 10 | -------------------------------------------------------------------------------- /debian-wheezy-backports.seed: -------------------------------------------------------------------------------- 1 | # install debian wheezy 2 | d-i mirror/suite string wheezy 3 | 4 | # install linux kernel from wheezy-backports 5 | d-i preseed/late_command string in-target apt-get install -y -t wheezy-backports linux-image-amd64 6 | -------------------------------------------------------------------------------- /ipxe/menu.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | # To access this file via http use following redirection: 4 | # http://preseed.panticz.de/ipxe/menu.ipxe 5 | 6 | set mainmenu http://preseed.panticz.de/ipxe/menu.ipxe 7 | 8 | # choose boot image 9 | menu Please choose an operating system to boot 10 | item 11 | item --gap URL: ${mainmenu} 12 | item --gap MAC: ${mac} 13 | item 14 | item localboot Boot from first harddisk 15 | item 16 | item --gap Images: 17 | item livecd + LiveCD... 18 | item install + NetInstal... 19 | item memtest Memtest86+ 20 | item hdt Hardware Detection Tool 21 | item live Tiny Core Linux 22 | item intelflash Intel BootUtil 23 | item dosboot dosboot 24 | item 25 | item config iPXE config menu 26 | choose --default exit --timeout 10000 target && goto ${target} 27 | 28 | :config 29 | config 30 | 31 | :livecd 32 | chain http://preseed.panticz.de/ipxe/menu.livecd.ipxe 33 | 34 | :install 35 | chain http://preseed.panticz.de/ipxe/menu.netinstall.ipxe 36 | 37 | :localboot 38 | sanboot --no-describe --drive 0x80 39 | 40 | :memtest 41 | chain http://www.memtest.org/download/5.01/memtest86+-5.01.bin 42 | 43 | :hdt 44 | set 209:string ipxe/hdt/hdt_052.conf 45 | set 210:string http://preseed.panticz.de/ 46 | chain ipxe/pxelinux.0 47 | #imgfetch http://www.hdt-project.org/raw-attachment/wiki/hdt-0.5.0/hdt-0.5.2.img.gz 48 | #chain http://preseed.panticz.de/ipxe/memdisk 49 | 50 | :intelflash 51 | imgfetch http://preseed.panticz.de/ipxe/intelflash.img 52 | chain http://preseed.panticz.de/ipxe/memdisk 53 | 54 | :dosboot 55 | imgfetch http://preseed.panticz.de/ipxe/dosboot.img 56 | chain http://preseed.panticz.de/ipxe/memdisk 57 | 58 | :live 59 | #imgfetch http://ftp-stud.hs-esslingen.de/pub/Mirrors/releases.ubuntu.com/12.10/ubuntu-12.10-desktop-amd64.iso 60 | # chain http://preseed.panticz.de/ipxe/memdisk iso 61 | initrd http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/distribution_files/core.gz 62 | chain http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/distribution_files/vmlinuz 63 | boot 64 | -------------------------------------------------------------------------------- /ipxe/menu.livecd.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | # To access this file via http use following redirection: 4 | # http://preseed.panticz.de/ipxe/menu.livecd.ipxe 5 | 6 | menu LiveCD 7 | item --gap Ubuntu: 8 | item live_ubuntu_16.04 Ubuntu Trusty 16.04 LiveCD 9 | item live_ubuntu_14.04 Ubuntu Trusty 14.04 LiveCD 10 | item live_ubuntu_12.04 Ubuntu Precise 12.04 LiveCD 11 | item 12 | item --gap Fedora: 13 | item live_fedora_18 Fedora 18 LiveCD (BROKEN) 14 | item 15 | item --gap other OS: 16 | item tinycorelinux Tiny Core Linux 17 | item grml_32_small Grml 32 2013.02 small LiveCD 18 | item freedos FreeDOS 1.1 Base 19 | item breakin breakin 3.71 20 | item boot.iso Boot ISO file 21 | item dft Drive Fitness Test 22 | item 23 | item back < Back to main menu 24 | choose target && goto ${target} 25 | 26 | :back 27 | chain ${mainmenu} 28 | 29 | 30 | # 31 | # Ubuntu 32 | # 33 | :live_ubuntu_16.04 34 | initrd tftp://${next-server}/live/ubuntu/16.04/casper/initrd.lz 35 | chain tftp://${next-server}/live/ubuntu/16.04/casper/vmlinuz.efi boot=casper netboot=nfs nfsroot=${next-server}:/var/lib/tftpboot/live/ubuntu/16.04 BOOTIF=01-${net0/mac:hexhyp} 36 | 37 | :live_ubuntu_14.04 38 | initrd tftp://${next-server}/live/ubuntu/14.04/casper/initrd.lz 39 | chain tftp://${next-server}/live/ubuntu/14.04/casper/vmlinuz boot=casper netboot=nfs nfsroot=${next-server}:/var/lib/tftpboot/live/ubuntu/14.04 BOOTIF=01-${net0/mac:hexhyp} 40 | 41 | :live_ubuntu_12.04 42 | initrd tftp://${next-server}/live/ubuntu/12.04/casper/initrd.lz 43 | chain tftp://${next-server}/live/ubuntu/12.04/casper/vmlinuz boot=casper netboot=nfs nfsroot=${next-server}:/var/lib/tftpboot/live/ubuntu/12.04 BOOTIF=01-${net0/mac:hexhyp} 44 | 45 | 46 | # 47 | # Fedora 48 | # 49 | :live_fedora_18 50 | initrd tftp://${next-server}/live/fedora/18/initrd0.img 51 | chain tftp://${next-server}/live/fedora/18/vmlinuz0 rootflags=loop root=live:/Fedora-18-i686-Live-Desktop.iso rootfstype=auto ro liveimg rhgb rd.luks=0 rd.md=0 rd.dm=0 52 | 53 | :live_fedora_18_test_1 54 | initrd tftp://${next-server}/live/fedora/18/initrd0.img 55 | chain tftp://${next-server}/live/fedora/18/vmlinuz0 netboot=nfs root=/dev/nfs root=live:nfs://${next-server}:/var/lib/tftpboot/live/fedora/18/squashfs.img 56 | 57 | :live_fedora_18_test_2 58 | initrd tftp://${next-server}/live/fedora/18/initrd0.img 59 | chain tftp://${next-server}/live/fedora/18/vmlinuz0 inst.repo=nfs:${next-server}:/var/lib/tftpboot/live/fedora/18/Fedora-18-i686-Live-Desktop.iso rootfstype=auto ro liveimg rhgb rd.luks=0 rd.md=0 rd.dm=0 rootflags=loop 60 | 61 | 62 | # 63 | # other 64 | # 65 | :tinycorelinux 66 | initrd http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/distribution_files/core.gz 67 | chain http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/distribution_files/vmlinuz 68 | 69 | :grml_32_small 70 | initrd tftp://${next-server}/live/grml/32-small/initrd.img 71 | chain tftp://${next-server}/live/grml/32-small/vmlinuz root=/dev/nfs rw nfsroot=${next-server}:/var/lib/tftpboot/live/grml/32-small live-media-path=/ boot=live lang=us nomce apm=power-off noprompt noeject vga=791 72 | 73 | :freedos 74 | imgfetch http://www.freedos.org/download/download/fd11src.iso 75 | chain http://preseed.panticz.de/ipxe/memdisk iso 76 | 77 | :breakin 78 | initrd http://www.advancedclustering.com/download-document/21-bootimage-includes-breakin-v3-for-x86_64-bootable-iso.html 79 | chain http://preseed.panticz.de/ipxe/memdisk iso raw 80 | 81 | :boot.iso 82 | imgfetch http://dl.panticz.de/ipxe/boot.iso 83 | chain http://preseed.panticz.de/ipxe/memdisk iso 84 | 85 | :dft 86 | imgfetch http://www.hgst.com/sites/default/files/downloads/dft32_v416_b00.iso 87 | chain http://preseed.panticz.de/ipxe/memdisk iso 88 | -------------------------------------------------------------------------------- /ipxe/menu.netinstall.ipxe: -------------------------------------------------------------------------------- 1 | #!ipxe 2 | 3 | # To access this file via http use following redirection: 4 | # http://preseed.panticz.de/ipxe/menu.netinstall.ipxe 5 | 6 | # choose cpu architecture 7 | cpuid --ext 29 && set arch amd64 || set arch i386 8 | 9 | menu NetInstall 10 | item --gap NetInstall Ubuntu Preseed (user: ubuntu, password: ubuntu): 11 | item install_ubuntu_20.10 Ubuntu 20.10 Groovy 12 | item install_ubuntu_20.04 Ubuntu 20.04 LTS Focal 13 | item install_ubuntu_18.04 Ubuntu 18.04 LTS Bionic 14 | item install_ubuntu_16.04 Ubuntu 16.04 LTS Xenial 15 | item 16 | item --gap NetInstall Ubuntu Preseed autopart (ALL DATA WIL BY REMOVED!) (user: ubuntu, password: t00r): 17 | item install_ubuntu_20.04_autopart Ubuntu 20.04 LTS Focal autopart 18 | item install_ubuntu_18.04_autopart Ubuntu 18.04 LTS Bionic autopart 19 | item install_ubuntu_16.04_autopart Ubuntu 16.04 LTS Xenial autopart 20 | item 21 | item --gap NetInstall Debian Preseed (user: root, password: t00r): 22 | item install_debian_10 Debian 10 Buster 23 | item install_debian_9 Debian 9 Stretch 24 | item install_debian_8 Debian 8 Jessie 25 | item 26 | item --gap NetInstall Fedora: 27 | item install_fedora_25 Fedora 25 28 | item install_fedora_25_kickstart Fedora 25 (kickstart) 29 | item 30 | item --gap NetInstall CentOS: 31 | item install_centos_7 CentOS 7 32 | item install_centos_7_kickstart CentOS 7 (kickstart) 33 | item 34 | item --gap NetInstall Arch Linux: 35 | item install_arch_linux Arch Linux Netboot 36 | item 37 | item back < Back to main menu 38 | choose target && goto ${target} 39 | 40 | :back 41 | isset ${mainmenu} || set mainmenu http://preseed.panticz.de/ipxe/menu.ipxe 42 | chain ${mainmenu} 43 | 44 | 45 | # 46 | # Ubuntu 47 | # 48 | :install_ubuntu_20.10 49 | set release groovy 50 | goto install_ubuntu 51 | 52 | :install_ubuntu_20.04 53 | set release focal 54 | set legacy legacy- 55 | goto install_ubuntu 56 | 57 | :install_ubuntu_20.04_autopart 58 | set autopart autopart 59 | set release focal 60 | goto install_ubuntu 61 | 62 | :install_ubuntu_18.04 63 | set release bionic 64 | goto install_ubuntu 65 | 66 | :install_ubuntu_18.04_autopart 67 | set autopart autopart 68 | set release bionic 69 | goto install_ubuntu 70 | 71 | :install_ubuntu_16.04 72 | set release xenial 73 | goto install_ubuntu 74 | 75 | :install_ubuntu_16.04_autopart 76 | set autopart autopart 77 | set release xenial 78 | goto install_ubuntu 79 | 80 | :install_ubuntu 81 | initrd http://archive.ubuntu.com/ubuntu/dists/${release}/main/installer-${arch}/current/${legacy}images/netboot/ubuntu-installer/${arch}/initrd.gz 82 | chain http://archive.ubuntu.com/ubuntu/dists/${release}/main/installer-${arch}/current/${legacy}images/netboot/ubuntu-installer/${arch}/linux url=http://preseed.panticz.de/preseed/ubuntu-minimal.seed auto=true netcfg/choose_interface=${net0/mac} locale=en_US.UTF-8 priority=critical net.ifnames=0 biosdevname=0 ${autopart} ${options} 83 | 84 | # 85 | # Debian 86 | # 87 | :install_debian_10 88 | set release buster 89 | goto install_debian 90 | 91 | :install_debian_9 92 | set release stretch 93 | goto install_debian 94 | 95 | :install_debian_8 96 | set release jessie 97 | goto install_debian 98 | 99 | :install_debian 100 | initrd http://cdn.debian.net/debian/dists/${release}/main/installer-${arch}/current/images/netboot/debian-installer/${arch}/initrd.gz 101 | chain http://cdn.debian.net/debian/dists/${release}/main/installer-${arch}/current/images/netboot/debian-installer/${arch}/linux url=http://preseed.panticz.de/preseed/debian-minimal.seed auto=true netcfg/choose_interface=${net0/mac} priority=critical ${autopart} 102 | 103 | # 104 | # Fedora 105 | # 106 | :install_fedora_25 107 | set release 25 108 | goto install_fedora 109 | 110 | :install_fedora_25_kickstart 111 | set release 25 112 | set ks http://preseed.panticz.de/ks/fedora-minimal.ks 113 | goto install_fedora 114 | 115 | :install_fedora 116 | initrd http://ftp.halifax.rwth-aachen.de/fedora/linux/releases/${release}/Workstation/x86_64/os/images/pxeboot/initrd.img 117 | chain http://ftp.halifax.rwth-aachen.de/fedora/linux/releases/${release}/Workstation/x86_64/os/images/pxeboot//vmlinuz ksdevice=link inst.repo=http://ftp.halifax.rwth-aachen.de/fedora/linux/releases/${release}/Workstation/x86_64/os/ ks=${ks} 118 | 119 | 120 | 121 | # 122 | # CentOS 123 | # 124 | # TODO: auto 32/64 bit 125 | :install_centos_7 126 | initrd http://mirror.netcologne.de/centos/7/os/x86_64/isolinux/initrd.img 127 | chain http://mirror.netcologne.de/centos/7/os/x86_64/isolinux/vmlinuz 128 | 129 | :install_centos_7_kickstart 130 | initrd http://mirror.netcologne.de/centos/7/os/x86_64/isolinux/initrd.img 131 | chain http://mirror.netcologne.de/centos/7/os/x86_64/isolinux/vmlinuz ksdevice=link edd=off ks=http://preseed.panticz.de/kickstart/centos7-minimal.cfg net.ifnames=0 biosdevname=0 132 | 133 | # 134 | # Arch Linux 135 | # 136 | :install_arch_linux 137 | cpuid --ext 29 && set arch x86_64 || set arch i686 138 | initrd http://mirror.netcologne.de/archlinux/iso/latest/arch/boot/${arch}/archiso.img 139 | chain http://mirror.netcologne.de/archlinux/iso/latest/arch/boot/${arch}/vmlinuz autopartarchiso_http_srv=http://mirror.netcologne.de/archlinux/iso/latest/ archisobasedir=arch checksum=y ip=dhcp 140 | -------------------------------------------------------------------------------- /ipxe/scripts/build_ipxe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install requirements 4 | sudo apt-get install -y build-essential liblzma-dev 5 | 6 | # get source 7 | git clone git://git.ipxe.org/ipxe.git /tmp/ipxe 8 | 9 | # create boot script 10 | cat < /tmp/ipxe/src/boot.ipxe 11 | #!ipxe 12 | 13 | dhcp && chain http://\${next-server}/\${mac} || chain http://preseed.panticz.de/\${mac} 14 | EOF 15 | 16 | # OPTIONAL: enable HTTPS support 17 | sed -i -e '/DOWNLOAD_PROTO_HTTPS/ s/#undef/#define/' /tmp/ipxe/src/config/general.h 18 | 19 | # OPTIONAL: change product name 20 | sed -i 's|PRODUCT_NAME ""|PRODUCT_NAME "preseed.panticz.de"|g' /tmp/ipxe/src/config/general.h 21 | 22 | cd /tmp/ipxe/src 23 | 24 | # build CD image (/tmp/ipxe/src/bin/ipxe.iso) 25 | make bin/ipxe.iso EMBED=boot.ipxe 26 | 27 | # build USB image (/tmp/ipxe/src/bin/ipxe.usb) 28 | make bin/ipxe.usb EMBED=boot.ipxe 29 | 30 | # build PXE image (/tmp/ipxe/src/bin/ipxe.pxe) 31 | make bin/ipxe.pxe EMBED=boot.ipxe 32 | 33 | # build GRUB image (/tmp/ipxe/src/bin/ipxe.lkrn) 34 | make bin/ipxe.lkrn EMBED=boot.ipxe 35 | 36 | # build undionly image (/tmp/ipxe/src/bin/undionly.kpxe) 37 | make bin/undionly.kpxe EMBED=boot.ipxe 38 | -------------------------------------------------------------------------------- /ipxe/scripts/grub/49_ipxe: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ "$GRUB_FS" == "btrfs" ] && SUBVOL="$(mount | grep " / " | cut -d "=" -f3 | cut -d ")" -f1)" || SUBVOL="/boot" 4 | 5 | cat < /dev/tty1 7 | end script 8 | -------------------------------------------------------------------------------- /late_command.rc: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # wait util network comes up 4 | sleep 10 5 | 6 | wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/preseed/master/late_command.sh -O /tmp/late_command.sh && \ 7 | mv /etc/rc.local.org /etc/rc.local && \ 8 | bash /tmp/late_command.sh 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /late_command.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=preseed late_command script 3 | After=network.target 4 | 5 | [Service] 6 | StandardOutput=tty 7 | ExecStartPre=/usr/bin/wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/preseed/master/late_command.sh -O /tmp/late_command.sh 8 | ExecStart=/bin/bash /tmp/late_command.sh 9 | ExecStartPost=/bin/systemctl disable late_command.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | -------------------------------------------------------------------------------- /late_command.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script will run once after a fresh installation 4 | 5 | # todo 6 | # clear terminal from wrapped lines 7 | 8 | LOG=/var/log/auto-install.log 9 | #MAC=$(LANG=us_EN; ifconfig -a | head -1 | awk /HWaddr/'{print tolower($5)}') 10 | if [ ! -z $1 ]; then 11 | MAC=$1 12 | else 13 | MAC=$(ip link | sed -n "/BROADCAST.*state UP/{n;p}" | tail -1 | tr -s " " | cut -d" " -f3) 14 | if [ -z ${MAC} ]; then 15 | IFACE=$(route | grep default | sed -e's/ */ /g' | cut -d" " -f8) 16 | MAC=$(ip link | sed -n "/${IFACE}/{n;p}" | tail -1 | tr -s " " | cut -d" " -f3) 17 | fi 18 | fi 19 | 20 | MAC_HASH=$(echo ${MAC} | md5sum | cut -d" " -f1) 21 | 22 | 23 | # default functions 24 | function script4() { 25 | if [ ! -z ${1} ]; then 26 | URL=https://raw.githubusercontent.com/panticz/installit/master/${1} 27 | FILE=${URL##*/} 28 | 29 | echo "URL:$URL" 30 | 31 | wget -q --no-check-certificate ${URL} -O /tmp/${FILE} 32 | chmod +x /tmp/${FILE} 33 | bash /tmp/${FILE} ${2} 2>&1 | tee -a ${LOG} 34 | fi 35 | } 36 | 37 | # install 38 | function install() { 39 | echo "--- install $@ ---" >> ${LOG} 40 | apt-get install -y --force-yes $@ 2>&1 | tee -a ${LOG} 41 | } 42 | 43 | # create user 44 | function addUser() { 45 | USERNAME=$1 46 | 47 | echo "--- addUser ($USERNAME)---" 48 | 49 | if [ ! -z $USERNAME ]; then 50 | useradd -m $USERNAME 51 | echo $USERNAME > /tmp/pw 52 | echo $USERNAME >> /tmp/pw 53 | passwd $USERNAME < /tmp/pw 54 | rm /tmp/pw 55 | fi 56 | } 57 | 58 | 59 | # 60 | # APPS 61 | # 62 | function install_ubuntu-restricted-extras() { 63 | script4 install.ubuntu-restricted-extras.sh 64 | } 65 | 66 | function install_skype() { 67 | script4 install.skype.sh 68 | } 69 | 70 | function install_twinkle() { 71 | script4 install.twinkle.sh 72 | } 73 | 74 | function install_boxee() { 75 | script4 dep/install.boxee.sh 76 | } 77 | 78 | function install_openttd() { 79 | script4 install.openttd.sh 80 | } 81 | 82 | function install_wine() { 83 | script4 install.wine.sh 84 | } 85 | 86 | function install_hibiscus() { 87 | script4 install.hibiscus.sh 88 | } 89 | 90 | function install_atom() { 91 | script4 install.atom.sh 92 | } 93 | 94 | function install_dropbox() { 95 | script4 install.dropbox.sh 96 | } 97 | 98 | function install_acroread() { 99 | script4 install.acroread.sh 100 | } 101 | 102 | function install_icinga() { 103 | script4 install.icinga.sh 104 | } 105 | 106 | function install_puppet_client() { 107 | script4 install.puppet-client.sh 108 | } 109 | 110 | function install_nemo() { 111 | script4 install.nemo.sh 112 | } 113 | 114 | 115 | # 116 | # DEVELOPMENT 117 | # 118 | function install_sqldeveloper() { 119 | script4 install.sqldeveloper.sh http://srv/ubuntu/install/sqldeveloper-no-jre.zip $1 120 | } 121 | 122 | function install_netbeans() { 123 | script4 install.netbeans.sh 124 | 125 | # fix bold menu font 126 | sudo apt-get remove -y fonts-unfonts-core 127 | } 128 | 129 | function install_eclipse() { 130 | script4 install.eclipse.sh 131 | } 132 | 133 | 134 | 135 | # 136 | # PRINTER 137 | # 138 | function install_HP-Laserjet-4050n() { 139 | PRINTER_NAME=$1 140 | PRINTER_IP=$2 141 | 142 | # check parameter 143 | [ -z ${PRINTER_NAME} ] && PRINTER_NAME=HP-Laserjet-4050n 144 | [ -z ${PRINTER_IP} ] && PRINTER_IP=hp4050 145 | 146 | # create printer 147 | wget -q http://dl.panticz.de/hardware/hp_laserjet_4050n/HP-Laserjet-4050n.ppd -O /tmp/HP-Laserjet-4050n.ppd 148 | sudo lpadmin -p ${PRINTER_NAME} -v socket://${PRINTER_IP}:9100 -E -P /tmp/HP-Laserjet-4050n.ppd 149 | rm /tmp/HP-Laserjet-4050n.ppd 150 | 151 | #sudo /usr/bin/lpoptions -o Resolution=600dpi -o Option1=True -o Duplex=DuplexNoTumble -o InputSlot=Auto 152 | } 153 | 154 | function install_HP-Officejet-Pro-8500-a910() { 155 | IP=$1 156 | 157 | wget -q http://dl.panticz.de/hardware/hp_officejet-pro-8500/HP-Officejet-Pro-8500-a910.ppd -O /tmp/HP-Officejet-Pro-8500-a910.ppd 158 | sudo lpadmin -p HP8500 -v socket://${IP}:9100 -E -P "/tmp/HP-Officejet-Pro-8500-a910.ppd" 159 | } 160 | 161 | function install_Kyocera-FS-C5016N() { 162 | # get driver from kyocera homepage 163 | wget http://www.kyoceramita.de/dlc/de/driver/all/linux_ppd_s_ksl_8.-downloadcenteritem-Single-File.downloadcenteritem.tmp/Linux_PPDs_KSL8_4.zip -P /tmp/ 164 | unzip /tmp/Linux_PPDs_KSL8_4.zip -d /tmp 165 | sudo lpadmin -p LaserColor -v socket://192.168.1.15:9100 -E -P "/tmp/PPD's_KSL_8.4/English/Kyocera_Mita_FS-C5016N_en.ppd" 166 | #Foomatic/hpijs-pcl5e 167 | # -o PageSize=A4 168 | 169 | # install linux driver 170 | # foomatic-ppdfile -p "foomatic-ppdfile:Kyocera-FS-C5016N-Postscript.ppd" > /tmp/Kyocera-FS-C5016N-Postscript.ppd 171 | # lpadmin -p LaserColorOben -v socket://192.168.1.11:9100 -E -P /tmp/Kyocera-FS-C5016N-Postscript.ppd -o PageSize=A4 172 | 173 | # clean up 174 | rm /tmp/Linux_PPDs_KSL8_4.zip 175 | rm -r /tmp/PPD*_KSL_8.4 176 | } 177 | 178 | function install_Kyocera-FS-3820N() { 179 | # get driver from kyocera homepage 180 | wget http://www.kyoceramita.de/dlc/de/driver/all/linux_ppd_s_ksl_8.-downloadcenteritem-Single-File.downloadcenteritem.tmp/Linux_PPDs_KSL8_4.zip -P /tmp/ 181 | unzip /tmp/Linux_PPDs_KSL8_4.zip -d /tmp 182 | sudo lpadmin -p Laser -v socket://192.168.1.11:9100 -E -P "/tmp/PPD's_KSL_8.4/English/Kyocera_Mita_FS-3820N_en.ppd" 183 | 184 | # clean up 185 | rm /tmp/Linux_PPDs_KSL8_4.zip 186 | rm -r /tmp/PPD*_KSL_8.4 187 | } 188 | 189 | function install_epson_business_inkjet() { 190 | script4 hardware/install.epson-business-inkjet.sh 191 | sudo lpadmin -p EpsonOben -v socket://EpsonOben:2501 -E -P /usr/share/cups/model/ekpxb310.ppd 192 | # -o DefaultInputSlot=Front 193 | # lpoptions -p EpsonColor -o MediaType=PLAIN -o PageSize=A5 194 | } 195 | 196 | function install_printer_kyocera() { 197 | # configure parameter 198 | PRINTER_NAME=${1:-Kyocera-Printer} 199 | PRINTER_IP=${2:-192.168.1.1} 200 | PRINTER_PPD=${3:-"/tmp/PPD's_KSL_8.4/English/Kyocera_FS-1030_en.ppd"} 201 | 202 | # download driver from kyocera homepage 203 | wget -q http://www.kyoceramita.de/dlc/de/driver/all/linux_ppd_s_ksl_8.-downloadcenteritem-Single-File.downloadcenteritem.tmp/Linux_PPDs_KSL8_4.zip -P /tmp/ 204 | unzip /tmp/Linux_PPDs_KSL8_4.zip -d /tmp 205 | 206 | # create printer 207 | sudo lpadmin -p "${PRINTER_NAME}" -v "socket://${PRINTER_IP}:9100" -E -P "${PRINTER_PPD}" 208 | 209 | # clean up 210 | rm /tmp/Linux_PPDs_KSL8_4.zip 211 | rm -r /tmp/PPD*_KSL_8.4 212 | } 213 | 214 | function install_thinkfan() { 215 | script4 hardware/install.thinkfan.sh 216 | } 217 | 218 | function install_java-jdk() { 219 | sudo apt-get remove -y openjdk* 220 | script4 install.java-jdk.sh 221 | } 222 | 223 | function install_java-jre() { 224 | #script4 install.java-jre.sh 225 | echo "There is no Java JRE available, install JDK..." 226 | install_java-jdk 227 | } 228 | 229 | function install_yajhfc() { 230 | script4 install.yajhfc.sh 231 | } 232 | 233 | function install_language() { 234 | install openoffice.org-help-de openoffice.org-l10n-de gimp-help-de gnome-user-guide-de openoffice.org-hyphenation openoffice.org-hyphenation-de openoffice.org-thesaurus-de openoffice.org-thesaurus-de-ch gimp-help-en gnome-user-guide-en openoffice.org-help-en-gb openoffice.org-l10n-en-gb openoffice.org-l10n-en-za openoffice.org-hyphenation-en-us openoffice.org-thesaurus-en-au openoffice.org-thesaurus-en-us 235 | } 236 | 237 | # install desktop 238 | function install_gnome_desktop() { 239 | # install gnome desktop 240 | sudo apt-get -q install -y ubuntu-desktop 241 | 242 | # install extras 243 | install_desktop_extras 244 | 245 | # install gnome 3 classic 246 | if [ $(lsb_release -rs | tr -d ".") -ge 1110 ]; then 247 | install_gnome_fallback 248 | fi 249 | 250 | # configure nautilus 251 | gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t string -s /apps/nautilus/preferences/default_folder_viewer 'list_view' 252 | gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t string -s /apps/nautilus/list_view/default_zoom_level smallest 253 | gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t string -s /apps/nautilus/preferences/show_directory_item_counts never 254 | 255 | # fix network manager, else VPN wont work 256 | #sudo sed -i 's|managed=false|managed=true|g' /etc/NetworkManager/nm-system-settings.conf 257 | #sudo sed -i 's|managed=false|managed=true|g' /etc/NetworkManager/NetworkManager.conf 258 | 259 | # fix wait 60 sec for network 260 | #sudo sed -i "s|sleep|#sleep|g" /etc/init/failsafe.conf 261 | 262 | # disable screen saver lock 263 | gsettings set org.gnome.desktop.screensaver lock-enabled false 264 | gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t boolean -s /apps/gnome-power-manager/lock_on_blank_screen false 265 | gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t boolean -s /apps/gnome-power-manager/lock_use_screensaver_settings false 266 | gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t boolean -s /apps/gnome-screensaver/idle_activation_enabled false 267 | 268 | # fix clock in natty 269 | # todo (set for all user) 270 | gsettings set com.canonical.indicator.datetime show-day true 271 | gsettings set com.canonical.indicator.datetime show-date true 272 | 273 | # configure unity 274 | gsettings set com.canonical.Unity always-show-menus true 275 | 276 | # remove indicator-me applet 277 | # sudo apt-get remove -y indicator-me 278 | 279 | # remove unnecessary software 280 | sudo apt-get purge -y gnome-orca onboard vino 281 | rm /etc/xdg/autostart/orca-autostart.desktop 282 | 283 | # oneiric tweaks 284 | sudo apt-get install -y compizconfig-settings-manager 285 | 286 | # turn off error reporting 287 | sudo sed -i 's|enabled=1|enabled=0|g' /etc/default/apport 288 | 289 | # fix network manager 290 | #if [ $(lsb_release -rs | tr -d ".") -ge 1310 ]; then 291 | # sed -i '$ i\service network-manager restart' /etc/rc.local 292 | #else 293 | # sed -i '$ i\/etc/init.d/network-manager restart' /etc/rc.local 294 | #fi 295 | } 296 | 297 | function install_lxdm_desktop() { 298 | # install lubuntu desktop 299 | install lubuntu-desktop 300 | 301 | # install pulse audio 302 | install pavucontrol pulseaudio pulseaudio-utils 303 | 304 | # install extras 305 | install_desktop_extras 306 | } 307 | 308 | # install default applications 309 | function install_desktop_extras() { 310 | install_ubuntu-restricted-extras 311 | install_thunderbird 312 | install_firefox 313 | install_chromium 314 | # dep # install_java-jre 315 | install_libreoffice 316 | install_teamviewer_qs 317 | install_vlc 318 | apt-get install -y p7zip 319 | 320 | install linux-firmware-nonfree 321 | 322 | #broken? 323 | #install_language 324 | 325 | # fix slow print dialog (maverick) 326 | # dep # sed -i 's|Listen /var/run/cups/cups.sock|#Listen /var/run/cups/cups.sock|g' /etc/cups/cupsd.conf 327 | } 328 | 329 | # install gnome 3 fallback (classic) 330 | function install_gnome_fallback() { 331 | script4 install.gnome-fallback.sh 332 | } 333 | 334 | 335 | # install thunderbird 336 | function install_thunderbird() { 337 | script4 install.thunderbird.sh 338 | } 339 | 340 | # install firefox 341 | function install_firefox() { 342 | script4 install.firefox.sh 343 | } 344 | 345 | # install libreoffice 346 | function install_libreoffice() { 347 | script4 install.libreoffice.sh 348 | } 349 | 350 | # install multimedia 351 | function install_multimedia() { 352 | install_dvd 353 | # install gbrainy 354 | install_vlc 355 | } 356 | 357 | # install vlc 358 | function install_vlc() { 359 | script4 install.vlc.sh 360 | } 361 | 362 | # install pulseaudio equalizer 363 | function install_pulseaudio-equalizer() { 364 | script4 install.pulseaudio-equalizer.sh 365 | } 366 | 367 | # install dvd support 368 | function install_dvd() { 369 | script4 install.libdvdcss.sh 370 | } 371 | 372 | function install_nero() { 373 | script4 install.nero.sh http://fs/ubuntu/install/nerolinux-x86_64.deb 374 | } 375 | 376 | function install_mysql-admin() { 377 | script4 install.mysql-admin.sh 378 | } 379 | 380 | function install_mysql-workbench() { 381 | script4 install.mysql-workbench.sh 382 | } 383 | 384 | # install develop 385 | function install_develop() { 386 | install_netbeans 387 | install_eclipse 388 | apt-get install -y scite 389 | #install_mysql-admin 390 | } 391 | 392 | function install_ssh-server() { 393 | apt-get install -y openssh-server 394 | } 395 | 396 | # install mr 397 | function install_mr() { 398 | install -y network-manager-vpnc network-manager-vpnc-gnome tofrodos imagemagick sshfs patch 399 | apt-get install -y libreoffice-java-common libreoffice-base libreoffice-officebean 400 | sudo ln -s /usr/lib/ure/lib/libjpipe.so /usr/lib/ 401 | #err? install_yajhfc 402 | install_HP-Laserjet-4050n HP-Laserjet-4050n 192.168.1.18 403 | 404 | # install and configure ssh mounts 405 | wget -q http://dl.panticz.de/mr/install.mrshare.sh -O - | sudo bash - 406 | 407 | # configure database source 408 | # wget -q http://dl.panticz.de/mr/DataAccess.xcu.diff -O /tmp/DataAccess.xcu.diff 409 | # patch -p2 /usr/lib/openoffice/share/registry/data/org/openoffice/Office/DataAccess.xcu < /tmp/DataAccess.xcu.diff 410 | 411 | # install nfs 412 | sudo apt-get install -y nfs-common 413 | 414 | # create mount directories 415 | mkdir /media/programme /media/bilder /media/lagerliste /media/projekte /media/texte 416 | 417 | # create mountpoints 418 | #sudo echo "root@srv.mr:/media/programme /media/programme fuse.sshfs _netdev,delay_connect,noauto,user,idmap=user,transform_symlinks,allow_other,default_permissions 0 0" >> /etc/fstab 419 | sudo echo "root@srv.mr:/media/bilder /media/bilder fuse.sshfs _netdev,delay_connect,noauto,user,idmap=user,transform_symlinks,allow_other,default_permissions 0 0" >> /etc/fstab 420 | #sudo echo "root@srv.mr:/media/lagerliste /media/lagerliste fuse.sshfs _netdev,delay_connect,noauto,user,idmap=user,transform_symlinks,allow_other,default_permissions 0 0" >> /etc/fstab 421 | sudo echo "root@srv.mr:/media/projekte /media/projekte fuse.sshfs _netdev,delay_connect,noauto,user,idmap=user,transform_symlinks,allow_other,default_permissions 0 0" >> /etc/fstab 422 | sudo echo "root@srv.mr:/media/texte /media/texte fuse.sshfs _netdev,delay_connect,noauto,user,idmap=user,transform_symlinks,allow_other,default_permissions 0 0" >> /etc/fstab 423 | 424 | # load nfs module on startup 425 | cat /etc/modules | grep nfs || echo nfs >> /etc/modules 426 | 427 | # install wine 428 | install_wine 429 | 430 | # create gnome menu 431 | wget -q http://dl.panticz.de/mr/ritter.gnome.menu.sh -O - | sudo bash - 432 | } 433 | 434 | # ubuntu tuneup 435 | function ubuntu_tuneup() { 436 | # disable vnc-server (broken?) 437 | #gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults/ -t boolean -s /desktop/gnome/remote_access/enabled false 438 | 439 | # remove apps from autostart 440 | FILES=" 441 | /etc/xdg/autostart/bluetooth-applet.desktop 442 | /etc/xdg/autostart/evolution-alarm-notify.desktop 443 | /etc/xdg/autostart/gnome-at-session.desktop 444 | /etc/xdg/autostart/gnome-user-share.desktop 445 | /etc/xdg/autostart/jockey-gtk.desktop 446 | /etc/xdg/autostart/libcanberra-login-sound.desktop 447 | /etc/xdg/autostart/ubuntuone-launch.desktop 448 | /etc/xdg/autostart/user-dirs-update-gtk.desktop 449 | /etc/xdg/autostart/vino-server.desktop 450 | /etc/xdg/autostart/gwibber.desktop 451 | /etc/xdg/autostart/indicator-bluetooth.desktop 452 | " 453 | 454 | for FILE in ${FILES}; do 455 | [ -f ${FILE} ] && sudo mv ${FILE} ${FILE}.disabled 456 | done 457 | 458 | # disable services 459 | update-rc.d -f avahi-daemon remove 460 | update-rc.d -f bluetooth remove 461 | } 462 | 463 | # ubuntu_tuneup_extreme 464 | function ubuntu_tuneup_extreme() { 465 | ubuntu_tuneup 466 | 467 | #mv /etc/xdg/autostart/gnome-power-manager.desktop /etc/xdg/autostart/disabled/ 468 | #mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/disabled/ 469 | mv /etc/xdg/autostart/redhat-print-applet.desktop /etc/xdg/autostart/disabled/ 470 | mv /etc/xdg/autostart/update-notifier.desktop /etc/xdg/autostart/disabled/ 471 | mv /etc/xdg/autostart/zeitgeist-datahub.desktop /etc/xdg/autostart/disabled/ 472 | 473 | # disable compiz effects (broken) 474 | # gconftool-2 --type string --set /apps/gnome-session/rh/window_manager "metacity" 475 | 476 | update-rc.d -f laptop-mode remove 477 | update-rc.d -f rsync remove 478 | #update-rc.d -f powernowd remove 479 | } 480 | 481 | # install teamviewer 482 | function install_teamviewer() { 483 | script4 install.teamviewer.sh 484 | } 485 | 486 | function install_teamviewer_qs() { 487 | script4 install.teamviewer_qs.sh 488 | } 489 | 490 | # install spotify 491 | function install_spotify() { 492 | script4 install.spotify.sh 493 | } 494 | 495 | # install pipelight 496 | function install_pipelight() { 497 | script4 install.pipelight.sh 498 | } 499 | 500 | # autostart 501 | function autostart_radio() { 502 | script4 gnome/enable.autostart.radio.sh $1 $2 503 | } 504 | 505 | # gnome 506 | function gnome_autologin() { 507 | script4 gnome/enable.autologin.sh $1 508 | script4 gnome/disable_screenlock.sh 509 | } 510 | 511 | function gnome_human_list() { 512 | script4 gnome/enable.humanlist.sh 513 | } 514 | 515 | function gnome_tuneup() { 516 | script4 gnome/enable.reduced_resources.sh 517 | } 518 | 519 | # disable consistent network device naming 520 | function disable_biosdevname() { 521 | wget --no-check-certificate https://raw.githubusercontent.com/panticz/scripts/master/disable_biosdevname.sh -O - | bash - 522 | } 523 | 524 | function disable_ssh_password_authentication() { 525 | wget --no-check-certificate https://raw.githubusercontent.com/panticz/scripts/master/disable_ssh_password_authentication.sh -O - | bash - 526 | } 527 | 528 | function disable_boot_splash() { 529 | wget --no-check-certificate https://raw.githubusercontent.com/panticz/scripts/master/disable_boot_splash.sh -O - | bash - 530 | } 531 | 532 | function install_umtsmon() { 533 | script4 dep/install.umtsmon.sh 534 | } 535 | 536 | function install_tipp10() { 537 | script4 install.tipp10.txt 538 | } 539 | 540 | function install_xbmc() { 541 | script4 install.xbmc.sh 542 | } 543 | 544 | function install_google-musicmanager() { 545 | script4 install.google-musicmanager.sh 546 | } 547 | 548 | function install_gimp() { 549 | script4 install.gimp.sh 550 | } 551 | 552 | function install_handbrake() { 553 | script4 install.handbrake.sh 554 | } 555 | 556 | function install_chromium() { 557 | script4 install.chromium.sh 558 | } 559 | 560 | function install_virtualbox() { 561 | script4 install.virtualbox.sh $1 562 | } 563 | 564 | function install_vmware-player() { 565 | script4 install.vmware-player.sh 566 | } 567 | 568 | function install_bcm() { 569 | script4 dep/install.bcm.sh 570 | } 571 | 572 | function install_kvm() { 573 | apt-get install -y kvm #qemu 574 | } 575 | 576 | function install_xen() { 577 | script4 install.xen.sh 578 | } 579 | 580 | function install_lxc() { 581 | script4 install.lxc.sh 582 | } 583 | 584 | function install_ansible() { 585 | script4 install.ansible.sh 586 | } 587 | 588 | function install_docker() { 589 | script4 install.docker.sh 590 | } 591 | 592 | function configure_pawkon() { 593 | echo "LABEL=home /home ext4 defaults 0 0" >> /etc/fstab 594 | 595 | apt-get install -y git 596 | apt-get install -y meld 597 | apt-get install -y curl 598 | apt-get install -y terminator 599 | apt-get install -y whois 600 | apt-get install -y dnsutils 601 | apt-get install -y apg 602 | apt-get install -y libmysql-java 603 | apt-get install -y bash-completion 604 | apt-get install -y clusterssh 605 | apt-get install -y tree 606 | apt-get install -y telnet 607 | apt-get install -y net-tools 608 | apt-get install -y pluma 609 | apt-get install -y caja 610 | apt-get install -y keepassx 611 | apt-get install -y rsnapshot 612 | apt-get install -y pgadmin3 613 | apt-get install -y traceroute 614 | apt-get install -y net-tools 615 | install_gimp 616 | install_lxc 617 | install_ansible 618 | install_projectlibre 619 | install_vmware-player 620 | apt-get install -y virt-manager ssh-askpass 621 | 622 | # remove unnecessary applications 623 | apt-get remove -y gnome-sudoku 624 | apt-get remove -y gnome-mahjongg 625 | apt-get remove -y gnome-mines 626 | apt-get remove -y aisleriot 627 | apt-get remove -y vino 628 | apt-get remove -y cheese 629 | apt-get remove -y empathy 630 | apt-get remove -y transmission-common 631 | apt-get remove -y simple-scan 632 | apt-get remove -y shotwell 633 | apt-get remove -y rhythmbox 634 | apt-get remove -y totem 635 | apt-get autoremove -y 636 | 637 | install_mysql-workbench 638 | 639 | # TODO: run as user on first login 640 | # set default settings 641 | wget https://raw.githubusercontent.com/panticz/scripts/master/pako.sh -O - | bash - 642 | 643 | # allow access to local domain 644 | sudo sed -i 's|^#*domain-name=local|domain-name=.xlocal|g' /etc/avahi/avahi-daemon.conf 645 | } 646 | 647 | function configure_pakonb() { 648 | sudo apt-get clean | tee -a ${LOG} 649 | 650 | # preconfigure fstab 651 | if [ "${MAC_HASH}" == "6d3df838e151801d54417b65002d923a" ]; then 652 | # echo "/dev/mapper/vg0-data /home ext4 defaults 0 2" >> /etc/fstab 653 | echo "/dev/sda4 /home ext4 defaults 0 2" >> /etc/fstab 654 | fi 655 | 656 | # fix wifi 657 | update-rc.d network-manager defaults 658 | 659 | # create mount directories 660 | mkdir /media/hs /media/video /media/develop 661 | 662 | cat <> /etc/fstab 663 | tmpfs /tmp tmpfs nosuid,size=50% 0 0 664 | EOF 665 | 666 | 667 | # add user to group 668 | usermod -a -G fuse pako 669 | usermod -a -G lpadmin pako 670 | #?# usermod -a -G admin pako 671 | 672 | # install aplications 673 | ###apt-get install -y vncviewer xvnc4viewer 674 | ###apt-get install -y couturier 675 | ###apt-get install -y gnomebaker 676 | ###apt-get install -y telepathy-sofiasip 677 | sudo apt-get install -y openssh-server 678 | install_chromium 679 | install_gimp 680 | install_hibiscus 681 | install_atom 682 | sudo apt-get install -y filezilla 683 | sudo apt-get install -y fprint-demo #libfprint0 libpam-fprint 684 | sudo apt-get install -y libnotify-bin 685 | sudo apt-get install -y pdftk 686 | sudo apt-get install -y mbr mtools tofrodos 687 | sudo apt-get install -y syslinux 688 | sudo apt-get install -y searchmonkey 689 | sudo apt-get install -y compizconfig-settings-manager 690 | sudo apt-get install -y pdfshuffler 691 | sudo apt-get install -y libmysql-java 692 | sudo apt-get install -y nfs-common 693 | sudo apt-get install -y dvdbackup 694 | sudo apt-get install -y nautilus-image-converter 695 | sudo apt-get install -y gnote 696 | sudo apt-get install -y isomaster 697 | sudo apt-get install -y picard 698 | sudo apt-get install -y hamster-indicator 699 | sudo apt-get install -y clusterssh 700 | sudo apt-get install -y tree 701 | sudo apt-get install -y telnet 702 | install_handbrake 703 | sudo apt-get install -y git 704 | sudo apt-get install -y meld 705 | sudo apt-get install -y build-essential 706 | sudo apt-get install -y ipmitool 707 | sudo apt-get install -y nmap 708 | sudo apt-get install -y gconf-editor 709 | sudo apt-get install -y rdesktop 710 | sudo apt-get install -y libav-tools 711 | sudo apt-get install -y terminator 712 | sudo apt-get install -y curl 713 | sudo apt-get install -y apg 714 | sudo apt-get install -y ibus-gtk 715 | sudo apt-get install -y ecryptfs-utils 716 | sudo apt-get install -y whois 717 | sudo apt-get install -y dnsutils 718 | sudo apt-get install -y net-tools 719 | sudo apt-get install -y network-manager-pptp network-manager-pptp-gnome network-manager-openvpn network-manager-openvpn-gnome 720 | sudo apt-get install -y intel-microcode 721 | sudo apt-get install -y pluma 722 | sudo apt-get install -y caja 723 | sudo apt-get install -y pbzip2 724 | sudo apt-get install -y unrar-free 725 | sudo apt-get install -y arandr 726 | sudo apt-get install -y rsnapshot 727 | sudo apt-get install -y keepassx 728 | sudo apt-get install -y traceroute 729 | sudo apt-get install -y net-tools 730 | install_docker 731 | install_lxc 732 | install_ansible 733 | install_twinkle 734 | sudo apt-get install -y bash-completion 735 | sudo apt-get install -y bwm-ng 736 | sudo apt-get install -y csvtool 737 | sudo apt-get install -y rename 738 | sudo apt-get install -y mp3val 739 | sudo apt-get install -y exfat-fuse 740 | 741 | # remove unnecessary applications 742 | apt-get remove -y gnome-sudoku 743 | apt-get remove -y gnome-mahjongg 744 | apt-get remove -y gnome-mines 745 | apt-get remove -y aisleriot 746 | apt-get remove -y rhythmbox 747 | apt-get remove -y totem 748 | apt-get remove -y xterm 749 | apt-get remove -y xiterm+thai 750 | apt-get remove -y ubuntu-web-launchers 751 | apt-get remove -y deja-dup 752 | apt-get remove -y gnote 753 | apt-get remove -y yelp 754 | apt-get remove -y gnome-bluetooth 755 | 756 | # install mssql driver 757 | wget http://netcologne.dl.sourceforge.net/project/jtds/jtds/1.2.5/jtds-1.2.5-dist.zip -P /tmp/ 758 | unzip /tmp/jtds-1.2.5-dist.zip -d /tmp/ 759 | sudo cp /tmp/jtds-1.2.5.jar /usr/share/java/ 760 | 761 | # hardware 762 | # install_thinkfan 763 | 764 | # install printer 765 | install_HP-Officejet-Pro-8500-a910 192.168.1.15 766 | install_printer_kyocera Kyocera-FS-1030D-NET nas.fritz.box 767 | 768 | # set default printer 769 | sudo lpoptions -d HP-Laserjet-4050n 770 | 771 | # todo truecrypt (todo) 772 | # http://hacktolive.org/wiki/Repository 773 | 774 | # dep # script4 dep/install.sflphone.sh 775 | 776 | # BROKEN # .config perimssions are set to root 777 | # script4 dep/install.app-runner.sh 778 | 779 | # set android usb rights 780 | cat < /etc/udev/rules.d/70-android.rules 781 | SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666" 782 | EOF 783 | 784 | # auto usb run 785 | sudo wget http://www.panticz.de/sites/default/files/scripts/udev/70-persistent-usb_autorun.rules -O /etc/udev/rules.d/70-persistent-usb_autorun.rules 786 | sudo wget http://www.panticz.de/sites/default/files/scripts/udev/usb_autorun.sh -O /usr/sbin/usb_autorun.sh 787 | chmod a+x /usr/sbin/usb_autorun.sh 788 | 789 | # configure sudoers 790 | echo "pako ALL=NOPASSWD: /home/pako/privat/scripts/build/mkXbmc.sh" >> /etc/sudoers 791 | 792 | # Fix: "mei_me 0000:00:03.0: unexpected reset: dev_state = RESETTING" 793 | echo "blacklist mei_me" | sudo tee /etc/modprobe.d/blacklist-mei_me.conf 794 | 795 | # restore OpenVPN configuration 796 | wget https://raw.githubusercontent.com/panticz/scripts/master/restoreOpenvpnConfig.sh -O - | bash - 797 | 798 | # restore network configuration (nm-applet, vpn) 799 | wget https://raw.githubusercontent.com/panticz/scripts/master/restoreWifiConfig.sh -O - | bash - 800 | 801 | # TODO: run as user on first login 802 | # set default settings 803 | wget https://raw.githubusercontent.com/panticz/scripts/master/pako.sh -O - | bash - 804 | 805 | # disable consistent network device naming 806 | disable_biosdevname 807 | 808 | # create softlink to LXC files 809 | mv /var/lib/lxc /var/lib/lxc.$(date -I) 810 | ln -s /home/var/lib/lxc /var/lib/lxc 811 | mv /var/cache/lxc /var/cache/lxc.$(date -I) 812 | ln -s /home/var/cache/lxc /var/cache/lxc 813 | 814 | # disable APT proxy 815 | disable_apt_proxy 816 | } 817 | 818 | function install_nvidia_graphic() { 819 | script4 install.nvidia-graphic.sh 820 | } 821 | 822 | function install_amd_graphic() { 823 | script4 install.amd-graphic.sh 824 | } 825 | 826 | function addToFuse() { 827 | USER=$1 828 | 829 | sudo usermod -a -G fuse ${USER} 830 | } 831 | 832 | function enable_auto_update() { 833 | wget --no-check-certificate https://raw.githubusercontent.com/panticz/scripts/master/enable_auto_update.sh -O - | bash - 834 | 835 | # disable desktop update notifier 836 | FILE=/etc/xdg/autostart/update-notifier.desktop 837 | [ -f ${FILE} ] && mv ${FILE} ${FILE}.disabled 838 | } 839 | 840 | function install_ipmitool() { 841 | script4 install.ipmitool.sh 842 | } 843 | 844 | function install_projectlibre() { 845 | script4 install.projectlibre.sh 846 | } 847 | 848 | function install_cpuburn() { 849 | script4 install.cpuburn.sh 850 | } 851 | 852 | function install_grub_ipxe() { 853 | wget --no-check-certificate https://raw.githubusercontent.com/panticz/preseed/master/ipxe/scripts/install_grub_ipxe.sh -O - | bash - 854 | } 855 | 856 | function update_grub() { 857 | for DEV in $(ls /dev/sd?); do 858 | grub-install ${DEV} 859 | done 860 | } 861 | 862 | function install_powermeter() { 863 | install_gnome_desktop 864 | install openssh-server 865 | install stress 866 | install libcurl3 867 | install wget 868 | #powernowd 869 | #cpufrequtils 870 | #cpufreqd 871 | #sysfsutils 872 | 873 | install_ipmitool 874 | install_cpuburn 875 | 876 | # configure xdm cpuload 877 | wget -q http://dl.panticz.de/sts/install.powermeter.cpuload.sh -O - | sudo bash - 878 | 879 | #gnome_autologin 880 | } 881 | 882 | 883 | #function install_docky() { 884 | # add-apt-repository ppa:docky-core/ppa 885 | # apt-get update -qq 886 | # apt-get install -y docky 887 | # apt-get install -y xdotool 888 | #} 889 | 890 | function disable_apt_proxy() { 891 | sed -i 's|Acquire::http::Proxy|#Acquire::http::Proxy|g' /etc/apt/apt.conf 892 | } 893 | 894 | function install_webserver() { 895 | debconf-set-selections <<\EOF 896 | mysql-server-5.1 mysql-server/root_password_again string t00r 897 | mysql-server-5.1 mysql-server/root_password string t00r 898 | EOF 899 | 900 | # install web server 901 | apt-get -y install apache2 php5 mysql-server php5-mysql php5-mcrypt php5-gd php5-curl php5-cli libapache2-mod-auth-mysql bzip2 wget 902 | 903 | # configure apache modules 904 | a2enmod auth_mysql 905 | 906 | sudo apt-get install -y openssh-server 907 | } 908 | 909 | 910 | 911 | # 912 | # MAIN 913 | # 914 | 915 | # clear terminal 916 | clear 917 | 918 | # Disable console blanking 919 | setterm -blank 0 920 | 921 | # Save start time 922 | echo "--- START ${MAC} $(date) ---" >> ${LOG} 923 | 924 | # Update the package list 925 | apt-get update -qq | tee -a ${LOG} 926 | apt-get dist-upgrade -y -qq | tee -a ${LOG} 927 | 928 | # Install basics needed for further installation or debugging 929 | echo "MAC: ${MAC}" 930 | echo "MAC_HASH: ${MAC_HASH}" 931 | 932 | # get post install script for client 933 | wget -q "http://preseed.panticz.de/lc/${MAC_HASH}" -O /tmp/lc.sh && chmod 777 /tmp/lc.sh && . /tmp/lc.sh 934 | 935 | # Set the debconf priority back to low 936 | #echo debconf debconf/priority select low | debconf-set-selections -v 2>&1 | tee -a ${LOG} 937 | 938 | # Save the end time 939 | echo "--- START ${MAC} $(date) ---" >> ${LOG} 940 | 941 | # Remove init script 942 | #dep# rm /etc/rc2.d/S99install 943 | [ -f /etc/init/late_command.conf ] && rm /etc/init/late_command.conf 944 | 945 | # Update the package list 946 | apt-get update -qq | tee -a ${LOG} 947 | apt-get dist-upgrade -y -qq | tee -a ${LOG} 948 | 949 | # clean up 950 | apt-get clean | tee -a ${LOG} 951 | apt-get -y autoremove | tee -a ${LOG} 952 | 953 | # remove dummy lvm 954 | [ -L /dev/vg0/dummy ] && lvremove -f /dev/vg0/dummy 955 | 956 | # Sync and reboot 957 | sync 958 | sleep 3 959 | reboot 960 | -------------------------------------------------------------------------------- /pxe/isolinux.cfg: -------------------------------------------------------------------------------- 1 | default vesamenu.c32 2 | timeout 100 3 | #menu background background.jpg 4 | menu title Ubuntu NetInstall CD [preseed.panticz.de] 5 | 6 | label Localboot 7 | localboot 0x80 8 | 9 | label Ubuntu LiveCD 10 | kernel /casper/vmlinuz 11 | append initrd=/casper/initrd.lz boot=casper -- 12 | 13 | label NetInstall iPXE 14 | kernel ipxe.krn 15 | 16 | label NetInstall Ubuntu 64 Bit 17 | kernel linux64 18 | append initrd=initrd64.gz url=http://preseed.panticz.de/preseed/ubuntu-minimal.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical biosdevname=0 -- 19 | 20 | label NetInstall Ubuntu 32 Bit 21 | kernel linux32 22 | append initrd=initrd32.gz url=http://preseed.panticz.de/preseed/ubuntu-minimal.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical biosdevname=0 forcepae -- 23 | 24 | label NetInstall Ubuntu 32 Bit Non-PAE 25 | kernel nonpae/linux32 26 | append initrd=nonpae/initrd32.gz url=http://preseed.panticz.de/preseed/ubuntu-minimal.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical biosdevname=0 -- 27 | 28 | label Hardware Detection Tool 29 | kernel hdt.c32 30 | -------------------------------------------------------------------------------- /pxe/preseed.precise.amd64.conf: -------------------------------------------------------------------------------- 1 | LABEL linux 2 | MENU LABEL Ubuntu Precise 64bit installation [Preseed] 3 | KERNEL ubuntu/precise/amd64/linux 4 | APPEND initrd=ubuntu/precise/amd64/initrd.gz url=http://preseed.panticz.de/preseed/ubuntu-minimal.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical -- 5 | IPAPPEND 2 6 | -------------------------------------------------------------------------------- /pxe/preseed.precise.i386.conf: -------------------------------------------------------------------------------- 1 | LABEL linux 2 | MENU LABEL Ubuntu Precise 32bit installation [Preseed] 3 | KERNEL ubuntu/precise/i386/linux 4 | APPEND initrd=ubuntu/precise/i386/initrd.gz url=http://preseed.panticz.de/preseed/ubuntu-minimal.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical -- 5 | IPAPPEND 2 6 | -------------------------------------------------------------------------------- /pxe/preseed.saucy.amd64.conf: -------------------------------------------------------------------------------- 1 | LABEL linux 2 | MENU LABEL Ubuntu Saucy 64bit installation [Preseed] 3 | KERNEL ubuntu/saucy/amd64/linux 4 | APPEND initrd=ubuntu/saucy/amd64/initrd.gz url=http://preseed.panticz.de/preseed/ubuntu-minimal.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical -- 5 | IPAPPEND 2 6 | -------------------------------------------------------------------------------- /pxe/preseed.saucy.i386.conf: -------------------------------------------------------------------------------- 1 | LABEL linux 2 | MENU LABEL Ubuntu Saucy 32bit installation [Preseed] 3 | KERNEL ubuntu/saucy/i386/linux 4 | APPEND initrd=ubuntu/saucy/i386/initrd.gz url=http://preseed.panticz.de/preseed/ubuntu-minimal.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical -- 5 | IPAPPEND 2 6 | -------------------------------------------------------------------------------- /pxe/preseed.squeeze.amd64.conf: -------------------------------------------------------------------------------- 1 | LABEL linux 2 | MENU LABEL Debian Installer Squeeze 64bit [Preseed] 3 | KERNEL debian/squeeze/amd64/linux 4 | APPEND initrd=debian/squeeze/amd64/initrd.gz auto url=https://raw.github.com/panticz/preseed/master/debian-minimal.seed locale=de_DE console-setup/layoutcode=en netcfg/choose_interface=auto debconf/priority=critical DEBCONF_DEBUG=developer -- 5 | IPAPPEND 2 6 | -------------------------------------------------------------------------------- /pxe/preseed.wheezy.amd64.conf: -------------------------------------------------------------------------------- 1 | LABEL linux 2 | MENU LABEL Debian Installer Wheezy 64bit [Preseed] 3 | KERNEL debian/wheezy/amd64/linux 4 | APPEND initrd=debian/wheezy/amd64/initrd.gz auto url=https://raw.github.com/panticz/preseed/master/debian-minimal.seed locale=en_US console-setup/layoutcode=us keyboard-configuration/xkb-keymap=us netcfg/choose_interface=auto debconf/priority=critical -- 5 | IPAPPEND 2 6 | -------------------------------------------------------------------------------- /pxe/scripts/create.netinstall.ubuntu.cd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIST=utopic 4 | 5 | mkdir /tmp/iso 6 | 7 | echo "copy isolinux files..." 8 | cp /usr/lib/syslinux/isolinux.bin /tmp/iso/ 9 | cp /usr/lib/syslinux/vesamenu.c32 /tmp/iso/ 10 | cp /usr/lib/syslinux/hdt.c32 /tmp/iso/ 11 | wget -q http://pciids.sourceforge.net/v2.2/pci.ids -O /tmp/iso/pci.ids 12 | 13 | echo "download 32bit non-pae kernel and initrd..." 14 | mkdir /tmp/iso/nonpae 15 | wget -q http://www.archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/non-pae/ubuntu-installer/i386/linux -O /tmp/iso/nonpae/linux32 16 | wget -q http://www.archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/non-pae/ubuntu-installer/i386/initrd.gz -O /tmp/iso/nonpae/initrd32.gz 17 | 18 | echo "download 32bit ${DIST} kernel and initrd..." 19 | wget -q http://archive.ubuntu.com/ubuntu/dists/${DIST}/main/installer-i386/current/images/netboot/ubuntu-installer/i386/linux -O /tmp/iso/linux32 20 | wget -q http://archive.ubuntu.com/ubuntu/dists/${DIST}/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz -O /tmp/iso/initrd32.gz 21 | 22 | echo "download 64bit ${DIST} kernel and initrd..." 23 | wget -q http://archive.ubuntu.com/ubuntu/dists/${DIST}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux -O /tmp/iso/linux64 24 | wget -q http://archive.ubuntu.com/ubuntu/dists/${DIST}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz -O /tmp/iso/initrd64.gz 25 | 26 | echo "download www.panticz.de iPXE boot image..." 27 | wget http://dl.panticz.de/ipxe/ipxe.iso -P /tmp/ 28 | mount /tmp/ipxe.iso /mnt/ -o loop 29 | cp /mnt/ipxe.krn /tmp/iso/ 30 | umount /mnt 31 | 32 | echo "download isolinux configuration..." 33 | wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/preseed/master/pxe/isolinux.cfg -O /tmp/iso/isolinux.cfg 34 | 35 | # TODO: download background 36 | # wget http://www.heise.de/ct/motive/image/1485/p800.jpg -O /tmp/iso/background.jpg 37 | # convert -resize 480x640 /tmp/iso/background.jpg /tmp/isobackground.jpg 38 | 39 | # TODO: add Ubuntu Live CD to image (DVD only?) 40 | # wget http://releases.ubuntu.com/14.10/ubuntu-14.10-desktop-amd64.iso -P /tmp/ 41 | # mount /tmp/ubuntu-14.10-desktop-amd64.iso /mnt/ -o loop 42 | # cp -a /mnt/.disk/ /tmp/iso/ 43 | # cp -a /mnt/casper/ /tmp/iso/ 44 | # umount /mnt 45 | 46 | echo "create iso image..." 47 | mkisofs -q -V "UbuntuNetInstall" -o /tmp/UbuntuNetInstall.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -r -J /tmp/iso 48 | 49 | echo "clean up..." 50 | rm -r /tmp/iso 51 | 52 | # check if brasero installed 53 | if [ -f /usr/bin/brasero ]; then 54 | echo "burn cd..." 55 | brasero /tmp/UbuntuNetInstall.iso & 56 | fi 57 | -------------------------------------------------------------------------------- /pxe/scripts/create.network.install.iso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIST=xenial 4 | 5 | # install required applications 6 | wget -q http://mirrors.kernel.org/ubuntu/pool/main/s/syslinux/syslinux_6.03+dfsg-11ubuntu1_amd64.deb -P /tmp/ 7 | sudo dpkg -i /tmp/syslinux_6.03+dfsg-11ubuntu1_amd64.deb 8 | 9 | # create target directory 10 | mkdir /tmp/iso 11 | 12 | # download kernel and initrd 13 | wget -q http://archive.ubuntu.com/ubuntu/dists/${DIST}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux -O /tmp/iso/linux 14 | wget -q http://archive.ubuntu.com/ubuntu/dists/${DIST}/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz -O /tmp/iso/initrd.gz 15 | 16 | # create preseed configuration (and copy to webserver) 17 | cat < /tmp/iso/ssh.seed 18 | d-i anna/choose_modules string network-console 19 | d-i preseed/early_command string anna-install network-console 20 | 21 | # password authentification 22 | d-i network-console/password password t00r 23 | d-i network-console/password-again password t00r 24 | 25 | # or authentication with pre-shared SSH key 26 | #d-i network-console/password-disabled boolean true 27 | #d-i network-console/authorized_keys_url string http://www.example.com/user/ssh/id_rsa.pub 28 | EOF 29 | 30 | # create isolinux configuration 31 | cat < /tmp/iso/isolinux.cfg 32 | default linux 33 | timeout 1 34 | label linux 35 | kernel linux 36 | append initrd=initrd.gz url=http://www.example/preseed/ssh.seed auto=true interface=auto locale=en_US.UTF-8 priority=critical biosdevname=0 -- 37 | EOF 38 | 39 | # copy required files 40 | cp /usr/lib/syslinux/isolinux.bin /tmp/iso 41 | 42 | # create iso image 43 | mkisofs -q -V "netinstall" -o /tmp/netinstall.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -r -J /tmp/iso 44 | -------------------------------------------------------------------------------- /pxe/scripts/update.ubuntu.pxe.files.cronjob: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "update.ubuntu.pxe.files.cronjob $(date -I)" > /var/log/update.ubuntu.pxe.files.log 4 | 5 | wget --quiet https://raw.github.com/panticz/preseed/master/pxe/scripts/update.ubuntu.pxe.files.sh -O - | bash - 6 | -------------------------------------------------------------------------------- /pxe/scripts/update.ubuntu.pxe.files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MIRROR=http://archive.ubuntu.com/ubuntu/dists/SUITE/main/installer-ARCH/current/images/netboot/ubuntu-installer/ARCH 4 | TFTPDIR=/var/lib/tftpboot/ubuntu/SUITE/ARCH 5 | 6 | download() { 7 | SUITE=$1 8 | ARCH=$2 9 | FILE=$3 10 | 11 | echo -n " - $3" 12 | 13 | MIRROR1=${MIRROR//SUITE/$SUITE} 14 | MIRROR_TMP=${MIRROR1//ARCH/$ARCH} 15 | 16 | TFTPDIR1=${TFTPDIR//SUITE/$SUITE} 17 | TFTPDIR_TMP=${TFTPDIR1//ARCH/$ARCH} 18 | 19 | if [ ! -d $TFTPDIR_TMP ]; then 20 | mkdir -p $TFTPDIR_TMP 21 | fi 22 | 23 | wget --quiet $MIRROR_TMP/$FILE -O $TFTPDIR_TMP/$FILE 24 | 25 | if [ $? == 0 ]; then 26 | printf "%20s\n" "OK" 27 | else 28 | printf "%20s\n" "ERROR" 29 | echo "$MIRROR_TMP/$FILE" 30 | fi 31 | } 32 | 33 | echo "Update Ubuntu netboot files:" 34 | for SUITE in oneiric precise quantal; do 35 | echo "+ $SUITE" 36 | 37 | for ARCH in i386 amd64; do 38 | echo " + $ARCH" 39 | 40 | for FILE in linux initrd.gz; do 41 | download $SUITE $ARCH $FILE 42 | done 43 | done 44 | done 45 | -------------------------------------------------------------------------------- /pxe/sles10.conf: -------------------------------------------------------------------------------- 1 | LABEL linux 2 | MENU LABEL SELS 10 install 3 | KERNEL sles10/linux 4 | APPEND initrd=sles10/initrd.gz splash=silent showopts -- 5 | -------------------------------------------------------------------------------- /raid1lvm.seed: -------------------------------------------------------------------------------- 1 | # To access this file via http use following redirection: 2 | # http://preseed.panticz.de/preseed/raid1lvm.seed 3 | 4 | # 5 | # RAID 6 | # 7 | # The method should be set to "raid" 8 | d-i partman-auto/method string raid 9 | 10 | # This makes partman automatically repartition without confirmation 11 | d-i partman-md/confirm boolean true 12 | 13 | # no warning if an RAID already esists 14 | d-i partman-md/device_remove_md boolean true 15 | d-i partman-md/confirm_nooverwrite boolean true 16 | 17 | d-i partman-partitioning/confirm_write_new_label boolean true 18 | d-i partman/choose_partition select finish 19 | d-i partman/confirm boolean true 20 | d-i partman/confirm_nooverwrite boolean true 21 | d-i partman-basicfilesystems/no_mount_point yes 22 | 23 | 24 | # use device label instead of UUIDs [uuid, traditional, label] 25 | d-i partman/mount_style select label 26 | 27 | # create raid raid1 28 | d-i partman-auto/disk string /dev/sda /dev/sdb 29 | 30 | 31 | # 32 | # LVM 33 | # 34 | # no warning if an LVM already exists 35 | d-i partman-lvm/device_remove_lvm boolean true 36 | d-i partman-lvm/confirm boolean true 37 | d-i partman-lvm/confirm_nooverwrite boolean true 38 | 39 | ## create lvm on raid1 40 | d-i partman-auto-raid/recipe string \ 41 | 1 2 0 lvm - \ 42 | /dev/sda1#/dev/sdb1 \ 43 | . 44 | 45 | # Name default volume group vg0 46 | d-i partman-auto-lvm/new_vg_name string vg0 47 | 48 | # configure volume group and logical volumes 49 | d-i partman-auto/expert_recipe string \ 50 | raid-lvm :: \ 51 | 100 5000 -1 raid \ 52 | $lvmignore{ } \ 53 | method{ raid } \ 54 | . \ 55 | 8192 8192 8192 ext4 \ 56 | $defaultignore{ } \ 57 | $lvmok{ } \ 58 | lv_name{ xen-root } \ 59 | $bootable{ } \ 60 | method{ format } \ 61 | format{ } \ 62 | use_filesystem{ } \ 63 | filesystem{ ext4 } \ 64 | mountpoint{ / } \ 65 | . \ 66 | 1024 1024 1024 linux-swap \ 67 | $defaultignore{ } \ 68 | $lvmok{ } \ 69 | lv_name{ xen-swap } \ 70 | method{ swap } \ 71 | format{ } \ 72 | . \ 73 | 64 2048 -1 ext4 \ 74 | $defaultignore{ } \ 75 | $lvmok{ } \ 76 | lv_name{ dummy } \ 77 | use_filesystem{ } \ 78 | filesystem{ ext4 } \ 79 | method{ keep } \ 80 | . 81 | 82 | # broken 83 | #d-i grub-installer/bootdev string (hd0,0) (hd1,0) 84 | -------------------------------------------------------------------------------- /raid5lvm.seed: -------------------------------------------------------------------------------- 1 | # To access this file via http use following redirection: 2 | # http://preseed.panticz.de/preseed/raid5lvm.seed 3 | 4 | # 5 | # RAID 6 | # 7 | # The method should be set to "raid" 8 | d-i partman-auto/method string raid 9 | 10 | # This makes partman automatically repartition without confirmation 11 | d-i partman-md/confirm boolean true 12 | 13 | # no warning if an RAID already esists 14 | d-i partman-md/device_remove_md boolean true 15 | d-i partman-md/confirm_nooverwrite boolean true 16 | 17 | d-i partman-partitioning/confirm_write_new_label boolean true 18 | d-i partman/choose_partition select finish 19 | d-i partman/confirm boolean true 20 | d-i partman/confirm_nooverwrite boolean true 21 | d-i partman-basicfilesystems/no_mount_point yes 22 | 23 | 24 | # use device label instead of UUIDs [uuid, traditional, label] 25 | d-i partman/mount_style select label 26 | 27 | # create raid raid5 28 | # TODO: use all discs not only three 29 | d-i partman-auto/disk string /dev/sda /dev/sdb /dev/sdc 30 | 31 | 32 | # 33 | # LVM 34 | # 35 | # no warning if an LVM already exists 36 | d-i partman-lvm/device_remove_lvm boolean true 37 | d-i partman-lvm/confirm boolean true 38 | d-i partman-lvm/confirm_nooverwrite boolean true 39 | 40 | # create lvm on raid5 41 | d-i partman-auto-raid/recipe string \ 42 | 5 3 0 lvm - \ 43 | /dev/sda1#/dev/sdb1#/dev/sdc1 \ 44 | . 45 | 46 | # Name default volume group vg0 47 | d-i partman-auto-lvm/new_vg_name string vg0 48 | 49 | # configure volume group and logical volumes 50 | d-i partman-auto/expert_recipe string \ 51 | raid-lvm :: \ 52 | 100 5000 -1 raid \ 53 | $lvmignore{ } \ 54 | method{ raid } \ 55 | . \ 56 | 8192 8192 8192 ext4 \ 57 | $defaultignore{ } \ 58 | $lvmok{ } \ 59 | lv_name{ xen-root } \ 60 | $bootable{ } \ 61 | method{ format } \ 62 | format{ } \ 63 | use_filesystem{ } \ 64 | filesystem{ ext4 } \ 65 | mountpoint{ / } \ 66 | . \ 67 | 1024 1024 1024 linux-swap \ 68 | $defaultignore{ } \ 69 | $lvmok{ } \ 70 | lv_name{ xen-swap } \ 71 | method{ swap } \ 72 | format{ } \ 73 | . \ 74 | 64 2048 -1 ext4 \ 75 | $defaultignore{ } \ 76 | $lvmok{ } \ 77 | lv_name{ dummy } \ 78 | use_filesystem{ } \ 79 | filesystem{ ext4 } \ 80 | method{ keep } \ 81 | . 82 | 83 | # broken 84 | #d-i grub-installer/bootdev string (hd0,0) (hd1,0) 85 | -------------------------------------------------------------------------------- /regular.seed: -------------------------------------------------------------------------------- 1 | # To access this file via http use following redirection: 2 | # http://preseed.panticz.de/preseed/regular.seed 3 | 4 | d-i partman-auto/method string regular 5 | d-i partman/choose_partition select Finish partitioning and write changes to disk 6 | d-i partman/confirm_write_new_label boolean true 7 | d-i partman/confirm boolean true 8 | d-i partman/confirm_nooverwrite boolean true 9 | d-i partman-md/device_remove_md boolean true 10 | d-i partman-lvm/device_remove_lvm boolean true 11 | -------------------------------------------------------------------------------- /ubuntu-minimal.seed: -------------------------------------------------------------------------------- 1 | # To access this file via http use following redirection: 2 | # http://preseed.panticz.de/preseed/ubuntu-minimal.seed 3 | 4 | # Localization 5 | d-i debian-installer/locale string en_US.UTF-8 6 | 7 | # Network configuration 8 | d-i netcfg/choose_interface select auto 9 | d-i debian-installer/add-kernel-opts string biosdevname=0 net.ifnames=0 10 | 11 | # Clock and time zone setup 12 | d-i clock-setup/ntp boolean true 13 | d-i time/zone string Europe/Berlin 14 | 15 | ### Mirror settings 16 | d-i mirror/country string manual 17 | d-i mirror/http/hostname string archive.ubuntu.com 18 | d-i mirror/http/directory string /ubuntu 19 | d-i mirror/http/proxy string 20 | 21 | d-i debconf/priority select critical 22 | d-i auto-install/enabled boolean true 23 | 24 | # Account setup 25 | d-i passwd/user-fullname string ubuntu 26 | d-i passwd/username string ubuntu 27 | d-i passwd/user-password password ubuntu 28 | d-i passwd/user-password-again password ubuntu 29 | d-i user-setup/allow-password-weak boolean true 30 | 31 | # Apt setup 32 | d-i apt-setup/restricted boolean true 33 | d-i apt-setup/universe boolean true 34 | d-i apt-setup/multiverse boolean true 35 | d-i apt-setup/backports boolean true 36 | d-i apt-setup/non-free boolean true 37 | d-i apt-setup/contrib boolean true 38 | d-i apt-setup/security-updates boolean true 39 | d-i apt-setup/partner boolean true 40 | 41 | # Package selection 42 | tasksel tasksel/first multiselect ubuntu-standard 43 | d-i pkgsel/include string wget 44 | d-i pkgsel/update-policy select unattended-upgrades 45 | 46 | # proxy 47 | d-i preseed/early_command string \ 48 | ping -c 1 apt-cacher > /dev/null 2>&1 && debconf-set mirror/http/proxy "http://apt-cacher:3142/" || echo 49 | 50 | # partman 51 | d-i partman/early_command string \ 52 | if [ $(cat /proc/cmdline | grep autopart | wc -l) -eq 1 ]; then \ 53 | DISCS=$(list-devices disk | wc -l) ;\ 54 | if [ ${DISCS} -eq 2 ]; then \ 55 | echo "raid1" >> /tmp/debug ;\ 56 | wget http://preseed.panticz.de/preseed/raid1lvm.seed -O /tmp/partman.cfg ;\ 57 | debconf-set-selections /tmp/partman.cfg ;\ 58 | else \ 59 | echo "regular" >> /tmp/debug ;\ 60 | wget http://preseed.panticz.de/preseed/regular.seed -O /tmp/partman.cfg ;\ 61 | debconf-set-selections /tmp/partman.cfg ;\ 62 | fi \ 63 | fi 64 | 65 | # Run 66 | ###d-i preseed/run string run.sh 67 | 68 | # Custom commands 69 | d-i preseed/include_command string \ 70 | MAC=$(ip link | sed -n "/BROADCAST.*UP/{n;p}" | tail -1 | tr -s " " | cut -d" " -f3); \ 71 | HOST=$(echo ${MAC} | md5sum | cut -d" " -f1); \ 72 | wget http://preseed.panticz.de/${HOST}.seed -P /tmp > /dev/null; \ 73 | if [ $? -eq 0 ]; then echo http://preseed.panticz.de/${HOST}.seed; fi 74 | 75 | # configure post-install script 76 | d-i preseed/late_command string \ 77 | wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/preseed/master/late_command.service -O /target/etc/systemd/system/late_command.service && \ 78 | in-target /bin/systemctl enable late_command.service 79 | 80 | # Finishing up the installation 81 | d-i finish-install/reboot_in_progress note 82 | --------------------------------------------------------------------------------