Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jul 2012 21:37:21 GMT
From:      Matthias Petermann <matthias@d2ux.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/170264: bsdinstall into jail doesn't find FTP distribution folder when executed on a system running a patch release kernel
Message-ID:  <201207292137.q6TLbLx3025891@red.freebsd.org>
Resent-Message-ID: <201207292140.q6TLe8Rc079196@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         170264
>Category:       misc
>Synopsis:       bsdinstall into jail doesn't find FTP distribution folder when executed on a system running a patch release kernel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 29 21:40:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Matthias Petermann
>Release:        FreeBSD 9.0-RELEASE-p3
>Organization:
>Environment:
FreeBSD compaq 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Scope: Using bsdinstall to create a new jail with distribution files from FTP

Symptom: After selecting the to-be-used mirror bsdinstall aborts with the message "An installation step has beeen aborted. Would you like to restart the installer or exit the installer?".

Investigation: Discussion in freebsd-questions (http://lists.freebsd.org/pipermail/freebsd-questions/2012-July/243878.html) and further analysis showed up the reason. Bsdinstall's mirrorselect script uses the output of "uname -r" to construct the BSDINSTALL_DISTSITE variable  which is used as URL for getting the distribution files later on.

As the system was updated to 9.0-RELEASE-p3 and the FTP mirrors don't have a folder for this special patch version (but only for 9.0-RELEASE) bsdinstall breaks.
>How-To-Repeat:
Execute

# bsdinstall jail /usr/jails/myjail 

on a system running 9.0-RELEASE-p3
>Fix:
A smart idea for a fix was illustrated by Darren Baginski in freebsd-questions (http://lists.freebsd.org/pipermail/freebsd-questions/2012-July/243884.html). He proposed to introduce an environment variable to allow modifications to the release name.

In addition to this it probably makes sense to let mirrorselect try to access the FTP site with the default (uname -r) settings as the very first step. If this fails, either the mentioned environment variable should be consulted, or  the FTP directory one level above should be queried to list the available release versions and let the user decide in a dialog which one to use.

I tried to find out how this could work out for the amd64 version and did not understand exactly the layout of the FTP directory. E.g. in ftp://ftp1.freebsd.org/pub/FreeBSD/releases/amd64/ there are:

drwxrwxr-x  14 89987  546  512 Feb 20  2011 8.2-RELEASE
drwxrwxr-x  14 89987  546  512 Apr 10 18:13 8.3-RELEASE
lrwxr-xr-x   1 89987  546   17 Jan  7  2012 9.0-RELEASE -> amd64/9.0-RELEASE
drwxrwxr-x   7 89987  546  512 Feb 19 02:05 ISO-IMAGES
-rw-rw-r--   1 89987  546  637 Nov 23  2005 README.TXT
drwxrwxr-x   5 89987  546  512 Jul 15 03:17 amd64         [*]

while listing the included amd64[*] subdirectory shows:

drwxrwxr-x  2 89987  546  512 Jan  7  2012 9.0-RELEASE
drwxrwxr-x  2 89987  546  512 Jul 15 03:22 9.1-BETA1
drwxrwxr-x  4 89987  546  512 Jul 15 03:18 ISO-IMAGES

bsdinstall itself uses ftp1.freebsd.org/pub/FreeBSD/releases/amd64/amd64/`uname -r`

What is the purpose to have this additional amd64[*] directory within the base amd64 directory?

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207292137.q6TLbLx3025891>