mmatuska/mfsbsd

Cannot install from mfsbsd - "Error while fetching file:///usr/freebsd-dist/MANIFEST" - no such file or directory.

Opened this issue · 7 comments

Please see this bug:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213488

I think it would be solved by just placing the MANIFEST file in the images too. That would be a very great help and a huge improvement in usablility!

Thanks for your great work!

hbokh commented

Unable to install FreeBSD to disk (using netboot.xyz) due to this issue... Any workarounds?

Working for me fix

root@mfsbsd:~ # mkdir -p /usr/freebsd-dist/ 
root@mfsbsd:~ # touch /usr/freebsd-dist/MANIFEST

Any way to automate this? The whole sence for this is automated deploying via netboot.

What I had to do:

root@mfsbsd:~ # mkdir -p /usr/freebsd-dist && cd /usr/freebsd-dist
root@mfsbsd:~ # pkg install -y curl
root@mfsbsd:~ # curl -O https://download.freebsd.org/ftp/releases/amd64/11.2-RELEASE/kernel.txz
root@mfsbsd:~ # curl -O https://download.freebsd.org/ftp/releases/amd64/11.2-RELEASE/base.txz
root@mfsbsd:~ # curl -O https://download.freebsd.org/ftp/releases/amd64/11.2-RELEASE/MANIFEST
root@mfsbsd:~ # bsdinstall

Reference: https://forums.freebsd.org/threads/how-to-install-freebsd-w-zfs-on-a-remote-server-from-a-linux-rescue-system.61842/#post-356621

sec commented

You can just use fetch, it's already in base :)

This is for sure a bug in /usr/libexec/bsdinstall/auto.
Like it is makes no sense to check for LOCAL_DISTRIBUTIONS, and it has always set at least MANIFEST.
LOCAL_DISTRIBUTIONS is filled by local available DISTRIBUTIONS and the missing ones are fetched.

Should be patched like this:

--- auto.orig	2022-06-28 22:07:10.317987000 +0000
+++ auto	2022-06-28 22:11:23.208234000 +0000
@@ -132,7 +132,7 @@
 	fi
 fi
 
-LOCAL_DISTRIBUTIONS="MANIFEST"
+LOCAL_DISTRIBUTIONS=""
 FETCH_DISTRIBUTIONS=""
 for dist in $DISTRIBUTIONS; do
 	if [ ! -f $BSDINSTALL_DISTDIR/$dist ]; then
@@ -362,6 +362,7 @@
 fi
 
 if [ ! -z "$LOCAL_DISTRIBUTIONS" ]; then
+	LOCAL_DISTRIBUTIONS="$LOCAL_DISTRIBUTIONS MANIFEST"
 	# Download to a directory in the new system as scratch space
 	BSDINSTALL_FETCHDEST="$BSDINSTALL_CHROOT/usr/freebsd-dist"
 	mkdir -p "$BSDINSTALL_FETCHDEST" || error "Could not create directory $BSDINSTALL_FETCHDEST"

This seems also to be changed with 13.1. At least there is no LOCAL_DISTRIBUTIONS in auto any longer.