To use iPXE to setup my own development machine
This repo is used for creating ipxe.iso
without deploying extra DHCP server/tFTP server.
Promptly start as long as there is docker
(curl -fsSL https://get.docker.com | sh) and make
on your host and get help running make
in the root path of this repo.
- Generate boot.ipxe and put it on http server using
make http_server
- Download official ipxe.iso and follow the steps on Quick Start into PXE cli
- Run the following cmd
iPXE> dhcp
iPXE> chain http://<your http server ip>/boot.ipxe
Preferred chain loading that we don't build ipxe.iso
everytime unless HTTP_SERVER changed and only need to update boot.ipxe
on the fly.
make http_server HTTP_SERVER=<the ip for fetching boot.ipxe over HTTP>
There are two artifacts,
output/ipxe.iso
andwww/boot.ipxe
and it will launch a http server against www/ dir Then, burn ipxe.iso onto a blank CD-ROM or DVD-ROM or put it into the ISO library for the VM installation on XenServer/Vmware/KVM
For more details usage, just run make
to get help.
You can find available distro configuration in gen_embedded.json
- Add new section as below for new distro support
"New Distro Name": {
"description": "the details for distro",
"url": "http://<your local server ip>",
"kernel": "<relative path>/vmlinuz",
"initrd": "<relative path>/initrd.img",
"kernel_args": "<literal as the key name>"
},
- Put new distro iso into www dir
- Restart http server
make http_server
- If wanted to tweak the kernel args, we only need to change it in
www/boot.ipxe
instead of buildingipxe.iso
again because of chain loading feature.
There are something specials in answerfile
- Use /dev/xvda which is simply the Xen disk storage devices as disk partition , you need to update it if you use other Hypervisor
- Use Text mode instead of desktop environment
- Create an encrypted password for the user configuration in answerfile
python3 -c 'import crypt,getpass;pw=getpass.getpass();print(crypt.crypt(pw) if (pw==getpass.getpass("Confirm: ")) else exit())'
- Install ace-profile in the post install stage
- cat /root/anaconda-ks.cfg
- cat /var/log/installer/cdebconf/questions.dat
- install
debconf-utils
and rundebconf-get-selections -installer
to dump preseed
- iPXE Download
- The system initialization(Debian)
- Error building ISO
- Debian (stable) preseed example
- Ubuntu (stable) preseed example
- Automated Server Installs for 20.04
- How to unpack/uncompress and repack/re-compress an initial ramdisk (initrd/initramfs) boot image file
- If ran into the err
No TPM chip found, activating TPM-bypass!
, please runfind . 2>/dev/null | cpio -o -H newc | xz -9 --format=lzma > /tmp/initrd.img
to repack, instead of the one in the link above.
- If ran into the err
- Failed to retrieve preconfiguration file ubuntu 1804 as wget in busybox can not download https url without
--no-check-certificate
, that need to wait busybox upgrade. - Load ipxe.iso error as below, it works perfectly after installing
isolinux
instead ofsyslinux
.
Boot device: CD-Rom0MB medium detected
- failure: could not read boot disk