Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2023 20:51:53 -0700
From:      Christopher Bowman <crb@chrisbowman.com>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        hackers@freebsd.org
Subject:   Re: make installworld -DNO_ROOT
Message-ID:  <3E739B8C-9416-43B4-B8C7-6671FF5C028C@chrisbowman.com>
In-Reply-To: <ZDVqQ0FwfWADCsbf@spindle.one-eyed-alien.net>
References:  <ADBDBA5E-4B60-4C35-BD7D-9EDE84592358@chrisbowman.com> <ZDVqQ0FwfWADCsbf@spindle.one-eyed-alien.net>

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

> On Apr 11, 2023, at 7:10 AM, Brooks Davis <brooks@freebsd.org> wrote:
>=20
> These warnings are annoying, but mostly harmless.  A stalled
> and seemingly not quite right review to address the issue is at
> https://reviews.freebsd.org/D30990
>=20
> -- Brooks
>=20
> On Mon, Apr 10, 2023 at 12:00:45AM -0700, Christopher Bowman wrote:
>> Id like to build some images and I???d like do that as an ordinary =
user NOT as root
>>=20
>> I???m experimenting with ???make installworld -DNO_ROOT =
TARGET_ARCH=3Darmv7???
>>=20
>> When I do that or  ???make distribution -DNO_ROOT =
TARGET_ARCH=3Darmv7???
>>=20
>> I get the following error messages during the make run:
>>=20
>> make[4] warning: /etc: Permission denied.
>> make[4] warning: /lib: Permission denied.
>> make[5] warning: /lib/geom: Permission denied.
>> make[4] warning: /libexec: Permission denied.
>> make[4] warning: /bin: Permission denied.
>> make[4] warning: /rescue: Permission denied.
>> make[4] warning: /sbin: Permission denied.
>> make[4] warning: /etc: Permission denied.
>> make[2] warning: /etc: Permission denied.
>> make[3] warning: /etc/gss: Permission denied.
>> make[3] warning: /etc/mtree: Permission denied.
>> make[3] warning: /lib: Permission denied.
>> make[4] warning: /lib/geom: Permission denied.
>> make[3] warning: /libexec: Permission denied.
>> make[3] warning: /bin: Permission denied.
>> make[3] warning: /rescue: Permission denied.
>> make[3] warning: /sbin: Permission denied.
>> make[3] warning: /etc: Permission denied.
>>=20
>> I think as a results either the recursive makes are failing or not =
doing all they are supposed to.
>>=20
>> It???s possible I???m using -DNO_ROOT wrong but if anyone has some =
suggestions about what???s happening that would be very helpful.
>>=20
>> In the alternative I???m open to suggestions as to how to debug the =
hugs set of make invocations.  I find reading and debug make files hard =
enough but on huge treee like this with all the invocations and =
arguments I???m kind lost as to even which command within the make files =
are causing this.
>>=20
>> Thanks
>> Christopher

It=E2=80=99s possible but I=E2=80=99m not so sure.
I=E2=80=99m trying to build images and I=E2=80=99m using -DNO_ROOT to =
create a file system image without root privileges.  Then later I use =
makefs to build the filesystems images passing the METALOG file from the =
installworld/installkernel/distribution so that the files get the =
correct permission in the built filesystem.
My METLOG file doesn=E2=80=99t have an entry for /etc/fstab so even =
though I had build such a file and place it in my image, it doesn=E2=80=99=
t get copied into my filesystem by makefs because there is no METLOG =
entry.  So I=E2=80=99m of two minds.  On the one hand, this is probably =
ok for /boot/loader.conf which I add to my image, after all it=E2=80=99s =
not strictly necessary that /boot/loader.conf exist in all systems, but =
I=E2=80=99m not getting an /etc/fstab even though I hand create the =
proper fstab because I have no METALOG entry for it, and this is =
absolutely an essential file.  What I=E2=80=99m not sure of is how this =
is supposed to work and I=E2=80=99d appreciate anyones feedback.

1. I suppose it=E2=80=99s possible that fstab indeed isn=E2=80=99t =
created by make distribution and so I should hand create a METALOG entry =
for it, but this leaves me wondering what other files are important but =
also don=E2=80=99t get copied because they don=E2=80=99t have a METALOG =
entry.  Perhaps there is a switch to makefs that would warn me of files =
in the image without METALOG entries?

2. The /etc/fstab should have a METALOG entry and I=E2=80=99m doing =
something wrong, perhaps I=E2=80=99m missing a switch or options =
somewhere.

In any even I welcome any feedback and thank you for the response =
you=E2=80=99ve already sent.
Regards,
Christopher=09




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E739B8C-9416-43B4-B8C7-6671FF5C028C>