3

I'm trying to automate a custom Debian (OS) Installation using PXE boot from ISO and preseeding the configuration file.

Steps I've done so far is:

  1. Installed DHCP and TFTP server including syslinux (memdisk) to load the iso.
  2. Configured Label in the pxelinux.cfg/default file to autostart the ISO

Files in the /srv/tftp folder:

boot-screens
debian-installer
iso
  |-> <ISO File>
  |-> preseed.cfg

ldlinux.c32 -> debian-installer/amd64/boot-screens/ldlinux.c32
memdisk
netboot.tar.gz
pxelinux.0 -> debian-installer/amd64/pxelinux.0
pxelinux.cfg -> debian-installer/amd64/pxelinux.cfg
version.info

pxelinux.cfg/default configuration:

# D-I config version 2.0
# search path for the c32 support libraries (libcom32, libutil etc.)
path debian-installer/amd64/boot-screens/
include debian-installer/amd64/boot-screens/menu.cfg
default debian-installer/amd64/boot-screens/vesamenu.c32
prompt 0
timeout 20

LABEL  Final OS
    MENU LABEL Vallinayagam
    MENU DEFAULT
    KERNRL LINUX
    LINUX memdisk
    APPEND iso
    INITRD  iso/<ISO FILE> interface=eth0 preseed/file=preseed.cfg auto=true prirority=critical

Now when I boot the client, it automatically loads the ISO file and showing bootmenus from the ISO file.

Now my questions are,

  1. How to select the option automated install from the bootmenu?
  2. How to pass the preseed configuration file? The above configuration is correct to pass the preseed file?
  3. I've an another machine with same OS, but how to get the preseed configuration file. No such commands "debconf-set-selections" shown in my machine as mentioned here

P.S - My aim is to automate the whole OS installation using Jenkins job when a new ISO is available for testing.

  • 1
    You can use memdisk to pass control to your ISO file, but can't pass kernel or installer arguments (like auto=true and so on) into it: those are determined by the boot setup in the ISO file alone. Moreover: KERNRL is a typo, but LINUX overrides it for you. To test Debian Installer releases with preseeding, use the netboot variant instead. – Ferenc Wágner Jun 5 '17 at 8:05
  • @FerencWágner - I'm trying this with my custom os for software testing, Not the debian installer releases. And as commented below it's looking for additional resources like CD or floppy? This is not observed with bootable USB? Only with PXE? What's the problem here? – vallikkv Jun 5 '17 at 23:08
  • As the relevant Syslinux documentation explains: this will only work as long the operating system is accessing the virtual disk using the BIOS. After the operating system loads its own drivers for accessing the controller it's very likely that this virtual disk can be no longer accessed. Follow the last two links for details and workarounds. – Ferenc Wágner Jun 7 '17 at 19:30
3

You would need to change the default boot choice/selection on the ISO image. Depending on what gets checksumed and such, extract the iso contents, edit the file, re-checksum if needed, rebuild ISO.

  • Thanks, It works. Done using genisoimage command. But having problem in the OS installation, After the initial setup till keyboard configuration, it looks for additional resources from CD and failed? How to sort it out? – vallikkv Jun 5 '17 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.