Multiplay Labs

tech hits and tips from Multiplay

Archive for December, 2015

FreeBSD 10.2-RELEASE EFI ZFS root boot

without comments

Based on Eric McCorkle’s work on adding modular boot support to EFI including adding ZFS support, which is currently in review we’ve back-ported the required changes to 10.2-RELEASE code base, which others may find useful.

This can be found here: FreeBSD 10.2-RELEASE EFI ZFS root boot patch

Here’s how:

We assume your source tree is in /usr/src, your disk device is da0

  1. Go to your FreeBSD source tree:
    cd /usr/src
  2. Download the EFI ZFS root patch
    wget http://blog.multiplay.co.uk/dropzone/freebsd/freebsd-10-efi-zfs-boot.tgz
  3. Extract the patch
    tar -xzf freebsd-10-efi-zfs-boot.tgz
  4. Apply the patches to your source tree in order
    sh -c 'for i in `ls -1 patches/efi*.patch | sort`; do patch -E -N -p0 -F1 -t < $i; done'
  5. Cleanup orig files and remove old empty directories:
    find /usr/src/ -name '*.orig' -delete
    find /usr/src/sys/boot/ -type d -empty -delete
  6. Build and install world e.g.
    make buildworld -j24 && make installworld
  7. Partition your disk e.g.
    gpart create -s GPT da0
    gpart add -t efi -s 800K da0
    gpart add -t freebsd-swap -s 10G da0
    gpart add -t freebsd-zfs da0
    gpart bootcode -p /boot/boot1.efifat -i 1 da0
  8. Perform your OS install to da0p3
  9. Reboot and enjoy

Update 2015-12-11: Corrected patch URL.
Update 2015-12-14: Updated code in line with #11226 of https://reviews.freebsd.org/D4515.
Update 2015-01-15: Updated code in line with that which is now committed to HEAD.

Written by Dilbert

December 10th, 2015 at 6:20 pm

Posted in FreeBSD,Hackery,ZFS

KNOPPIX Linux executable “No such file or directory”

without comments

We needed to update the firmware for some Intel XL710 nics which only has a Windows or Linux firmware utility ATM so we booted KNOPPIX Linux and tried to patch the firmware only to be presented with:
./nvmupdate64e: No such file or directory

The binary was there, the OS was 64bit (the same as the binary) so what was going on. After much head scratching it turned out that the kernel was 64bit but userland is 32bit only for KNOPPIX meaning there was no way to run the the provided 64bit binary.

Fix use another distro…

Written by Dilbert

December 2nd, 2015 at 5:41 pm

Posted in Linux,Networking,OS's