On 28/02/2019 19:08, DJ Lucas (LFS) via lfs-dev wrote:
> On February 28, 2019 2:22:46 AM CST, Pierre Labastie via lfs-dev
> <[email protected]> wrote:
>
>>
>> To Bruce, Doug and DJ: I may take an intermediate approach: add the two
>> lines
>> above only to jhalfs (in Makefile, under the "devices" target), not to
>> the LFS
>> book itself, where it could be confusing for new LFS'ers.
>>
>> To DJ: make-ca -C could be used, but for jhalfs, it would mean tweaking
>> the
>> book instructions twice: first for downloading the certs on the host,
>> then for
>> adding the -C switch. I think the approach of copying
>> /run/systemd/resolve/resolv.conf to $LFS/run in jhalfs' Makefile is
>> simpler.
>
> I'd like to just go ahead and add it to the book then. No guarantee that
> previous host was systemd.
Arrgh, yes, of course. I hadn't thought about that... But just change to
copying /etc/resolv.conf instead of copying /run/systemd/resolve/resolv.conf
would work in any case. (That's what you propose below, I think).
> Something to the effect of the following would be appropriate...
>
> (screen-root, userinput-nodump)
>
> mv /$LFS/etc/resolv.conf{,.dist} &&
> cp /etc/resolv.conf $LFS/etc
>
>
> To undo before first boot...
>
> mv $LFS/etc/resolv.conf{.dist,}
>
>
> This way, even though jhalfs had to override the nodump, it is still
> something that is in the book with instructions to correct it before first
> boot, and add an exit note in jhalfs if option selected and systemd.
>
> Thoughts?
Well, depends whether doing sysv of systemd:
- in the sysv book, there are instructions for creating /etc/resolv.conf. No
need to do anything else then, whatever the host configuration... The network
will be available after that. So no need to change anything.
- in the systemd book, we recommend symlinking
/etc/resolv.conf->/run/systemd/resolve/resolv.conf, which does not exist, so
that the network cannot be used. In this case, before entering chroot, and
after $LFS/run has been mounted to a tmpfs, simply add:
mkdir -p $LFS/run/systemd/resolve
cp /etc/resolv.conf $LFS/run/systemd/resolve
I think this should be OK whatever the host. I'll put that into jhalfs.
Whether it should be added to the book is another story. It looks like systemd
users would +1 it, while others are more reluctant. It certainly is only for
systemd...
Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page