Supporting Headless Systems

  1. 3 months ago

    Some time ago I ran into issues with headless systems. A co-worker got it working (he installed the patch) and he understood the what was needed for GRUB. I am including them here to help the greater community.

    Configuration

    1. Install the latest patch (I do not know if it changes anything, but hey!)
    2. Go to “Admin” (cog icon) -> PXE.

    a. Using Proxy DHCP: No
    b. PXE Mode: grub
    c. Save
    3. Go to “Admin” (cog icon) -> Boot Menu -> ISO / USB Generator.
    a. Build type: ISO
    b. Kernel: 4.9.8x64 (comes with the patch)
    c. Boot Image: initrd.xz
    d. Kernel Arguments: console=tty0 vga=0 console=ttyS0,115200n8
    4. Go to “Admin” (cog icon) -> Boot Menu -> Default Menu.
    a. Kernel: 4.9.8x64 (comes with the patch)
    b. Boot Image: initrd.xz
    c. No username/password
    d. Create Boot Files
    5. Go to “Admin” (cog icon) -> Boot Menu -> Editor
    a. Add console=tty0 vga=0 console=ttyS0,115200n8 to all the kernel lines (see example below)
    b. Save Changes

    1. Go to “Images” and create a new image (linux, block)
    2. Once created, go to profiles (same “Images” section) and change the “default” profile with:

    a. PXE Boot Options:
    i. Kernel: 4.9.8x64
    ii. Boot Image: grub
    iii. Kernel Arguments: console=tty0 vga=0 console=ttyS0,115200n8
    iv. Save
    b. Task Options:
    i. Task Completed Action: Power Off
    ii. Save

    Default menu modifications

    insmod password_pbkdf2
    insmod regexp
    set default=0
    set timeout=10
    set pager=1
    regexp -s 1:b1 '(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3})' $net_default_mac
    regexp -s 2:b2 '(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3})' $net_default_mac
    regexp -s 3:b3 '(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3})' $net_default_mac
    regexp -s 4:b4 '(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3})' $net_default_mac
    regexp -s 5:b5 '(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3})' $net_default_mac
    regexp -s 6:b6 '(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3}):(.{1,3})' $net_default_mac
    mac=01-$b1-$b2-$b3-$b4-$b5-$b6

    if [ -s /pxelinux.cfg/$mac.cfg ]; then
    configfile /pxelinux.cfg/$mac.cfg
    fi

    menuentry "Boot To Local Machine" --unrestricted {
    exit
    }

    menuentry "Client Console" --user {
    echo Please Wait While The Boot Image Is Transferred. This May Take A Few Minutes.
    linux /kernels/4.9.8x64 root=/dev/ram0 rw ramdisk_size=156000 web=http://192.168.0.1/service/client.asmx/ USER_TOKEN=cd6beead-3802-43b0-9556-baa00bac379e task=debug consoleblank=0 console=tty0 vga=0 console=ttyS0,115200n8
    initrd /images/initrd.xz
    }

    menuentry "On Demand Imaging" --user {
    echo Please Wait While The Boot Image Is Transferred. This May Take A Few Minutes.
    linux /kernels/4.9.8x64 root=/dev/ram0 rw ramdisk_size=156000 web=http://192.168.0.1/service/client.asmx/ USER_TOKEN=cd6beead-3802-43b0-9556-baa00bac379e task=ond consoleblank=0 console=tty0 vga=0 console=ttyS0,115200n8
    initrd /images/initrd.xz
    }

    menuentry "Add Computer" --user {
    echo Please Wait While The Boot Image Is Transferred. This May Take A Few Minutes.
    linux /kernels/4.9.8x64 root=/dev/ram0 rw ramdisk_size=156000 web=http://192.168.0.1/service/client.asmx/ USER_TOKEN=cd6beead-3802-43b0-9556-baa00bac379e task=register consoleblank=0 console=tty0 vga=0 console=ttyS0,115200n8
    initrd /images/initrd.xz
    }

    menuentry "Diagnostics" --user {
    echo Please Wait While The Boot Image Is Transferred. This May Take A Few Minutes.
    linux /kernels/4.9.8x64 root=/dev/ram0 rw ramdisk_size=156000 web=http://192.168.0.1/service/client.asmx/ USER_TOKEN=cd6beead-3802-43b0-9556-baa00bac379e task=diag consoleblank=0 console=tty0 vga=0 console=ttyS0,115200n8
    initrd /images/initrd.xz
    }

 

or Sign Up to reply!