PXE boot server configuration with customized preseed

Question

Great write up on configuring network PXE boot server here. https://linuxhint.com/pxe_boot_ubuntu_server/
I have a customized preseed file (custom.seed; to set up localization, user with admin/sudo rights, etc.). Where should custom.seed be called/initiated, from “append” line on ~pxelinux.cfg/default? Please give some example. Here’s an excerpt of custom.seed.

————————————————————————–
<snip>d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i keyboard-configuration/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
<snip>

————————————————————————–

Thank you in advance for your help and insight.

solved 0
Erwin 4 weeks 1 Answer 137 views

Answer ( 1 )

  1. Hi Erwin,

    Ubuntu uses casper for booting Ubuntu installers. Casper is actually a hook for generating the initramfs for booting Ubuntu installers.
    According to the manpage of casper, you can use your own seed.

    Casper has support for 2 boot options that you can use for pre-seeding.
    preseed/file=/path/to/custom.seed or file=/path/to/custom.seed and preseed/allow-network=true

    preseed/file=/path/to/custom.seed or file=/path/to/custom.seed is used to tell Casper to use a custom seed file.
    preseed/allow-network=true is used to let the pre-seed file configure the network.

    In my article, the configuration file, if custom.seed pre-seed is used, should look as follows:

    default vesamenu.c32

    label install1
    menu label ^Install Ubuntu 18.04 LTS Desktop
    menu default
    kernel ubuntu1804/vmlinuz
    append initrd=ubuntu1804/initrd boot=casper netboot=nfs nfsroot=192.168.50.1:/
    netboot/nfs/ubuntu1804/ preseed/file=ubuntu1804/preseed/custom.seed splash toram —

    Now, create a new file on the boot server /netboot/nfs/ubuntu1804/preseed/custom.seed and type in your pre-seed configuration there.

    I tried it with the default cli.seed preseed file. It booted correctly.
    The boot parameters seem to work. I saw no errors while booting.
    $ sudo dmesg | greep seed (on the PXE booted computer)

    But, I can’t verify whether the seed files actually configure the Live installation.

    Give it a try and let me know whether it worked for you.

    I wish you all the best.
    Thanks.
    Shahriar Shovon

    Best answer

Leave an answer