Giter VIP home page Giter VIP logo

pxe's Introduction

My notes on getting a minimal PXE server for ESXi to boot from.

Setup ansible:
  virtualenv venv
  source venv/bin/activate
  pip install ansible
  pip freeze > requirements.txt

Spin up a new minimal centos7 vm (with bridged networking)
  hostname:pixie
  ip: 192.168.0.107
# Note: Ensure mikekinney has sudo no password

# TODO: move stuff below into ansible

# scp esxi67 iso to /tmp
mkdir -p /mnt/iso
cd /tmp
mount -o loop VMware-VMvisor-Installer-6.7.0-8169922.x86_64.iso /mnt/iso
mkdir -p /var/lib/tftpboot/images/esxi67
cp -rf /mnt/iso/* /var/lib/tftpboot/images/esxi67
umount /mnt/iso
# If you do not do next step then it cannot find /b0 files
sed -i 's/\///g' /var/lib/tftpboot/images/esxi67/boot.cfg

# scp esxi65 iso to /tmp
mkdir -p /mnt/iso
cd /tmp
mount -o loop VMware-VMvisor-Installer-6.5.0-4564106.x86_64.iso /mnt/iso
mkdir -p /var/lib/tftpboot/images/esxi65
cp -rf /mnt/iso/* /var/lib/tftpboot/images/esxi65
umount /mnt/iso
# If you do not do next step then it cannot find /b0 files
sed -i 's/\///g' /var/lib/tftpboot/images/esxi65/boot.cfg

# scp centos iso to /tmp
cd /tmp
mount -o loop CentOS-7-x86_64-DVD-1708.iso /mnt/iso
mkdir -p /var/lib/tftpboot/images/centos7
cp /mnt/iso/images/pxeboot/vmlinuz /var/lib/tftpboot/images/centos7
cp /mnt/iso/images/pxeboot/initrd.img /var/lib/tftpboot/images/centos7
mkdir -p /var/ftp/pub/centos7
cp -av /mnt/iso/* /var/ftp/pub/centos7
chmod -R 755 /var/ftp/pub/centos7
umount /mnt/iso

# scp ubuntu iso to /tmp
scp ubuntu-18.04.2-server-amd64.iso root@pixie:/tmp
# login to pixie (as root)
cd /tmp
mount -o loop ubuntu-18.04.2-server-amd64.iso /mnt/iso
mkdir -p /var/lib/tftpboot/images/ubuntu18
cp -r /mnt/iso/install/netboot/* /var/lib/tftpboot/images/ubuntu18/
mkdir -p /var/ftp/pub/ubuntu18
cp -av /mnt/iso/* /var/ftp/pub/ubuntu18
chmod -R 755 /var/ftp/pub/ubuntu18
echo "d-i live-installer/net-image string ftp://192.168.0.107/pub/ubuntu/install/filesystem.squashfs" > /var/ftp/pub/ubuntu18/preseed/local-sources.seed
umount /mnt/iso


Testing:
- Be sure to have at least 2gb ram for centos7 (otherwise weird out of disk space error)
- Can add "ks=ftp://192.168.0.107/pub/centos7/centos7.ks" for kickstart
- For testing, create a new linux vm (with bridged autodetect network option)

pxe's People

Contributors

mkinney avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.