Bug 255659 - bsdinstall failure "file://usr/freebsd-dist/MANIFEST : No such file or directory"
Summary: bsdinstall failure "file://usr/freebsd-dist/MANIFEST : No such file or direct...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.0-STABLE
Hardware: arm64 Any
: --- Affects Some People
Assignee: freebsd-sysinstall (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-06 14:41 UTC by tech-lists
Modified: 2021-05-28 14:02 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tech-lists 2021-05-06 14:41:34 UTC
Hi,

am getting this error

"error while fetching file://usr/freebsd-dist/MANIFEST : No such file or
directory"

while trying to install to a usb3-connected harddrive, after auto-zfs is selected. The error persists even if the file is downloaded seperately and added to the /mnt chroot

see https://lists.freebsd.org/pipermail/freebsd-current/2021-May/079615.html for thread in freebsd-current@

Have tried with main/current and stable/13 on arm64 (raspberry pi 4/8GB)
Comment 1 Mark Millard 2021-05-06 21:38:52 UTC
I work around this issue via doing things like
(releng/13.0 's release 13.0.0 as what is to
be installed for this example):

# mkdir -p /usr/freebsd-dist
# cd /usr/freebsd-dist
# fetch http://ftp3.freebsd.org/pub/FreeBSD/releases/arm64/13.0-RELEASE/MANIFEST
MANIFEST                                               782  B 6147 kBps    00s
# cd ~
# bsdinstall

With that bsdinstall finds the MANIFEST and uses it
to figure out what alterntives to present for what
*.txz's to download (base.txz and kernel.txz being
automatic/implicit).

See, for example,

https://lists.freebsd.org/pipermail/freebsd-arm/2021-May/023765.html

(all the history, not just the most recent material).
Comment 2 tech-lists 2021-05-07 07:24:17 UTC
(In reply to Mark Millard from comment #1)

thanks very much for this, I now have a pi4/8GB booting with zfs on usb3
Comment 3 Mark Millard 2021-05-08 03:18:40 UTC
(In reply to tech-lists from comment #0)

I'll note that I tried to use:

# bsdinstall zfsboot

but it reported during the update of the media:

eval: cannot create /tmp/bsdinstall_etc/fstab: No such file or directory

and left the media partially updated:

=>       40  468862048    da1  GPT  (224G)
         40     532480  da1p1  efiboot0  (260M)
     532520  468329568         - free -  (223G)

For reference:

# ls -Tld /tmp/*
-rw-r--r--  1 root  wheel  4462 May  7 20:07:49 2021 /tmp/bsdinstall_log

The log shows:

DEBUG: /usr/libexec/bsdinstall/zfsboot: Last Chance!
DEBUG: zfs_create_boot: poolname=[zroot] vdev_type=[]
DEBUG: zfs_create_boot: Initializing temporary fstab(5) file...
DEBUG: zfs_create_boot: :> "/tmp/bsdinstall_etc/fstab"
DEBUG: zfs_create_boot: retval=2 <output below>
eval: cannot create /tmp/bsdinstall_etc/fstab: No such file or directory

In other words: it appearently did not try to create
/tmp/bsdinstall_etc/ before trying to use it to hold
a fstab file. (Sort of like trying to use MANIFEST
prior to having gotten such a file to use into the
place it uses it from.)
Comment 4 Nathan Whitehorn freebsd_committer 2021-05-13 13:55:14 UTC
In-review patch for this at https://reviews.freebsd.org/D27121/new/
Comment 5 commit-hook freebsd_committer 2021-05-28 14:02:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=40923b0c81cc2c151388ec5ead59f4bed89ac432

commit 40923b0c81cc2c151388ec5ead59f4bed89ac432
Author:     Nathan Whitehorn <nwhitehorn@FreeBSD.org>
AuthorDate: 2021-05-28 13:53:42 +0000
Commit:     Nathan Whitehorn <nwhitehorn@FreeBSD.org>
CommitDate: 2021-05-28 14:01:27 +0000

    Fix scripted installation from media without local distfiles.

    The bsdinstall script target did not have the infrastructure to fetch
    distfiles from a remote server the way the interactive installer does
    on e.g. bootonly media. Solve this by factoring out the parts of the
    installer that deal with fetching missing distributions into a new
    install stage called 'fetchmissingdists', which is called by both the
    interactive and scripted installer frontends.

    In the course of these changes, cleaned up a few other issues with
    the fetching of missing distribution files and added a warning if
    fetching the MANIFEST file, which is used to verify the integrity of
    the distribution files. We should at some point add cryptographic
    signatures to MANIFEST so that it can be fetched safely if not present
    on the install media (which it is for bootonly media).

    Initial patch by: Vinícius Zavam
    PR:             255659, 250928
    Reviewed by:    dteske
    MFC after:      4 weeks
    Differential Revision:  https://reviews.freebsd.org/D27121

 usr.sbin/bsdinstall/scripts/Makefile               |   8 +-
 usr.sbin/bsdinstall/scripts/auto                   |  96 +--------------
 usr.sbin/bsdinstall/scripts/bootconfig             |   6 +-
 .../bsdinstall/scripts/fetchmissingdists (new)     | 132 +++++++++++++++++++++
 usr.sbin/bsdinstall/scripts/script                 |   8 ++
 5 files changed, 154 insertions(+), 96 deletions(-)