From owner-freebsd-current@freebsd.org Wed Jun 17 21:29:18 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C992337359 for ; Wed, 17 Jun 2020 21:29:18 +0000 (UTC) (envelope-from miguelmclara@gmail.com) Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nJ9T39cSz4Yc3 for ; Wed, 17 Jun 2020 21:29:17 +0000 (UTC) (envelope-from miguelmclara@gmail.com) Received: by mail-pg1-x52f.google.com with SMTP id e9so1896968pgo.9 for ; Wed, 17 Jun 2020 14:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t49oaKDkvtiOKj9OnVgsRZvoaFNvrMa2cjeD5fcDd1E=; b=UQQtnfq+JTZY+29DjtN3SNmHLMvl9MAMWnOgpiGjYVL3nOKdhEeevLOGMe74/2DUMw pRKHfvD8bVwFiqgzA4FZsun1zOOW7ODFSYTrTcrnXEDrd9i4LnlNyJCGVbI0+UDvm/Wc boo1eCSD5A+NFx1pn9RlxzuzevZVoLnmfBMIxFGAdJ4IJY+fToH0lAorckAH5t60qpFc tQpvck/mC1XPdnHZBzyTLz7dz7gXV7edUbsUIih0jdCduU0Okc77bEJJJ9A3Tb9ur9l5 xgU7FnRrxUT/XCXi30hAVGm6kbNG4JVzLTGPOvGQkC+xF+QkxgBg6oDPEjAoCcb4jo6O xSAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t49oaKDkvtiOKj9OnVgsRZvoaFNvrMa2cjeD5fcDd1E=; b=TEhj9qhyH9/dygXmBNOU1UIefR3NTbPTPGMQCfRPdaPmjKt/kfB/l+35iJeUJdoQnQ XQwqsVBM/i4KLAym2d5tf3NxVWojy9egEnDWH2iVsmOadEMl8ffI2GxqEysOzLltQP4m naH4y1RuYfVoMjFxRgEDVs7LEjNHLcuOlSXYMlLBs+ucWPpOeLlTc+oRcTymXrCBsakm o8abYHXm7/JlSBWECIE4445yUdrnvcINkPdfQ5FE/HmhVdZiHI7bhexXgSNBB3P0YcQK RVOaFKM/dPudXI7akJsbNRAAjDbQEDUlPebQI/8MCHO2nHBiKaI+yQowLp+8LjIw7uXM LoRA== X-Gm-Message-State: AOAM530Bt0p3oNE1vtq1VfQPTXYspKDS33+tLBC2ZVqIIM+JbNHj/ZBL wJYo/Vfdm+VdDP+b9LoxdblLoyLgUhUr0HI3jUBXGXDwEoM= X-Google-Smtp-Source: ABdhPJxXvSS5r+1YezM9aqGEAAV9/49U4R1jf31W/U8p+E76NpYvWo5NdrdyyDz0AJFItV7C/0uVu157C9I5p4YCoNY= X-Received: by 2002:a63:8f46:: with SMTP id r6mr676095pgn.257.1592429355257; Wed, 17 Jun 2020 14:29:15 -0700 (PDT) MIME-Version: 1.0 References: <202006171800.05HI0jET086509@gndrsh.dnsmgr.net> In-Reply-To: <202006171800.05HI0jET086509@gndrsh.dnsmgr.net> From: Miguel C Date: Wed, 17 Jun 2020 22:28:38 +0100 Message-ID: Subject: Re: CTF: UEFI HTTP boot support To: "Rodney W. Grimes" Cc: Maxim Sobolev , FreeBSD Current X-Rspamd-Queue-Id: 49nJ9T39cSz4Yc3 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=UQQtnfq+; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of miguelmclara@gmail.com designates 2607:f8b0:4864:20::52f as permitted sender) smtp.mailfrom=miguelmclara@gmail.com X-Spamd-Result: default: False [-3.52 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.002]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; NEURAL_HAM_LONG(-0.99)[-0.989]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::52f:from]; NEURAL_HAM_SHORT(-0.52)[-0.524]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 21:29:18 -0000 On Wed, Jun 17, 2020 at 7:00 PM Rodney W. Grimes < freebsd-rwg@gndrsh.dnsmgr.net> wrote: > > On Tue., Jun. 16, 2020, 8:35 a.m. Rodney W. Grimes, < > > freebsd-rwg@gndrsh.dnsmgr.net> wrote: > > > > > > I've been trying out FreeBSD with raspberry Pi4 (4GB) and wanted to > see > > > > what the state of HTTP BOOT is in FreeBSD, so I bumped into this! > > > > > > > > I'm curious if it should be possible to point to a img/iso directly > (I > > > > tried to use the img.xz unpacked it and make it available on a local > web > > > > server and that didn't seem to work for me) but maybe thats cause > those > > > > images miss something, so arm64 aside does that work for amd64? I.E. > > > using > > > > the bootonly.iso? > > > > > > One problem you run into in attemtping this is even if you get an > > > image downloaded and started that image is being provided by some > > > memory device driver that emulates some type of iso device. > > > FreeBSD does not have a driver for that device so once the kernel > > > gets to the point of mounting its root file system it falls on > > > its face with a mountroot failure. > > > > > > > I donno what you are talking about Rodney, frankly! You information might > > be way outdated, like 15 years outdated. :) FreeBSD comes with very > decent > > compressed image support in MD(4)+geom_uzip, which could be just UFS > > snapshot or something created with mkimg utility. That said image could > be > > then either loaded after the kernel or embedded into one. Using this > > approach we deploy our systems here, both kernel and all root + python > > interpreter + custom gui installer fit into 40mb ISO but apart from > loader > > bits it's just two files. > > Max, > Let me try explain what this user is actually experienceing, > and that is taking a box stock linux distro, sticking it on a webserver > and using PXE/HTTP booting to a running system. FreeBSD can not > achieve that today WITHOUT some additional work. All that > stuff like UFS snapshot, mkimg utlity, embeding the image is a ton > of work compared to what others are doing. > Well actually I've been using opensbd to test not linux, I'm using https://rpi4-uefi.dev/ (not the sotck firmware). This firmware deos have UEFI HTTP support and as stated bellow UEFI 2.5 supports booting from just a iso or img file, ofc the OS needs to support this too. You can even point it to the internet FWIW but I was actually downloading miniroot67.img (openbsd installer) and serving it locally! Creating a HTTP Boot entry manually in UEFI works perfect with this and I can get to the shell, and even use it to install to a USB drive or sdcad. > > This person probably does not even have a running FreeBSD box to do > any of your suggested solutions on. > > No really I do have FreeBSD boxes, I just wanted to clarify that; I'm not too familiar with the process of making system images but I can learn. > So give me some credit, I have only been doing "diskless" since 1982, > and actually do exactly what the OP is doing with Esxi, Ubuntu, Windows > Installers, etc. Just my choice of protocol at the PXE layer is NFS > instead of HTTP, but my config files can do HTTP with 1 variable change > and point a web server at the root of my boot images tree. > > I even have a menu entry that sends me off to: > https://netboot.xyz/ Regards, > Rod > > > > > -Max > > > > > > > > > > > > And on the other hand is there any doc on how to set up dhcp/http > > > specific > > > > to FreeBSD similar to > https://en.opensuse.org/UEFI_HTTPBoot_Server_Setup > > > ? > > > > > > Since Linux uses this idea of a kernel payload and an initrd payload > > > to boot with it is much easier to get these 2 things over the network > > > and then have a workable system. FreeBSD does not have the initrd > > > payload and that complicates things, you need a functionaly filesystem > > > avaliable at the end of kernel initilization. > > > > > > > > I looked into > https://www.freebsd.org/doc/handbook/network-diskless.html > > > > but that doesn't seem to be up to date (or at least it focuses only > on > > > PXE > > > > and TFTP). > > > > > > Yes, old but workable. I have a more advanced system that supports NFS > > > booting using NFS support in PXE. The only thing done via tftp is to > > > upgrade the PXE running on the client to one that speaks NFS, then the > > > kernel is loaded via NFS and the root file system is later provided > > > via NFS. The use of NFS provides very fast boots, and I do not need > > > a web server to do it :-). > > > > > > > For clarification my ultimate goal is to use a few pi4's as "thin > > > clients", > > > > so eventually I will have to setup an image of the system with the > needed > > > > software (freerdp) but for starters I just wanted to check if > pointing > > > > directly to a img/iso would work and that does not seem to be the > case. > > > > > > I would strongly suggest use of NFS instead of trying to provide an > > > ISO image, as you no longer need to store the ISO in memory on the > > > client box, and with a pi4 your already memory contrained. > > > > > > > Thanks. > > > > _______________________________________________ > > > > freebsd-current@freebsd.org mailing list > > > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > > > To unsubscribe, send any mail to " > > > freebsd-current-unsubscribe@freebsd.org" > > > -- > > > Rod Grimes > > > rgrimes@freebsd.org > > > _______________________________________________ > > > freebsd-current@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > > To unsubscribe, send any mail to " > freebsd-current-unsubscribe@freebsd.org" > > > > > > > > -- > Rod Grimes > rgrimes@freebsd.org >