Re: Some modules not found, dropping to dracut shell

2019-02-04 Diskussionsfäden Rémy Dernat
Oh I see, Ok... That explains why it worked before and then, why it does
not work anymore.

Thanks,

Le lun. 4 févr. 2019 à 11:27, Thomas Lange 
a écrit :

> > On Mon, 4 Feb 2019 10:26:02 +0100, Rémy Dernat 
> said:
>
> > I have some difficulties to setup a working nfsroot environement;
> The initrd image does not seem to contain all the necessary modules :
>
> > chroot /srv/fai/nfsroot
>
> > find /lib/modules/4.9.0-8-amd64/ -name "*bnx2*"
> > /lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2i
> > /lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> > /lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc
> > /lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> >
>  /lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> >
>  /lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> >
>  
> /lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
> > exit
>
> > lib/firmware/bnx2
> > lib/firmware/bnx2/bnx2-mips-06-6.2.3.fw
> > lib/firmware/bnx2/bnx2-mips-09-6.2.1b.fw
> > lib/firmware/bnx2/bnx2-rv2p-06-6.0.15.fw
>
>
>
> > # package list for creating the NFSROOT
>
> > # some network cards needs firmware
> > PACKAGES install-norec NONFREE
> > firmware-bnx2 firmware-bnx2x firmware-realtek
> > firmware-misc-nonfree
>
>
> > You could see that there are both linux-image-* and firmware-bnx2*.
> Yes, but the firmware packages are not used for your nfsroot.
> In FAI 5.5 there was the new option -N added to fai-make-nfsroot. You
> have to use this option, in order to get the packages listed in
> /etc/fai/NFSROOT in the section NONFREE added to the nfsroot. See man
> fai-make-nfsroot(8).
>
> --
> regards Thomas
>


Re: Some modules not found, dropping to dracut shell

2019-02-04 Diskussionsfäden Thomas Lange
> On Mon, 4 Feb 2019 10:26:02 +0100, Rémy Dernat  said:

> I have some difficulties to setup a working nfsroot environement; The 
initrd image does not seem to contain all the necessary modules :

> chroot /srv/fai/nfsroot
   
> find /lib/modules/4.9.0-8-amd64/ -name "*bnx2*"
> /lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2i
> /lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> /lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc
> /lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> 
/lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> /lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> 
/lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
> exit

> lib/firmware/bnx2
> lib/firmware/bnx2/bnx2-mips-06-6.2.3.fw
> lib/firmware/bnx2/bnx2-mips-09-6.2.1b.fw
> lib/firmware/bnx2/bnx2-rv2p-06-6.0.15.fw



> # package list for creating the NFSROOT

> # some network cards needs firmware
> PACKAGES install-norec NONFREE
> firmware-bnx2 firmware-bnx2x firmware-realtek
> firmware-misc-nonfree


> You could see that there are both linux-image-* and firmware-bnx2*.
Yes, but the firmware packages are not used for your nfsroot.
In FAI 5.5 there was the new option -N added to fai-make-nfsroot. You
have to use this option, in order to get the packages listed in
/etc/fai/NFSROOT in the section NONFREE added to the nfsroot. See man
fai-make-nfsroot(8).

-- 
regards Thomas


Re: Installing dracut on the install client

2019-02-04 Diskussionsfäden Robert Markula


Am 29.01.19 um 15:11 schrieb Thomas Lange:
> Solved!
>
> > Btw, the last entry right before the kernel panic is:
> > 
> > /init: error while loading shared libraries
> > 
>
> This line in your disk_config causes the error:
>
> vgmain-vartmp/var/tmp1GiBext4 defaults,noexec,nosuid,nodev
>
>
> dracut is using /var/tmp when creating the initrd. Since you've
> mounted it with noexec, the call of ldd to resolve the dependencies on
> executables will fail, because ldd says this is not a dynamic
> executable and so a lot of shared .so libraries are missing in the
> initrd. If you mount it without noexec it works. Another solution could
> be to change the tmpdir that dracut uses.
>
Confirmed!

Thomas, I can't say how much I appreciate your effort. It's all logical
now, but before it felt like the search for the needle in the haystack.

The solution is a hook in hooks/instsoft.DRACUT:


#!/bin/bash

error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code

mkdir $target/etc/dracut.conf.d

# FIXME: Remove the 'crc32c' kernel module as it is not available
# on Ubuntu 18.04 and leads to an error message preventing
# successful creation of the initramfs.
if ifclass UBUNTU; then
    fcopy -v /etc/dracut.conf.d/10-debian.conf
fi

# Instruct dracut to use a different directory for extracting temporary
# files, if /target/var/tmp is mounted noexec.
echo "tmpdir=/var/cache" > $target/etc/dracut.conf.d/10-tempdir.conf

exit $error


Thank you very much!


Robert


Some modules not found, dropping to dracut shell

