On 28/02/2019 20:46, Daniel Schepler via lfs-dev wrote: > On Thu, Feb 28, 2019 at 10:09 AM DJ Lucas (LFS) via lfs-dev > <[email protected]> wrote: >> I'd like to just go ahead and add it to the book then. No guarantee that >> previous host was systemd. 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. > > For what it's worth (which I realize might not be very much): when I'm > building lfs-systemd on a systemd based host, I tend to jump ahead a > bit and create the basic filesystem hierarchy and $LFS/etc/os-release > before the chroot command, then replace the chroot command with > something along the lines of: > > systemd-nspawn -D $LFS --as-pid2 /tools/bin/env -i HOME=/root > TERM="$TERM" PS1=... PATH=... /tools/bin/bash --login +h > > Then systemd-nspawn takes care of a lot of the mounting of filesystems > like /proc /sys /run etc., and bind mounting appropriate files > (including /etc/resolv.conf taking into account whether the host file > is a symlink) from the host. >
Interesting, but it supposes the host is running systemd, which is likely with most modern distros, but not always true (devuan, gentoo). That is one point I missed at first, but DJ pointed it (I'm not sure about my English: can a point be pointed?). Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
