Re: Unable to installworld after successful buildworld and buildkernel

From: Brooks Davis <brooks_at_freebsd.org>
Date: Tue, 8 Oct 2013 09:15:01 -0500
On Tue, Oct 08, 2013 at 06:29:53AM +0000, Thomas Mueller wrote:
> From $SRCDIR/UPDATING
> 
>  To cross-install current onto a separate partition
>         --------------------------------------------------
>         # In this approach we use a separate partition to hold
>         # current's root, 'usr', and 'var' directories.   A partition
>         # holding "/", "/usr" and "/var" should be about 2GB in
>         # size.
> 
>         <make sure you have good level 0 dumps>
>         <boot into -stable>
>         make buildworld
>         make buildkernel KERNCONF=YOUR_KERNEL_HERE
>         <maybe newfs current's root partition>
>         <mount current's root partition on directory ${CURRENT_ROOT}>
>         make installworld DESTDIR=${CURRENT_ROOT}
>         make distribution DESTDIR=${CURRENT_ROOT} # if newfs'd
>         make installkernel KERNCONF=YOUR_KERNEL_HERE DESTDIR=${CURRENT_ROOT}
>         cp /etc/fstab ${CURRENT_ROOT}/etc/fstab                    # if newfs'd
>         <edit ${CURRENT_ROOT}/etc/fstab to mount "/" from the correct partition>
>         <reboot into current>
>         <do a "native" rebuild/install as described in the previous section>
>         <maybe install compatibility libraries from ports/misc/compat*>
>         <reboot>
> 
> This part seems not to have changed so far from RELENG_9 to HEAD.
> 
> I failed on "make installworld DESTDIR=/BETA1 |& tee installworld.log"
> 
> ERROR: Required unbound user is missing, see /usr/src/UPDATING
> 
> How am I supposed to have an unbound user on a partition where there is no existing FreeBSD installation?
> 
> Like the job market, where one needs to have two or more years experience, but how to get that first job?
> 
> I tried
> mergemaster -p -m /BETA1/usr/src -D /BETA1
> on thin air, managed to get a master.passwd that included unbound user, but 
> make installworld DESTDIR=/BETA1 
> failed immediately for lack of unbound user it couldn't find.
> 
> I also tried 
> make distribution DESTDIR=/BETA1
> (and distributeworld too), no joy:
> Target directory, either /BETA1/etc or /BETA1/etc/atf, does not exist.
> 
> There is a bug in $SRCDIR/UPDATING in the part about cross-installing current onto a separate partition.
> 
> I even tried copying /etc directory from USB stick to /BETA1/etc before running mergemaster, but that also failed.
> 
> But this was no barrier when I built and installed FreeBSD 9-stable i386 on a USB stick, mounted as /compat/i386.
> 
> From https://wiki.freebsd.org/i386-Wine
> 
> # cd /usr/src
> # make buildworld TARGET=i386
> # make installworld TARGET=i386 DESTDIR=/compat/i386
> # make distribution TARGET=i386 DESTDIR=/compat/i386
> # mkdir /compat/i386/usr/ports
> # mount -t devfs devfs /compat/i386/dev
> # mount -t nullfs /usr/ports /compat/i386/usr/ports
> 
> but instead of the latter part, after "make distribution ..."
> I made buildkernel and installkernel, and booted from the USB stick, used ports directory on hard drive.
> 
> That worked, but wouldn't work for FreeBSD-current now due to unbound and /etc problems?
> 
> How does one install FreeBSD, building from source, on a partition with no OS installed?

To cross install FreeBSD on a system without the required users/groups
you must either install them on the base system so that install and
mtree can use them or use the -DDB_FROM_SRC option when running the
installworld/installkernel/distribution targets.

-- Brooks

Received on Tue Oct 08 2013 - 12:15:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:42 UTC