• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Preseeded (unattended) netboot UEFI Debian installation

Scheduled Pinned Locked Moved
Tutorials
5
9
3.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    RobPomeroy
    last edited by RobPomeroy Jan 28, 2021, 8:17 AM Jan 28, 2021, 2:15 PM

    With the assistance of @george1421 in this thread, I arrived at the following process.

    Features

    • Unattended installation, preseeded (using a preseed.cfg)
    • Completely hands-off, after selecting the appropriate FOG menu item on PXE boot
    • Based on Debian’s netboot - no need to download the Debian ISO
    • Uses HTTP only (though you could swap in NFS, TFTP, etc., if you prefer)
    • The three files required for the installation can reside in a single location on the FOG server
    • Process can be generalised to other versions of Debian and other OSes (though you’d need to work out the Kickstart part for RedHat distros, etc.)
    • Works with UEFI - I repeat, works with UEFI!!!

    Process

    On the FOG server, Unpack netboot.tar.gz to a folder under the Apache root, e.g.:

    mkdir -p /home/fogproject/www/os/debian/10.7N
    cd /home/fogproject/www/os/debian/10.7N
    wget http://ftp.nl.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/netboot.tar.gz
    tar zxf netboot.tar.gz
    rm netboot.tar.gz
    chown -R apache:apache /home/fogproject/www/os/debian/10.7N
    

    Note that I relocated my www root to /home/fogproject. Yours may still be at /var/www. or similar.

    The above unpacks:

    debian-installer/
    pxelinux.0@
    pxelinux.cfg@
    version.info
    

    We only really need two files, which are in the debian-installer directory: linux and initrd.gz. Still, I leave this folder structure as it is.

    Place your preseed file (normally preseed.cfg) in the same directory as the netboot files above (/home/fogproject/www/os/debian/10.7N in my example). The content of your preseed file is entirely up to you. See the official example, to get started.

    Create a FOG menu entry as follows:

    Menu item: os.Debian.10.7.auto.UEFI
    Description: Unattended Debian 10.7 installation (UEFI)
    Parameters:

    kernel http://${fog-ip}/os/debian/10.7N/debian-installer/amd64/linux auto=true url=http://${fog-ip}/os/debian/10.7N/preseed.cfg interface=auto hostname=debian-10 domain=local initrd=initrd.gz vga=788 noprompt quiet
    imgfetch http://${fog-ip}/os/debian/10.7N/debian-installer/amd64/initrd.gz
    boot || goto MENU
    

    Menu Show with: All hosts

    Notes

    If you need an option for manual installation, simply drop the auto parameters from the kernel line:

    kernel http://${fog-ip}/os/debian/10.7N/debian-installer/amd64/linux initrd=initrd.gz vga=788 quiet
    

    The clue to getting this working was to include initrd=initrd.gz in the kernel line and then use imgfetch to make initrd.gz available.

    F 1 Reply Last reply Apr 29, 2021, 5:09 PM Reply Quote 1
    • F
      fogman4 @RobPomeroy
      last edited by fogman4 Apr 29, 2021, 11:09 AM Apr 29, 2021, 5:09 PM

      @robpomeroy Thaks for this howto. I tried it replacing http by ftp and it doesn’t work.

      Have any clue how to do it via ftp ?

      T R 2 Replies Last reply Apr 29, 2021, 5:10 PM Reply Quote 0
      • T
        Tom Elliott @fogman4
        last edited by Apr 29, 2021, 5:10 PM

        @fogman4 ftp wouldn’t be a supported protocol for iPXE. At least not that I’m aware of.

        You could change it out for tftp but then you’d have to move the files to /tftpboot/ instead of the html folder root.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • R
          RobPomeroy @fogman4
          last edited by RobPomeroy May 3, 2021, 12:56 PM Apr 30, 2021, 8:22 AM

          @fogman4 As Tom says, I wouldn’t use FTP. It’s a painful protocol. 😁 I’ve favoured HTTP because of past experiences with TFTP (dropped packets and lower quality networks, corruption…). TFTP would be marginally faster at certain points though. And the HTTP setup leaves you with a clean directory structure.

          1 Reply Last reply Reply Quote 0
          • F
            fogman4
            last edited by May 3, 2021, 5:51 PM

            Thanks @Tom-Elliott and @RobPomeroy .

            I managed to boot an Ubuntu iso with preseed via tftp + ftp .

            kernel tftp://${fog-ip}/os/ubuntu/20.04D/vmlinuz
            initrd tftp://${fog-ip}/os/ubuntu/20.04D/initrd
            imgargs vmlinuz initrd=initrd ip=dhcp root=/dev/ram0 ramdisk_size=1800000 url=ftp://192.168.100.10/ubuntu-20.04.2.0-desktop-amd64.iso net.ifnames=0 biosdevname=0 ipv6.disable=1 locale=fr_FR.UTF-8 keyboard-configuration/layoutcode=fr hostname=TESTX-L ro automatic-ubiquity url=ftp://192.168.100.10/preseed.cfg DEBCONF_DEBUG=5
            boot || goto MENU
            

            I changed the original vsftpd.conf of the fog server.

            By the way i’ll try to boot and preseed with http.

            Thank you for the suggestion.

            R F 2 Replies Last reply May 3, 2021, 6:56 PM Reply Quote 0
            • R
              RobPomeroy @fogman4
              last edited by May 3, 2021, 6:56 PM

              @fogman4 Cool - good result!

              1 Reply Last reply Reply Quote 0
              • F
                faboulous @fogman4
                last edited by May 4, 2021, 3:42 PM

                @fogman4 do machines need a large amount of ram booting this way? I have a lot of machines with low spec to install: 4G of ram which is not enough to unpack the iso using http method. More detail on what I already tried here :
                https://forums.fogproject.org/topic/14590/20-04-autoinstall

                G 1 Reply Last reply May 4, 2021, 4:43 PM Reply Quote 0
                • G
                  george1421 Moderator @faboulous
                  last edited by May 4, 2021, 4:43 PM

                  @faboulous said in Preseeded (unattended) netboot UEFI Debian installation:

                  do machines need a large amount of ram booting this way?

                  Realize that Rob is addressing the debian installer and not the ubuntu installer. For ubuntu it uses the iso image that gets transferred over to the target computer. Your target computer needs to have enough ram to hold the entire iso image and enough ram for the OS (linux) and virtual drive (initrd.gz). In this setup the iso image is not unpacked but executed as a virtual dvd image in memory.

                  If you look at the instructions here for the Debian 10.7 installer https://forums.fogproject.org/post/140720 that uses the disk on the FOG server to hold the files from the ISO image. So the only ram requirements is for the linux kernel and the initrd.gz file. In this setup less than 1GB is all that is needed to run the installer.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  F 1 Reply Last reply May 4, 2021, 11:31 PM Reply Quote 0
                  • F
                    faboulous @george1421
                    last edited by May 4, 2021, 11:31 PM

                    @george1421 I was asking for the suggestion made by @fogman4 which seems to be focused on Ubuntu, with a large amount or ram set for ramdisk

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    1 / 1
                    • First post
                      7/9
                      Last post

                    163

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project