Skip to content

Instantly share code, notes, and snippets.

@nyarla

nyarla/HOWTO.md Secret

Last active November 2, 2019 18:59
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save nyarla/7319229 to your computer and use it in GitHub Desktop.
Save nyarla/7319229 to your computer and use it in GitHub Desktop.
(OBSOLETED) This document is no longer maintenance: How to make a CoreOS's ISO file from pxe boot image

How to make a CoreOS's ISO file from pxe boot image

  1. SYNOPSIS

This documentation is written about how to make a CoreOS's ISO file from pxe boot image.

  1. REQUIREMENTS

This method is required to mkisofs So, you need an environment that can execute mkisofs. (e.g. on Linux)

  1. HOW TO MAKE ISO

3.1 Copy files

# Make working directory
$ mkdir ~/tmp && cd ~/tmp
$ mkdir -p coreos/{isolinux,syslinux,coreos}

# Download pxe boot files from CoreOS Repository (dev-channel)
$ cd coreos/coreos
$ curl -O http://storage.core-os.net/coreos/amd64-generic/dev-channel/coreos_production_pxe.vmlinuz
$ mv coreos_production_pxe.vmlinuz vmlinuz
$ curl -O http://storage.core-os.net/coreos/amd64-generic/dev-channel/coreos_production_pxe_image.cpio.gz
$ mv coreos_production_pxe_image.cpio.gz cpio.gz
$ cd ~/tmp/coreos/coreos && ls
cpio.gz  vmlinuz

# Download syslinux binaries
$ cd ~/tmp
$ curl -O https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.02.tar.gz
$ tar zxvf syslinux-6.02.tar.gz

# Copy syslinux binaries to work directory
$ cd ~/tmp
$ cp syslinux-6.02/bios/com32/chain/chain.c32 coreos/syslinux/
$ cp syslinux-6.02/bios/com32/lib/libcom32.c32 coreos/syslinux/
$ cp syslinux-6.02/bios/com32/libutil/libutil.c32 coreos/syslinux/
$ cp syslinux-6.02/bios/memdisk/memdisk coreos/syslinux/
$ ls coreos/syslinux
chain.c32  libcom32.c32  libutil.c32  memdisk

$ cp syslinux-6.02/bios/core/isolinux.bin coreos/isolinux/
$ cp syslinux-6.02/bios/com32/elflink/ldlinux/ldlinux.c32 coreos/isolinux/
$ ls coreos/isolinux
isolinux.bin  ldlinux.c32

3.2 Write configuration file

INCLUDE /syslinux/syslinux.cfg
prompt 0
default coreos

LABEL coreos
KERNEL /coreos/vmlinuz
APPEND initrd=/coreos/cpio.gz root=squashfs: state=tmpfs: sshkey="{YOUR SSH PUBLIC KEY} coreos pxe demo"

3.3 Make ISO File !

$ cd ~/tmp/coreos/
$ mkisofs -v -l -r -J -o ../coreos.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .

3.4 Finished the all

Yay !

  1. Author and Copyright

  • Author: Naoki OKAMURA (Nyarla)
  • Unlicense:
    • This documentation is under the public domain.
@brianclements
Copy link

What is meant by the line INCLUDE /syslinux/syslinux.cfg, is that the location of the configuration file listed just below it? Or is that some other type of command to run? It's not quite clear.

@CMCDragonkai
Copy link

How are you meant to login?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment