> Sent: Saturday, January 18, 2020 at 6:11 PM
> From: "Alan Feuerbacher via blfs-support" 
> <[email protected]>
> To: [email protected]
> Cc: "Alan Feuerbacher" <[email protected]>
> Subject: Re: [blfs-support] Trouble Configuring JS-60.8.0
>
> On 1/17/2020 8:22 PM, Douglas R. Reno via blfs-support wrote:
> >
> > On 1/17/20 9:19 PM, Alan Feuerbacher via blfs-support wrote:
> >> I'm trying to build JS-60.8.0 in BLFS systemd development version.
> >> The configure script immediately dies with the message:
> >>
> >> NotImplementedError: /dev/urandom (or equivalent) not found
> >>
> >> If I create an empty /dev/urandom file (touch /dev/urandom) I get:
> >>
> >> RuntimeError: Failed to read %zi bytes from /dev/urandom
> >>
> >> The only place in BLFS software where /dev/urandom appears is in
> >> BIND-9.14.9. So I installed that and again tried to configure
> >> JS-60.8.0, with the same error.
> >>
> >> What to do?
> >>
> >> Alan
> >>
> > Hi Alan,
> >
> > If you're still on your Fedora host (in chroot), make sure that /dev
> > and the virtual kernel filesystems are mounted.
>
> I'm very confused about this. I've read over the material in Sections
> 6.2 and 6.4 of the LFS book, but am unclear about several points.
>
> I've created a script that I call "getbackinstructions" that contains
> all the commands I've thought necessary to get back to the proper chroot
> environment after a reboot or otherwise logging out of chroot. Here it is:
>
> ###############
>
> # In Fedora do:
> su root
> # As necessary:
> # These directories will have been created on the first pass.
> # So later getback's will not need these. But on the first pass,
> # they're generally necessary.
> export LFS=/mnt/lfs
> mkdir -pv $LFS
> mkdir -pv $LFS/boot
> mkdir -pv $LFS/boot/efi
> mkdir -pv $LFS/home
> mkdir -pv $LFS/opt
> ln -sv $LFS/tools /
> mkdir -pv $LFS/{dev,proc,sys,run}
>
> # MUST EXPERIMENT WITH THESE but I'm pretty sure they need to be done
> # Done after a complete reboot:
> mount -v --bind /dev $LFS/dev
> mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620
> mount -vt proc proc $LFS/proc
> mount -vt sysfs sysfs $LFS/sys
> mount -vt tmpfs tmpfs $LFS/run
> if [ -h $LFS/dev/shm ]; then
>    mkdir -pv $LFS/$(readlink $LFS/dev/shm)
> fi
>
> mount -v -t ext4 /dev/mapper/lfslvm-root $LFS
> mount -v -t ext4 /dev/mapper/lfslvm-boot $LFS/boot
> mount -v -t vfat /dev/sdb1 $LFS/boot/efi
> mount -v -t ext4 /dev/mapper/lfslvm-opt $LFS/opt
> mount -v -t ext4 /dev/mapper/lfslvm-home $LFS/home
> mount -t ext4 /dev/mapper/fedora_localhost--live-home /fedora2home
> /sbin/swapon -v /dev/sdb2
>
> chroot "$LFS" /usr/bin/env -i              \
>      HOME=/root TERM="$TERM" PS1='(lfs chroot) \u:\w\$ ' \
>      LFS=/mnt/lfs \
>      PATH=/bin:/usr/bin:/sbin:/usr/sbin     \
>      /bin/bash --login
> PS1='(lfs chroot) \u:\w\$ '
> alias ll='ls -l'
> cd /sources
>
> ###############
>
> This all seems to work fine, as I've built everything in BLFS up through
> X using it.
>
> The thing is that, when I get into chroot and do mount, I get this error:
>
> mount: failed to read mtab: No such file or directory
>
> No surprise to me, since /etc/mtab is created when the real system boots
> up. I've confirmed that it gets populated correctly. Indeed, the first
> line is: devtmpfs /dev devtmpfs rw,.......
>
> Given all this, how do I do what you said?:
>
> "If you're still on your Fedora host (in chroot), make sure that /dev
> and the virtual kernel filesystems are mounted."
>
> > Also, if you're in chroot, do:
> >
> > export SHELL=/bin/bash
> >
> > (or /bin/sh would work too I think).
> Well, the above chroot command automatically creates this SHELL
> variable. I've confirmed that it really does this.
> >
> > /dev/urandom should be part of the bind mount in chroot, or part of
> > the actual devtmpfs when the system is booted in LFS.
> >
> It's not in chroot, as I've confirmed. Perhaps something ought to be
> changed in my script. /dev/urandom is certainly set up in the running
> LFS system.
>
> In fact, in the LFS system, I rebuilt JS-60.8.0 with no issues. Then I
> built a few more packages with no issues.
>
> Perhaps you can help me better understand what's going on.
>
> Alan
>
> --
> http://lists.linuxfromscratch.org/listinfo/blfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
>

Hello,

From looking at what you have listed above, are you attempting to install BLFS 
as LVM? If so, you are going to need to make sure that you have correctly set 
up the volumes otherwise you will not be able to boot the completed system.  
You will also need to make sure that you have correctly installed the LVM 
package.

You also should not be using a chroot environment at this late stage.  You 
should have made sure that the system boots, and be installing the software 
from within the native BLFS environment.

With regards to the chroot, the command to get back to a chroot is located in 
the "Cleaning Up" chapter:

chroot "$LFS" /usr/bin/env -i          \
    HOME=/root TERM="$TERM"            \
    PS1='(lfs chroot) \u:\w\$ '        \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    /bin/bash --login

You need to follow this:

6.2. Preparing Virtual Kernel File Systems

Each time you log out, you need to go through mounting the appropriate volumes 
that your new blfs system uses, and then use the chroot script that I pasted 
above.

Always make sure that you export the LFS environment variable, because if you 
reboot your system this will be lost.

Regards,

Christopher.
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to