2019-02-04 Diskussionsfäden Rémy Dernat
Hi,

I have some difficulties to setup a working nfsroot environement; The
initrd image does not seem to contain all the necessary modules :

chroot /srv/fai/nfsroot

find /lib/modules/4.9.0-8-amd64/ -name "*bnx2*"
/lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2i
/lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
/lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc
/lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
/lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
/lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
/lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
exit


With lsinitramfs, from the fai server :
# not working initrd

lsinitramfs /srv/tftp/fai/initrd.img-4.9.0-8-amd64 |grep -E "bnx2|rtl_nic"
lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc
lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko

While, with a working initrd :

lsinitramfs /var/www/html/fai/initrd.img-4.9.0-8-amd64 |grep -E
"bnx2|rtl_nic"
lib/firmware/bnx2
lib/firmware/bnx2/bnx2-mips-06-6.2.3.fw
lib/firmware/bnx2/bnx2-mips-09-6.2.1b.fw
lib/firmware/bnx2/bnx2-rv2p-06-6.0.15.fw
lib/firmware/bnx2/bnx2-rv2p-09-6.0.17.fw
lib/firmware/bnx2/bnx2-rv2p-09ax-6.0.17.fw
lib/firmware/bnx2x
lib/firmware/bnx2x/bnx2x-e1-7.13.1.0.fw
lib/firmware/bnx2x/bnx2x-e1h-7.13.1.0.fw
lib/firmware/bnx2x/bnx2x-e2-7.13.1.0.fw
lib/firmware/rtl_nic
lib/firmware/rtl_nic/rtl8105e-1.fw
lib/firmware/rtl_nic/rtl8106e-1.fw
lib/firmware/rtl_nic/rtl8106e-2.fw
lib/firmware/rtl_nic/rtl8107e-1.fw
lib/firmware/rtl_nic/rtl8107e-2.fw
lib/firmware/rtl_nic/rtl8168d-1.fw
lib/firmware/rtl_nic/rtl8168d-2.fw
lib/firmware/rtl_nic/rtl8168e-1.fw
lib/firmware/rtl_nic/rtl8168e-2.fw
lib/firmware/rtl_nic/rtl8168e-3.fw
lib/firmware/rtl_nic/rtl8168f-1.fw
lib/firmware/rtl_nic/rtl8168f-2.fw
lib/firmware/rtl_nic/rtl8168g-2.fw
lib/firmware/rtl_nic/rtl8168g-3.fw
lib/firmware/rtl_nic/rtl8168h-1.fw
lib/firmware/rtl_nic/rtl8168h-2.fw
lib/firmware/rtl_nic/rtl8402-1.fw
lib/firmware/rtl_nic/rtl8411-1.fw
lib/firmware/rtl_nic/rtl8411-2.fw
lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
lib/modules/4.9.0-8-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc
lib/modules/4.9.0-8-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko


I do not understand why the first one does not contain all the necessary
modules.

My NFSROOT is like this :

# package list for creating the NFSROOT

PACKAGES install-norec FULL
nfs-common fai-nfsroot rpcbind
rsync lftp
lshw procinfo
dump reiserfsprogs xfsprogs xfsdump btrfs-progs  dosfstools
hwinfo hdparm smartmontools
subversion rdate
emacs25-nox
numactl
dnsutils
netcat-traditional nmap
pxelinux syslinux-common # in jessie we need both
ca-certificates # for get-config-dir-https and apt-transport-https
usbutils pciutils
ssh
netselect
mdadm
#git # git consumes a lot of disk space on the FAI CD


PACKAGES install-norec
# dracut replaces live-boot and initramfs-tools
dracut live-boot- initramfs-tools-
dracut-config-generic
dracut-network
sysvinit-core systemd-sysv-
wget- curl
less
moreutils
ntpdate
lvm2
psmisc
dialog
console-common kbd
xz-utils


# some network cards needs firmware
PACKAGES install-norec NONFREE
firmware-bnx2 firmware-bnx2x firmware-realtek
firmware-misc-nonfree


# you should not edit the lines below
# architecture dependend list of packages that are installed

PACKAGES install-norec I386
grub-pc
linux-image-686-pae

PACKAGES install-norec AMD64
grub-pc
linux-image-amd64
#linux-image-amd64/stretch-backports # if you want to use a newer kernel

PACKAGES install-norec ARM64
grub-efi-arm64
linux-image-arm64

PACKAGES install-norec ARMHF
grub-efi-arm
linux-image-armmp

PACKAGES install-norec DEBIAN_9
apt-transport-https

PACKAGES install-norec DEBIAN_10
fdisk

PACKAGES install-norec DEBIAN_11
fdisk


You could see that there are both linux-image-* and firmware-bnx2*.

How should I change my [ NFSROOT / FAI config ] to include the missing
firmwares ?

Best regards,
Rémy.