mmatuska / mfsbsd

mfsBSD
http://mfsbsd.vx.sk
BSD 2-Clause "Simplified" License
494 stars 137 forks source link

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

Open chainria opened 7 years ago

chainria commented 7 years ago

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 7 years ago

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

panaceya commented 6 years ago

Working for me fix

root@mfsbsd:~ # mkdir -p /usr/freebsd-dist/ 
root@mfsbsd:~ # touch /usr/freebsd-dist/MANIFEST
chainria commented 6 years ago

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

amontalban commented 6 years ago

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 2 years ago

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

kolbma commented 2 years ago

This is for sure a bug in /usr/libexec/bsdinstall/auto.
Like it is makes no sense to check for _LOCALDISTRIBUTIONS, and it has always set at least MANIFEST.
_LOCALDISTRIBUTIONS 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"
kolbma commented 2 years ago

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