Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to add zfs to initrd on openSUSE Tumbleweed #11750

Closed
misaka4a92 opened this issue Mar 15, 2021 · 3 comments
Closed

Failed to add zfs to initrd on openSUSE Tumbleweed #11750

misaka4a92 opened this issue Mar 15, 2021 · 3 comments
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@misaka4a92
Copy link

System information

Type Version/Name
Distribution Name openSUSE
Distribution Version Tumbleweed-20210311
Linux Kernel 5.11.4-1-default
Architecture x86_64
ZFS Version 2.0.4-1
SPL Version 2.0.4-1

Describe the problem you're observing

When making initrd, the inclusion of zfs dracut module failed because libgcc_s.so is not under /usr/lib .

The result of locate libgcc_s.so is:

# locate libgcc_s.so
/lib64/libgcc_s.so.1
/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so

The problem might be caused by contrib/dracut/90zfs/module-setup.sh.in in source tree. After editing the path for libgcc_s.so installation in /usr/lib/dracut/modules.d/90zfs/module-setup.sh, this module can be added to initrd.

Describe how to reproduce the problem

executing dracut -f to build the initrd, when adding zfs to initrd, it will fail at dracut-install libgcc_s.so , and zfs module is not included in the initrd.

Include any warning/errors/backtraces from the system logs

dracut-install: ERROR: installing '/usr/lib/gcc/*/*/libgcc_s.so*'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.ELz0Yb/initramfs -a /usr/lib/gcc/*/*/libgcc_s.so*
@misaka4a92 misaka4a92 added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Mar 15, 2021
@tjburrows
Copy link

I also have this problem with openSUSE Leap 15.2. I'm not sure what the implications are, because it seems like everything functions normally. I have been using ZFS for a while, but recently used a hack to 'fix' this, which is to add a soft link to libgcc_s.so into a nested directory like /usr/lib/gcc/for/zfs/libgcc_s.so.

nabijaczleweli added a commit to nabijaczleweli/zfs that referenced this issue May 23, 2021
SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for
i686 glibc), which is in the search path

Also relax the /usr/lib path to catch systems similar to SUSE
(/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without
the top-level lib64

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11750
@nabijaczleweli
Copy link
Contributor

nabijaczleweli commented May 23, 2021

Can you try the first patch from #12108 (also referenced below)?

nabijaczleweli added a commit to nabijaczleweli/zfs that referenced this issue May 23, 2021
SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for
i686 glibc), which is in the search path

Also relax the /usr/lib path to catch systems similar to SUSE
(/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without
the top-level lib64

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11750
nabijaczleweli added a commit to nabijaczleweli/zfs that referenced this issue Jun 1, 2021
SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for
i686 glibc), which is in the search path

Also relax the /usr/lib path to catch systems similar to SUSE
(/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without
the top-level lib64

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11750
rkitover pushed a commit to rkitover/zfs that referenced this issue Jun 2, 2021
SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for
i686 glibc), which is in the search path

Also relax the /usr/lib path to catch systems similar to SUSE
(/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without
the top-level lib64

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11750
nabijaczleweli added a commit to nabijaczleweli/zfs that referenced this issue Jun 4, 2021
SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for
i686 glibc), which is in the search path

Also relax the /usr/lib path to catch systems similar to SUSE
(/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without
the top-level lib64

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11750
behlendorf pushed a commit to behlendorf/zfs that referenced this issue Jun 8, 2021
SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for
i686 glibc), which is in the search path

Also relax the /usr/lib path to catch systems similar to SUSE
(/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without
the top-level lib64

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11750
Closes openzfs#12108
behlendorf pushed a commit to behlendorf/zfs that referenced this issue Jun 8, 2021
SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for
i686 glibc), which is in the search path

Also relax the /usr/lib path to catch systems similar to SUSE
(/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without
the top-level lib64

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11750
Closes openzfs#12108
behlendorf pushed a commit to behlendorf/zfs that referenced this issue Jun 9, 2021
SUSE stores the library at /lib64/libgcc_s.so.1 (/lib/libgcc_s.so.1 for
i686 glibc), which is in the search path

Also relax the /usr/lib path to catch systems similar to SUSE
(/usr/lib64/gcc/x86_64-suse-linux/10/libgcc_s.so) but without
the top-level lib64

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes openzfs#11750
Closes openzfs#12108
@barathrm
Copy link

barathrm commented Oct 4, 2021

Not sure why, but even running with e69792e I'm still having issues. Running dracut with -H in a chroot, I get

dracut: *** Including module: zfs ***
simple
dracut-install: No SOURCE argument given
Usage: dracut-install -D DESTROOTDIR [-r SYSROOTDIR] [OPTION]... -a SOURCE...
or: dracut-install -D DESTROOTDIR [-r SYSROOTDIR] [OPTION]... SOURCE DEST
or: dracut-install -D DESTROOTDIR [-r SYSROOTDIR] [OPTION]... -m KERNELMODULE [KERNELMODULE …]
...
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.7B9HGe/initramfs -a

Which I can fix by commenting out the # Try a simple path first elif so that it tries the suse option first. Oddly,

# echo /usr/lib/libgcc_s.so*
/usr/lib/libgcc_s.so*

So I'm not sure why the script fails to skip that elif.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

4 participants