Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

fix zfs initrd creation. #221

Closed
wants to merge 9 commits into from
Closed

Conversation

jcumming
Copy link

This addresses #208.

jcumming added 6 commits May 20, 2013 20:08
Previously, the zfs binaries were put in $out/sbin where the stage-1
patchelf wouldn't fix them up. This would fail the allowedReferences
test.

Move the zfs binaries to $out/bin.

Add a few config.boot.initrd.extraUtilsCommandsTest to make sure the
binaries didn't get cooked.
@ivan
Copy link
Member

ivan commented Aug 12, 2013

With these patches, I get

'/nix/store/fh2ca1c7nhq5v08a01fxn12104km59np-e2fsprogs-1.42.7/lib/libss.so.2.0' -> '/nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/lib/libss.so.2.0'
stripping (with flags -s) in  /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/lib  /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin 
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/ata_id...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/blkid...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/busybox...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/cdrom_id...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/dmsetup...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/e2fsck...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/kmod...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/lvm...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/mdadm...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/scsi_id...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/systemd-udevd...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/tune2fs...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/udevadm...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/v4l_id...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/zdb...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/zfs...
patching /nix/store/ylrlz4mdsfm5yrykqp5qs40310d5zc7z-extra-utils/bin/zpool...
testing patched programs...
hello world
BusyBox v1.20.2 (2013-05-23 19:40:56 UTC) multi-call binary.
206
Library version:   1.02.77 (2012-10-15)
  LVM version:     2.02.98(2) (2012-10-15)
mdadm - v3.1.2 - 10th March 2010
/nix/store/3xxyrlzf3bj3mlqw1419j7lyzmpzqx0j-stdenv/setup: line 912: zfs: command not found
builder for `/nix/store/0g9slgnc6w4n2n9mn6l88ard0rvhcwc3-extra-utils.drv' failed with exit code 127
cannot build derivation `/nix/store/8lzazmmaqpnzpzi9yasg7f3zhhwi4wip-stage-1-init.sh.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/hjqfb96d4vh95sm60mkcbhzv6mhbl9ii-initrd.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/4kqf94krrhrn1shlh5i0wnn7g3ab35q4-nixos-13.07pre-9c0c41dM-e2a8ff1.drv': 1 dependencies couldn't be built
error: build of `/nix/store/4kqf94krrhrn1shlh5i0wnn7g3ab35q4-nixos-13.07pre-9c0c41dM-e2a8ff1.drv' failed

@ivan
Copy link
Member

ivan commented Aug 12, 2013

Also, it appears that

+          cp -pdv ${kernel.zfs}/lib/lib*.so.* $out/lib
+          cp -pdv ${pkgs.zlib}/lib/lib*.so.* $out/lib

isn't necessary to make it build

@jcumming
Copy link
Author

Yeah. Lemme test this (a bit more).

@Phreedom
Copy link
Member

@ivan does this work for you now?

@ivan
Copy link
Member

ivan commented Aug 27, 2013

Yes, the initrd built fine for me with these changes. Those two unnecessary lines are still in the PR; not sure if they're a problem though.

@Phreedom
Copy link
Member

@ivan I take it that you had tested the config wtihout those 2 lines?

@ivan
Copy link
Member

ivan commented Aug 31, 2013

Yes

@Phreedom
Copy link
Member

Phreedom commented Sep 2, 2013

merged as f2523c0

@Phreedom Phreedom closed this Sep 2, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants