PXE Booting SLES 12 SP1 install

Discussion in 'Linux Admins, Storage and Virtualization' started by macrules34, Aug 20, 2018.

  1. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    I have my server setup for PXE boot and then in the menu select "linux" to install the OS. How ever when I enter linux and hit enter I get an error "Could not find kernel image: linux". I have googled and tried a few things but nothing has worked so far.
     
    #1
  2. marcoi

    marcoi Active Member

    Joined:
    Apr 6, 2013
    Messages:
    916
    Likes Received:
    147
    im going from memory and havent touched PXE in a while. But i recall needing DNS server or switch showing the PXE parameter that tells where the ftp server where the iso image lives. or something to that nature. Have you checked that both parts are working before trying the install?
     
    #2
  3. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    #3
  4. marcoi

    marcoi Active Member

    Joined:
    Apr 6, 2013
    Messages:
    916
    Likes Received:
    147
    only suggestion i can provide, is recheck you followed the guide to the letter. IE you may have forgot a step or fat fingered something.
    Then do basic testing of the pxe server.
    Does it have an IP?
    Can you ping the server you are trying to image?
    is the firewall off or port open for ftp?
    are the config files pointing to right iso?
    etc.
     
    #4
  5. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    Does it have an IP? Yes.
    Can you ping the server you are trying to image? Yes.
    is the firewall off or port open for ftp? Yes.
    are the config files pointing to right iso? Yes.
     
    #5
    Last edited: Aug 20, 2018
  6. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    When I try to connect to the tftp server I get:
    'Timeout occurred Connection request failed." Client is a windows 7 machine, server is a Sles linux machine.
     
    #6
    Last edited: Aug 20, 2018
  7. BLinux

    BLinux Well-Known Member

    Joined:
    Jul 7, 2016
    Messages:
    1,685
    Likes Received:
    446
    you need to setup your DHCP server to do the PXE boot. that's how it's going to know where to find the boot loader.

    with ISC DHCP, this is a sample config from my DHCP/PXE setup:

    Code:
        pool {
            allow members of "virtual-machine-class-1";
            allow members of "virtual-machine-class-2";
            allow members of "virtual-machine-class-3";
            allow members of "real-machine-class-1";
            allow members of "real-machine-class-2";
            allow members of "real-machine-class-3";
            allow members of "real-machine-class-4";
            allow members of "real-machine-class-5";
            allow members of "real-machine-class-6";
            allow members of "real-machine-class-7";
            deny known-clients;
            range dynamic-bootp 192.168.0.112 192.168.0.126;
            next-server    pxeboot.domain.org;  # name of TFTP server
            filename    "pxelinux.0";    # name of bootloader program
    }
    
    i setup groups of machines that are allowed to PXE boot, while others are not. machines that are members of these groups can PXE boot, and get pointed to "next-server", and "filename" which is the boot loader (this is done over TFTP) You can then configure the boot loader to load any other kernel image.

    as an example, here's my pxelinux setup default menu:

    Code:
    prompt 1
    timeout 0
    display pxelinux.cfg/boot.msg
    F1 pxelinux.cfg/boot.msg
    F2 pxelinux.cfg/f2-centos7-i.msg
    F3 pxelinux.cfg/f3-centos7-k.msg
    F4 pxelinux.cfg/f4-rhel7-i.msg
    F5 pxelinux.cfg/f5-rhel7-k.msg
    F6 pxelinux.cfg/f6-centos6-i.msg
    F7 pxelinux.cfg/f7-centos6-k.msg
    F8 pxelinux.cfg/f8-rhel6-i.msg
    F9 pxelinux.cfg/f9-rhel6-k.msg
    F10 pxelinux.cfg/f10-fedora-i.msg
    F11 pxelinux.cfg/f11-special.msg
    INCLUDE pxelinux.cfg/f2-centos7-i.cfg
    INCLUDE pxelinux.cfg/f3-centos7-k.cfg
    INCLUDE pxelinux.cfg/f4-rhel7-i.cfg
    INCLUDE pxelinux.cfg/f5-rhel7-k.cfg
    INCLUDE pxelinux.cfg/f6-centos6-i.cfg
    INCLUDE pxelinux.cfg/f7-centos6-k.cfg
    INCLUDE pxelinux.cfg/f8-rhel6-i.cfg
    INCLUDE pxelinux.cfg/f9-rhel6-k.cfg
    INCLUDE pxelinux.cfg/f10-fedora-i.cfg
    INCLUDE pxelinux.cfg/f11-special.cfg
    
    it points to a bunch of other config files that have specific settings for various OSes, kickstart profiles, or manual installs. The "-i" are interactive installs, while the "-k" are my kickstart profiles.

    Here's one example of that:

    Code:
    #
    # CentOS 7
    #
    label C-7-x86_64
      kernel pxelinux.cfg/iso/centos-7-x86_64/images/pxeboot/vmlinuz
      append initrd=pxelinux.cfg/iso/centos-7-x86_64/images/pxeboot/initrd.img repo=http://server.domain.com/distros/centos-7-x86_64/ noipv6 ip=dhcp ramdisk_size=9216
    label C-7-x86_64-rescue
      kernel pxelinux.cfg/iso/centos-7-x86_64/images/pxeboot/vmlinuz
      append initrd=pxelinux.cfg/iso/centos-7-x86_64/images/pxeboot/initrd.img repo=http://server.domain.com/distros/centos-7-x86_64/ noipv6 ip=dhcp ramdisk_size=9216 text rescue
    
    here, i'm pointing it to the kernel and initrd over TFTP as before, and i'm giving it a repo via HTTP (so you need webserver setup too), but you can use other protocols as well.

    Anyway TL;DR is you need to setup your DHCP, TFTP, and pxelinux to PXE boot and point to a kernel image (and you might need to setup web server or NFS too).
     
    #7
    Last edited: Aug 22, 2018
  8. BLinux

    BLinux Well-Known Member

    Joined:
    Jul 7, 2016
    Messages:
    1,685
    Likes Received:
    446
    BTW, when you type in "linux", is that at the pxelinux boot loader? If so, can you show your config for the "linux" label? For example, see the 3rd code section in my previous post, the "label C-7-x86_64" is my label to boot CentOS 7 64bit installer. So, I type "C-7-x86_64" instead and the settings under that "label" are what gets used for the boot parameters.
     
    #8
  9. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    Looks like I solved the issue. I had the wrong "label" in the default file. So when the screen (messages file) came up they didn't match, once I changed that in the default file it booted. Thanks guys!!!:)
     
    #9
  10. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    Does anyone know if I can run 4 installs from one repository or do I need 4 different repository's?
     
    #10
  11. BLinux

    BLinux Well-Known Member

    Joined:
    Jul 7, 2016
    Messages:
    1,685
    Likes Received:
    446
    You can run as many installs simultaneously as you wish, as long as your network and server can handle the load.
     
    #11
  12. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
  13. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    Know that I have the SLES 12 install working I want to also be able to install Ubuntu from the same server. So I copied over the vmlinuz file to my /srv/tftpboot/bios/x86 but it still boots into suse linux and freezes. How do I install Ubuntu via PXE using the same server?
     
    #13
  14. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    I've gotten it to boot to what looks like the Ubuntu single user mode, the prompt is (initramfs)?
     
    #14
  15. BLinux

    BLinux Well-Known Member

    Joined:
    Jul 7, 2016
    Messages:
    1,685
    Likes Received:
    446
    it's a bit hard to help you without configuration details. it would help if you posted your pxelinux configuration. i don't know about Ubuntu install process, but usually you have to provide a bootable kernel, an initramfs that kickstarts the install process and a location for packages. you need to figure out what those should be for Ubuntu and make sure you're providing those parameters to the PXE boot process.
     
    #15
  16. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    Screen shot of error:
     

    Attached Files:

    #16
  17. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    Here is a copy of the pxelinux.cfg/default file:

    default harddisk
    # hard disk
    label harddisk
    localboot -2
    #install
    label linux
    kernel linux
    append initrd=initrd showopts install=ftp://<ipaddress of server>/suse12sp1/CD1/
    label ubuntu
    kernel pxelinux.cfg/ubuntu1804/vmlinuz
    append initrd=pxelinux.cfg/ubuntu1804/initrd.gz showopts install=ftp://<ipaddress of server>/ubuntu1804/iso/
    display message
    #uigfxboot bootlogo message
    implicit0
    prompt1
    timeout600
     
    #17
  18. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    Anybody? This is my first PXE server so let me know what files to post for you to diagnose the issue.
     
    #18
  19. BLinux

    BLinux Well-Known Member

    Joined:
    Jul 7, 2016
    Messages:
    1,685
    Likes Received:
    446
    @macrules34 I think it's not a config problem on your end, but a Ubuntu installer problem. Apparently their PXE booting has been broken for months:

    Bug #1754828 “Ubuntu 18.04 LTS fails to PXE boot” : Bugs : ubiquity package : Ubuntu

    Bug #1755863 “netbooting the bionic live CD over NFS goes straig...” : Bugs : casper package : Ubuntu

    Bug #1754777 “bionic casper nfsboot not reaching desktop env, fa...” : Bugs : casper package : Ubuntu

    In those bug reports, there is mention of a workaround to use systemd to mask off some services that might allow it to work. I'm no Ubuntu expert, so take that for what it is worth. All I did was a google search on the issue you had..
     
    #19
  20. macrules34

    macrules34 Member

    Joined:
    Mar 18, 2016
    Messages:
    195
    Likes Received:
    2
    Okay thanks. I did do some googling myself, but came up with nothing that would have pointed me in Ubuntu PXE boot bugs.
     
    #20
Similar Threads: Booting SLES
Forum Title Date
Linux Admins, Storage and Virtualization PXE booting Suse Linux 12 SP3 Sep 7, 2018
Linux Admins, Storage and Virtualization UEFI booting Proxmox 5.2 on ZFS? Aug 23, 2018
Linux Admins, Storage and Virtualization Problems booting Kernel >4.10, stuck at boot screen Dec 27, 2017
Linux Admins, Storage and Virtualization Booting from ZFS: How to Best Handle Swap Space? Oct 25, 2017
Linux Admins, Storage and Virtualization Booting from unRAID flash drive in ESXi guest Jun 6, 2015

Share This Page