Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
see the depenguinator script

de-penguinator - a fishy hack https://git.io/JeQDW to de-linux your systems

packet's big aarch64 servers don't have a FreeBSD ZFS image available, but we can fix that. We have the EFI partition, a 4GiB swap partition, and with Ubuntu 18.04, comes zfs. Anything is possible.

  • use packet.net to create an Ubuntu 18.04 install of either Ampere hr330a or cavium thunderX2
  • adapt depenguinator.sh as needed, it duplicates the current host's network settings
  • enjoy FreeBSD zfs sweetness after a short reboot
  • https://git.io/JeQM5
  • future improvements could use linux ramdisk pivot and move directly to UEFI partition + zfs in one move

overview

  • install as ubuntu 18.04
  • ssh as root
  • install zfs on linux bits
  • switch swap partition for a (small) zpool
  • create a FreeBSD-compatible zpool
  • import the zfs dataset
  • tweak rc.conf & loader.conf
  • update boota64.efi

zpool features

On each platform, run pool get all zroot |egrep 'feature@.+enabled|active' | egrep -o 'feature@\w+' | sort this is the minimal set you can use.

usage

scp *.sh root@host:/tmp/ && \
ssh root@host sh -eux /tmp/depenguinator.sh
# or live dangerously
ssh root@host 'curl -sL https://git.io/JeQM5 | sh'

directly via API

curl 'https://api.packet.net/projects/1d127bd3-40d8-478b-ad26-155cc56c0d1b/devices/batch?include=plan,ip_addresses,facility,ssh_keys,project,volumes,volumes.attachments,volumes.facility,volumes.snapshots,volumes.snapshot_policies,virtual_networks&exclude=project_lite&token=...' \
  -Hcontent-type:application/json \
  --data '{"batches":[{"hostname":"ampere","plan":"c2.large.arm","operating_system":"ubuntu_18_04","ipxe_script_url":"","facility":"ams1","userdata":"#!/bin/sh\ncurl -sL https://git.io/JeQM5 | sh","quantity":1,"ip_addresses":[{"address_family":4,"public":false},{"address_family":4,"public":true},{"address_family":6,"public":true}],"spot_instance":true,"spot_price_max":1}]}'
Last login: Sun Dec 15 22:04:43 2019 from 94.136.7.161
FreeBSD 13.0-CURRENT (GENERIC) #0 r355634: Thu Dec 12 03:50:52 UTC 2019
Welcome to FreeBSD!
Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories: https://www.FreeBSD.org/security/
FreeBSD Handbook: https://www.FreeBSD.org/handbook/
FreeBSD FAQ: https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums: https://forums.FreeBSD.org/
Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with: pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.
Show the version of FreeBSD installed: freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages: man man
FreeBSD directory layout: man hier
Edit /etc/motd.template to change this login announcement.
root@a02:~ # cat /var/run/dmesg.boot
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2019 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-CURRENT #0 r355634: Thu Dec 12 03:50:52 UTC 2019
root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64
FreeBSD clang version 9.0.0 (tags/RELEASE_900/final 372316) (based on LLVM 9.0.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT(efifb): resolution 800x600
module firmware already present!
Starting CPU 1 (1)
Starting CPU 2 (100)
Starting CPU 3 (101)
Starting CPU 4 (200)
Starting CPU 5 (201)
Starting CPU 6 (300)
Starting CPU 7 (301)
Starting CPU 8 (400)
Starting CPU 9 (401)
Starting CPU 10 (500)
Starting CPU 11 (501)
Starting CPU 12 (600)
Starting CPU 13 (601)
Starting CPU 14 (700)
Starting CPU 15 (701)
Starting CPU 16 (800)
Starting CPU 17 (801)
Starting CPU 18 (900)
Starting CPU 19 (901)
Starting CPU 20 (a00)
Starting CPU 21 (a01)
Starting CPU 22 (b00)
Starting CPU 23 (b01)
Starting CPU 24 (c00)
Starting CPU 25 (c01)
Starting CPU 26 (d00)
Starting CPU 27 (d01)
Starting CPU 28 (e00)
Starting CPU 29 (e01)
Starting CPU 30 (f00)
Starting CPU 31 (f01)
FreeBSD/SMP: Multiprocessor System Detected: 32 CPUs
random: unblocking device.
random: entropy device external interface
ACPI: IORT: Dropping unhandled type 1
ACPI: IORT: Dropping unhandled type 1
ACPI: IORT: Dropping unhandled type 1
ACPI: IORT: Dropping unhandled type 1
MAP 92000000 mode 2 pages 2304
MAP fffc0000 mode 2 pages 64
MAP 9ff31f0000 mode 2 pages 112
MAP 9ff80c0000 mode 2 pages 16
MAP 9ff8820000 mode 2 pages 1216
MAP 9ffa530000 mode 2 pages 32
MAP 9ffcac0000 mode 2 pages 80
MAP 9ffcb10000 mode 2 pages 128
MAP 9ffcb90000 mode 2 pages 16
MAP 9ffcba0000 mode 2 pages 32
MAP 9ffcbc0000 mode 2 pages 16
MAP 9ffcbd0000 mode 2 pages 32
MAP 9ffcbf0000 mode 2 pages 16
MAP 9ffcc00000 mode 2 pages 32
MAP 9ffcc20000 mode 2 pages 16
MAP 9ffcc30000 mode 2 pages 48
MAP 9ffcc60000 mode 2 pages 16
MAP 9ffcc70000 mode 2 pages 16
MAP 9ffcc80000 mode 2 pages 32
MAP 9ffcca0000 mode 2 pages 16
MAP 9ffccb0000 mode 2 pages 16
MAP 9ffccc0000 mode 2 pages 16
MAP 9ffccd0000 mode 2 pages 1232
MAP 9ffd1a0000 mode 2 pages 48
MAP 9ffd1d0000 mode 2 pages 4112
MAP 9fffd80000 mode 2 pages 32
MAP 9fffda0000 mode 2 pages 48
MAP 10540000 mode 0 pages 16
WARNING: Device "kbd" is Giant locked and may be deleted before FreeBSD 13.0.
kbd0 at kbdmux0
WARNING: Device "openfirm" is Giant locked and may be deleted before FreeBSD 13.0.
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
acpi0: <ALASKA A M I >
acpi0: Power Button (fixed)
acpi0: Sleep Button (fixed)
psci0: <ARM Power State Co-ordination Interface Driver> on acpi0
gic0: <ARM Generic Interrupt Controller v3.0> iomem 0x78000000-0x7801ffff,0x78400000-0x787fffff on acpi0
its0: <ARM GIC Interrupt Translation Service> on gic0
generic_timer0: <ARM Generic Timer> irq 11,12,13 on acpi0
Timecounter "ARM MPCore Timecounter" frequency 40000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 40000000 Hz quality 1000
ahci0: <AHCI SATA controller> iomem 0x1c000000-0x1c000fff irq 3 on acpi0
ahci0: AHCI v1.31 with 2 6Gbps ports, Port Multiplier not supported with FBS
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahci1: <AHCI SATA controller> iomem 0x1c100000-0x1c100fff irq 4 on acpi0
ahci1: AHCI v1.31 with 2 6Gbps ports, Port Multiplier not supported with FBS
ahcich2: <AHCI channel> at channel 0 on ahci1
ahcich3: <AHCI channel> at channel 1 on ahci1
xhci0: <Generic USB 3.0 controller> iomem 0x13800000-0x138fffff irq 5 on acpi0
xhci0: 64 bytes context size, 32-bit DMA
usbus0 on xhci0
xhci1: <Generic USB 3.0 controller> iomem 0x13900000-0x139fffff irq 6 on acpi0
xhci1: 64 bytes context size, 32-bit DMA
usbus1 on xhci1
acpi_button0: <Power Button> on acpi0
pcib0: <Generic PCI host controller> on acpi0
pci0: <PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 0.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <network, ethernet> at device 0.0 (no driver attached)
pci1: <network, ethernet> at device 0.1 (no driver attached)
pcib2: <Generic PCI host controller> on acpi0
pci2: <PCI bus> on pcib2
pcib3: <PCI-PCI bridge> at device 0.0 on pci2
pci3: <PCI bus> on pcib3
igb0: <Intel(R) PRO/1000 PCI-Express Network Driver> mem 0x30100000-0x301fffff,0x30200000-0x30203fff at device 0.0 on pci3
igb0: Using 1024 TX descriptors and 1024 RX descriptors
igb0: Using 4 RX queues 4 TX queues
igb0: Using MSI-X interrupts with 5 vectors
igb0: Ethernet address: 00:1b:21:e0:6f:1d
pcib4: <Generic PCI host controller> on acpi0
pci4: <PCI bus> on pcib4
pcib5: <PCI-PCI bridge> at device 0.0 on pci4
pci5: <PCI bus> on pcib5
pcib6: <Generic PCI host controller> on acpi0
pci6: <PCI bus> on pcib6
pcib7: <PCI-PCI bridge> at device 0.0 on pci6
pci7: <PCI bus> on pcib7
pcib8: <Generic PCI host controller> on acpi0
pci8: <PCI bus> on pcib8
pcib9: <PCI-PCI bridge> at device 0.0 on pci8
pci9: <PCI bus> on pcib9
pcib10: <Generic PCI host controller> on acpi0
pci10: <PCI bus> on pcib10
pcib11: <PCI-PCI bridge> at device 0.0 on pci10
pci11: <PCI bus> on pcib11
pcib12: <Generic PCI host controller> on acpi0
pci12: <PCI bus> on pcib12
pcib13: <PCI-PCI bridge> at device 0.0 on pci12
pcib12: pci_host_generic_core_alloc_resource FAIL: type=4, rid=28, start=0000000010000000, end=0000000010000fff, count=0000000000001000, flags=0
pcib13: failed to allocate initial I/O port window: 0x10000000-0x10000fff
pci13: <PCI bus> on pcib13
pcib14: <PCI-PCI bridge> at device 0.0 on pci13
pcib12: pci_host_generic_core_alloc_resource FAIL: type=4, rid=28, start=0000000010000000, end=0000000010000fff, count=0000000000001000, flags=3000
pcib14: failed to allocate initial I/O port window: 0x10000000-0x10000fff
pci14: <PCI bus> on pcib14
pcib12: pci_host_generic_core_alloc_resource FAIL: type=4, rid=28, start=0000000010000000, end=0000000010000fff, count=0000000000001000, flags=3000
vgapci0: <VGA-compatible display> port 0x1000-0x107f mem 0x30000000-0x30ffffff,0x31040000-0x3105ffff at device 0.0 on pci14
cpu0: <ACPI CPU> on acpi0
uart0: <PrimeCell UART (PL011)> iomem 0x12600000-0x12600fff irq 1 on acpi0
uart0: console (115200,n,8,1)
uart1: <PrimeCell UART (PL011)> iomem 0x12610000-0x12610fff irq 2 on acpi0
acpi0: Could not update all GPEs: AE_NOT_CONFIGURED
cryptosoft0: <software crypto>
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 5.0Gbps Super Speed USB v3.0
Release APs...done
Trying to mount root from zfs:zroot/ROOT/default []...
taskqgroup_attach_cpu_deferred: binding interrupt failed for txq3: 22
Root mount waiting for:taskqgroup_attach_cpu_deferred: binding interrupt failed for txq2: 22
CAM usbus0 usbus1
taskqgroup_attach_cpu_deferred: binding interrupt failed for txq1: 22
taskqgroup_attach_cpu_deferred: binding interrupt failed for txq0: 22
taskqgroup_attach_cpu_deferred: binding interrupt failed for rxq3: 22
taskqgroup_attach_cpu_deferred: binding interrupt failed for rxq2: 22
taskqgroup_attach_cpu_deferred: binding interrupt failed for rxq1: 22
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <Micron 5200 MTFDDAK480TDC D1MU004> ACS-3 ATA SATA 3.x device
ada0: Serial Number 190920EC6397
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 457862MB (937703088 512 byte sectors)
taskqgroup_attach_cpu_deferred: binding interrupt failed for rxq0: 22
CPU 0: APM eMAG 8180 r3p2 affinity: 0 0
Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
Instruction Set Attributes 1 = <>
Processor Features 0 = <GIC,AdvSIMD,FP,EL3,EL2,EL1 32,EL0 32>
Processor Features 1 = <>
Memory Model Features 0 = <TGran4,TGran64,TGran16,SNSMem,BigEnd,16bit ASID,4TB PA>
Memory Model Features 1 = <8bit VMID>
Memory Model Features 2 = <32bit CCIDX,48bit VA>
Debug Features 0 = <2 CTX BKPTs,4 Watchpoints,6 Breakpoints,PMUv3,Debugv8>
Debug Features 1 = <>
Auxiliary Features 0 = <>
Auxiliary Features 1 = <>
CPU 1: APM eMAG 8180 r3p2 affinity: 0 1
CPU 2: APM eMAG 8180 r3p2 affinity: 1 0
CPU 3: APM eMAG 8180 r3p2 affinity: 1 1
CPU 4: APM eMAG 8180 r3p2 affinity: 2 0
CPU 5: APM eMAG 8180 r3p2 affinity: 2 1
CPU 6: APM eMAG 8180 r3p2 affinity: 3 0
CPU 7: APM eMAG 8180 r3p2 affinity: 3 1
CPU 8: APM eMAG 8180 r3p2 affinity: 4 0
CPU 9: APM eMAG 8180 r3p2 affinity: 4 1
CPU 10: APM eMAG 8180 r3p2 affinity: 5 0
CPU 11: APM eMAG 8180 r3p2 affinity: 5 1
CPU 12: APM eMAG 8180 r3p2 affinity: 6 0
CPU 13: APM eMAG 8180 r3p2 affinity: 6 1
CPU 14: APM eMAG 8180 r3p2 affinity: 7 0
CPU 15: APM eMAG 8180 r3p2 affinity: 7 1
CPU 16: APM eMAG 8180 r3p2 affinity: 8 0
CPU 17: APM eMAG 8180 r3p2 affinity: 8 1
CPU 18: APM eMAG 8180 r3p2 affinity: 9 0
CPU 19: APM eMAG 8180 r3p2 affinity: 9 1
CPU 20: APM eMAG 8180 r3p2 affinity: 10 0
CPU 21: APM eMAG 8180 r3p2 affinity: 10 1
CPU 22: APM eMAG 8180 r3p2 affinity: 11 0
CPU 23: APM eMAG 8180 r3p2 affinity: 11 1
root@a02:~ #
FreeBSD/arm64 (a01) (ttyu0)
login: root
Dec 15 22:23:46 a01 login[1182]: ROOT LOGIN (root) ON ttyu0
Last login: Sun Dec 15 22:11:44 on ttyu0
FreeBSD 12.1-RELEASE r354233 GENERIC
Welcome to FreeBSD!
Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories: https://www.FreeBSD.org/security/
FreeBSD Handbook: https://www.FreeBSD.org/handbook/
FreeBSD FAQ: https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums: https://forums.FreeBSD.org/
Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with: pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.
Show the version of FreeBSD installed: freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages: man man
FreeBSD directory layout: man hier
Edit /etc/motd to change this login announcement.
root@a01:~ # cat /var/run/dmesg.boot
---<<BOOT>>---
Copyright (c) 1992-2019 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.1-RELEASE r354233 GENERIC arm64
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM 8.0.1)
VT(efifb): resolution 800x600
KLD file mlx5en.ko is missing dependencies
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
Starting CPU 4 (4)
Starting CPU 5 (5)
Starting CPU 6 (6)
Starting CPU 7 (7)
Starting CPU 8 (8)
Starting CPU 9 (9)
Starting CPU 10 (a)
Starting CPU 11 (b)
Starting CPU 12 (c)
Starting CPU 13 (d)
Starting CPU 14 (e)
Starting CPU 15 (f)
Starting CPU 16 (100)
Starting CPU 17 (101)
Starting CPU 18 (102)
Starting CPU 19 (103)
Starting CPU 20 (104)
Starting CPU 21 (105)
Starting CPU 22 (106)
Starting CPU 23 (107)
Starting CPU 24 (108)
Starting CPU 25 (109)
Starting CPU 26 (10a)
Starting CPU 27 (10b)
Starting CPU 28 (10c)
Starting CPU 29 (10d)
Starting CPU 30 (10e)
Starting CPU 31 (10f)
Starting CPU 32 (200)
Starting CPU 33 (201)
Starting CPU 34 (202)
Starting CPU 35 (203)
Starting CPU 36 (204)
Starting CPU 37 (205)
Starting CPU 38 (206)
Starting CPU 39 (207)
Starting CPU 40 (208)
Starting CPU 41 (209)
Starting CPU 42 (20a)
Starting CPU 43 (20b)
Starting CPU 44 (20c)
Starting CPU 45 (20d)
Starting CPU 46 (20e)
Starting CPU 47 (20f)
Starting CPU 48 (10000)
Starting CPU 49 (10001)
Starting CPU 50 (10002)
Starting CPU 51 (10003)
Starting CPU 52 (10004)
Starting CPU 53 (10005)
Starting CPU 54 (10006)
Starting CPU 55 (10007)
Starting CPU 56 (10008)
Starting CPU 57 (10009)
Starting CPU 58 (1000a)
Starting CPU 59 (1000b)
Starting CPU 60 (1000c)
Starting CPU 61 (1000d)
Starting CPU 62 (1000e)
Starting CPU 63 (1000f)
Starting CPU 64 (10100)
Starting CPU 65 (10101)
Starting CPU 66 (10102)
Starting CPU 67 (10103)
Starting CPU 68 (10104)
Starting CPU 69 (10105)
Starting CPU 70 (10106)
Starting CPU 71 (10107)
Starting CPU 72 (10108)
Starting CPU 73 (10109)
Starting CPU 74 (1010a)
Starting CPU 75 (1010b)
Starting CPU 76 (1010c)
Starting CPU 77 (1010d)
Starting CPU 78 (1010e)
Starting CPU 79 (1010f)
Starting CPU 80 (10200)
Starting CPU 81 (10201)
Starting CPU 82 (10202)
Starting CPU 83 (10203)
Starting CPU 84 (10204)
Starting CPU 85 (10205)
Starting CPU 86 (10206)
Starting CPU 87 (10207)
Starting CPU 88 (10208)
Starting CPU 89 (10209)
Starting CPU 90 (1020a)
Starting CPU 91 (1020b)
Starting CPU 92 (1020c)
Starting CPU 93 (1020d)
Starting CPU 94 (1020e)
Starting CPU 95 (1020f)
FreeBSD/SMP: Multiprocessor System Detected: 96 CPUs
arc4random: no preloaded entropy cache
random: entropy device external interface
MAP 500000 mode 2 pages 2048
MAP fffec000 mode 2 pages 20
MAP 10ffe7b9000 mode 2 pages 3071
MAP 10fff3b8000 mode 2 pages 3143
MAP 803000000000 mode 0 pages 4096
MAP 804000001000 mode 0 pages 8192
MAP 87e006001000 mode 0 pages 4096
MAP 87e024000000 mode 0 pages 4096
MAP 87e0d0001000 mode 0 pages 1
MAP 903000000000 mode 0 pages 4096
MAP 904000001000 mode 0 pages 8192
MAP 97e006001000 mode 0 pages 4096
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
simplebus0: <Flattened device tree simple bus> on ofwbus0
clk_fixed0: <Fixed clock> on simplebus0
clk_fixed1: <Fixed clock> on simplebus0
simplebus1: <Flattened device tree simple bus> on ofwbus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
gic0: <ARM Generic Interrupt Controller v3.0> mem 0x801000000000-0x80100000ffff,0x801080000000-0x8010805fffff,0x901080000000-0x9010805fffff irq 5 on ofwbus0
its0: <ARM GIC Interrupt Translation Service> mem 0x801000020000-0x80100021ffff on gic0
its1: <ARM GIC Interrupt Translation Service> mem 0x901000020000-0x90100021ffff on gic0
generic_timer0: <ARMv8 Generic Timer> irq 0,1,2,3 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 100000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 100000000 Hz quality 1000
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
cpu4: <Open Firmware CPU> on cpulist0
cpu5: <Open Firmware CPU> on cpulist0
cpu6: <Open Firmware CPU> on cpulist0
cpu7: <Open Firmware CPU> on cpulist0
cpu8: <Open Firmware CPU> on cpulist0
cpu9: <Open Firmware CPU> on cpulist0
cpu10: <Open Firmware CPU> on cpulist0
cpu11: <Open Firmware CPU> on cpulist0
cpu12: <Open Firmware CPU> on cpulist0
cpu13: <Open Firmware CPU> on cpulist0
cpu14: <Open Firmware CPU> on cpulist0
cpu15: <Open Firmware CPU> on cpulist0
cpu16: <Open Firmware CPU> on cpulist0
cpu17: <Open Firmware CPU> on cpulist0
cpu18: <Open Firmware CPU> on cpulist0
cpu19: <Open Firmware CPU> on cpulist0
cpu20: <Open Firmware CPU> on cpulist0
cpu21: <Open Firmware CPU> on cpulist0
cpu22: <Open Firmware CPU> on cpulist0
cpu23: <Open Firmware CPU> on cpulist0
cpu24: <Open Firmware CPU> on cpulist0
cpu25: <Open Firmware CPU> on cpulist0
cpu26: <Open Firmware CPU> on cpulist0
cpu27: <Open Firmware CPU> on cpulist0
cpu28: <Open Firmware CPU> on cpulist0
cpu29: <Open Firmware CPU> on cpulist0
cpu30: <Open Firmware CPU> on cpulist0
cpu31: <Open Firmware CPU> on cpulist0
cpu32: <Open Firmware CPU> on cpulist0
cpu33: <Open Firmware CPU> on cpulist0
cpu34: <Open Firmware CPU> on cpulist0
cpu35: <Open Firmware CPU> on cpulist0
cpu36: <Open Firmware CPU> on cpulist0
cpu37: <Open Firmware CPU> on cpulist0
cpu38: <Open Firmware CPU> on cpulist0
cpu39: <Open Firmware CPU> on cpulist0
cpu40: <Open Firmware CPU> on cpulist0
cpu41: <Open Firmware CPU> on cpulist0
cpu42: <Open Firmware CPU> on cpulist0
cpu43: <Open Firmware CPU> on cpulist0
cpu44: <Open Firmware CPU> on cpulist0
cpu45: <Open Firmware CPU> on cpulist0
cpu46: <Open Firmware CPU> on cpulist0
cpu47: <Open Firmware CPU> on cpulist0
cpu48: <Open Firmware CPU> on cpulist0
cpu49: <Open Firmware CPU> on cpulist0
cpu50: <Open Firmware CPU> on cpulist0
cpu51: <Open Firmware CPU> on cpulist0
cpu52: <Open Firmware CPU> on cpulist0
cpu53: <Open Firmware CPU> on cpulist0
cpu54: <Open Firmware CPU> on cpulist0
cpu55: <Open Firmware CPU> on cpulist0
cpu56: <Open Firmware CPU> on cpulist0
cpu57: <Open Firmware CPU> on cpulist0
cpu58: <Open Firmware CPU> on cpulist0
cpu59: <Open Firmware CPU> on cpulist0
cpu60: <Open Firmware CPU> on cpulist0
cpu61: <Open Firmware CPU> on cpulist0
cpu62: <Open Firmware CPU> on cpulist0
cpu63: <Open Firmware CPU> on cpulist0
cpu64: <Open Firmware CPU> on cpulist0
cpu65: <Open Firmware CPU> on cpulist0
cpu66: <Open Firmware CPU> on cpulist0
cpu67: <Open Firmware CPU> on cpulist0
cpu68: <Open Firmware CPU> on cpulist0
cpu69: <Open Firmware CPU> on cpulist0
cpu70: <Open Firmware CPU> on cpulist0
cpu71: <Open Firmware CPU> on cpulist0
cpu72: <Open Firmware CPU> on cpulist0
cpu73: <Open Firmware CPU> on cpulist0
cpu74: <Open Firmware CPU> on cpulist0
cpu75: <Open Firmware CPU> on cpulist0
cpu76: <Open Firmware CPU> on cpulist0
cpu77: <Open Firmware CPU> on cpulist0
cpu78: <Open Firmware CPU> on cpulist0
cpu79: <Open Firmware CPU> on cpulist0
cpu80: <Open Firmware CPU> on cpulist0
cpu81: <Open Firmware CPU> on cpulist0
cpu82: <Open Firmware CPU> on cpulist0
cpu83: <Open Firmware CPU> on cpulist0
cpu84: <Open Firmware CPU> on cpulist0
cpu85: <Open Firmware CPU> on cpulist0
cpu86: <Open Firmware CPU> on cpulist0
cpu87: <Open Firmware CPU> on cpulist0
cpu88: <Open Firmware CPU> on cpulist0
cpu89: <Open Firmware CPU> on cpulist0
cpu90: <Open Firmware CPU> on cpulist0
cpu91: <Open Firmware CPU> on cpulist0
cpu92: <Open Firmware CPU> on cpulist0
cpu93: <Open Firmware CPU> on cpulist0
cpu94: <Open Firmware CPU> on cpulist0
cpu95: <Open Firmware CPU> on cpulist0
pmu0: <Performance Monitoring Unit> irq 4 on ofwbus0
uart0: <PrimeCell UART (PL011)> mem 0x87e024000000-0x87e024000fff irq 6 on simplebus0
uart0: console (115200,n,8,1)
uart1: <PrimeCell UART (PL011)> mem 0x87e025000000-0x87e025000fff irq 7 on simplebus0
pcib0: <Cavium Integrated PCI/PCI-E Controller> mem 0x848000000000-0x848001ffffff on simplebus0
pcib0: ThunderX quirk, setting ECAM to 0
mrmlbus0: <Cavium ThunderX MRML bridge> on pcib0
mdionexus0: <Cavium ThunderX MDIO nexus> on mrmlbus0
thunder_mdio0: <Cavium ThunderX SMI/MDIO driver> on mdionexus0
thunder_mdio1: <Cavium ThunderX SMI/MDIO driver> on mdionexus0
pci0: <PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pcib0: pci_host_generic_core_alloc_resource FAIL: type=3, rid=32, start=0000000000000000, end=00000000000fffff, count=0000000000100000, flags=0
pcib1: failed to allocate initial memory window: 0-0xfffff
pci1: <PCI bus> on pcib1
pci1: <serial bus> at device 0.11 (no driver attached)
pci1: <memory> at device 0.12 (no driver attached)
pci1: <memory> at device 0.48 (no driver attached)
pci1: <memory> at device 0.49 (no driver attached)
pci1: <memory> at device 0.50 (no driver attached)
pci1: <memory> at device 0.51 (no driver attached)
pci1: <memory> at device 0.52 (no driver attached)
pci1: <memory> at device 0.53 (no driver attached)
pci1: <memory> at device 0.54 (no driver attached)
pci1: <memory> at device 0.55 (no driver attached)
pci1: <memory> at device 0.56 (no driver attached)
pci1: <memory> at device 0.57 (no driver attached)
pci1: <memory> at device 0.58 (no driver attached)
pci1: <memory> at device 0.59 (no driver attached)
pci1: <memory> at device 0.60 (no driver attached)
pci1: <memory> at device 0.61 (no driver attached)
pci1: <memory> at device 0.62 (no driver attached)
pci1: <memory> at device 0.63 (no driver attached)
pci1: <serial bus> at device 0.72 (no driver attached)
pci1: <serial bus> at device 0.74 (no driver attached)
pci1: <serial bus> at device 0.75 (no driver attached)
pci1: <serial bus> at device 0.76 (no driver attached)
pci1: <serial bus> at device 0.77 (no driver attached)
pci1: <memory> at device 0.80 (no driver attached)
pci1: <memory> at device 0.81 (no driver attached)
pci1: <memory> at device 0.82 (no driver attached)
pci1: <memory> at device 0.83 (no driver attached)
bgx0: <ThunderX BGX Ethernet I/O Interface> mem 0x87e0e0000000-0x87e0e03fffff,0x87e0e0400000-0x87e0e07fffff at device 0.128 on pci1
pci0: <unknown> at device 9.0 (no driver attached)
xhci0: <Cavium ThunderX USB 3.0 controller> mem 0x868000000000-0x8680001fffff,0x868000200000-0x8680002fffff at device 16.0 on pci0
xhci0: 64 bytes context size, 64-bit DMA
usbus0 on xhci0
xhci1: <Cavium ThunderX USB 3.0 controller> mem 0x869000000000-0x8690001fffff,0x869000200000-0x8690002fffff at device 17.0 on pci0
xhci1: 64 bytes context size, 64-bit DMA
usbus1 on xhci1
pcib2: <PCI-PCI bridge> at device 20.0 on pci0
pcib0: pci_host_generic_core_alloc_resource FAIL: type=3, rid=32, start=0000000000000000, end=00000000000fffff, count=0000000000100000, flags=0
pcib2: failed to allocate initial memory window: 0-0xfffff
pci2: <PCI bus> on pcib2
pci2: <mass storage, RAID> at device 0.0 (no driver attached)
pcib3: <PCI-PCI bridge> at device 21.0 on pci0
pcib0: pci_host_generic_core_alloc_resource FAIL: type=3, rid=32, start=0000000000000000, end=00000000000fffff, count=0000000000100000, flags=0
pcib3: failed to allocate initial memory window: 0-0xfffff
pci3: <PCI bus> on pcib3
pci3: <unknown> at device 0.0 (no driver attached)
pcib4: <PCI-PCI bridge> at device 22.0 on pci0
pcib0: pci_host_generic_core_alloc_resource FAIL: type=3, rid=32, start=0000000000000000, end=00000000000fffff, count=0000000000100000, flags=0
pcib4: failed to allocate initial memory window: 0-0xfffff
pci4: <PCI bus> on pcib4
pci4: <unknown> at device 0.0 (no driver attached)
pcib5: <Cavium Integrated PCI/PCI-E Controller> mem 0x849000000000-0x849001ffffff on simplebus0
pcib5: ThunderX quirk, setting ECAM to 1
pci5: <PCI bus> on pcib5
ahci0: <ThunderX AHCI SATA controller> mem 0x814000000000-0x8140001fffff,0x814000200000-0x8140002fffff at device 8.0 on pci5
ahci0: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with FBS
ahci0: quirks=0x30000<ABAR0,1MSI>
ahcich0: <AHCI channel> at channel 0 on ahci0
ahci1: <ThunderX AHCI SATA controller> mem 0x815000000000-0x8150001fffff,0x815000200000-0x8150002fffff at device 9.0 on pci5
ahci1: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with FBS
ahci1: quirks=0x30000<ABAR0,1MSI>
ahcich1: <AHCI channel> at channel 0 on ahci1
ahci2: <ThunderX AHCI SATA controller> mem 0x816000000000-0x8160001fffff,0x816000200000-0x8160002fffff at device 10.0 on pci5
ahci2: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with FBS
ahci2: quirks=0x30000<ABAR0,1MSI>
ahcich2: <AHCI channel> at channel 0 on ahci2
ahci3: <ThunderX AHCI SATA controller> mem 0x817000000000-0x8170001fffff,0x817000200000-0x8170002fffff at device 11.0 on pci5
ahci3: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with FBS
ahci3: quirks=0x30000<ABAR0,1MSI>
ahcich3: <AHCI channel> at channel 0 on ahci3
pcib6: <Cavium Integrated PCI/PCI-E Controller> mem 0x84a000000000-0x84a001ffffff on simplebus0
pcib6: ThunderX quirk, setting ECAM to 2
pci6: <PCI bus> on pcib6
pcib7: <PCI-PCI bridge> at device 2.0 on pci6
pcib6: pci_host_generic_core_alloc_resource FAIL: type=3, rid=32, start=0000000000000000, end=00000000000fffff, count=0000000000100000, flags=0
pcib7: failed to allocate initial memory window: 0-0xfffff
pci7: <PCI bus> on pcib7
vnicpf0: <Cavium Thunder NIC Physical Function Driver> mem 0x843000000000-0x84303fffffff,0x843060000000-0x8430600fffff at device 0.0 on pci7
pci6: <network> at device 3.0 (no driver attached)
pcib8: <Cavium Integrated PCI/PCI-E Controller> mem 0x84b000000000-0x84b001ffffff on simplebus0
pcib8: ThunderX quirk, setting ECAM to 3
pci8: <PCI bus> on pcib8
ahci4: <ThunderX AHCI SATA controller> mem 0x818000000000-0x8180001fffff,0x818000200000-0x8180002fffff at device 4.0 on pci8
ahci4: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with FBS
ahci4: quirks=0x30000<ABAR0,1MSI>
ahcich4: <AHCI channel> at channel 0 on ahci4
ahci5: <ThunderX AHCI SATA controller> mem 0x819000000000-0x8190001fffff,0x819000200000-0x8190002fffff at device 5.0 on pci8
ahci5: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with FBS
ahci5: quirks=0x30000<ABAR0,1MSI>
ahcich5: <AHCI channel> at channel 0 on ahci5
ahci6: <ThunderX AHCI SATA controller> mem 0x81a000000000-0x81a0001fffff,0x81a000200000-0x81a0002fffff at device 6.0 on pci8
ahci6: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with FBS
ahci6: quirks=0x30000<ABAR0,1MSI>
ahcich6: <AHCI channel> at channel 0 on ahci6
ahci7: <ThunderX AHCI SATA controller> mem 0x81b000000000-0x81b0001fffff,0x81b000200000-0x81b0002fffff at device 7.0 on pci8
ahci7: AHCI v1.30 with 1 6Gbps ports, Port Multiplier supported with FBS
ahci7: quirks=0x30000<ABAR0,1MSI>
ahcich7: <AHCI channel> at channel 0 on ahci7
pcib9: <ThunderX PEM> mem 0x88001f000000-0x880057ffffff,0x87e0c0000000-0x87e0c0ffffff on simplebus0
pci9: <PCI bus> on pcib9
pcib10: <PCI-PCI bridge> at device 0.0 on pci9
pci10: <PCI bus> on pcib10
vgapci0: <VGA-compatible display> mem 0x10000000-0x10ffffff,0x11000000-0x1101ffff at device 0.0 on pci10
pcib11: <Cavium Integrated PCI/PCI-E Controller> mem 0x848000000000-0x848001ffffff on simplebus1
pcib11: ThunderX quirk, setting ECAM to 0
mrmlbus1: <Cavium ThunderX MRML bridge> on pcib11
mdionexus1: <Cavium ThunderX MDIO nexus> on mrmlbus1
thunder_mdio2: <Cavium ThunderX SMI/MDIO driver> on mdionexus1
thunder_mdio3: <Cavium ThunderX SMI/MDIO driver> on mdionexus1
pci11: <PCI bus> on pcib11
pci11: failed to allocate bus number
device_attach: pci11 attach returned 6
pcib12: <Cavium Integrated PCI/PCI-E Controller> mem 0x849000000000-0x849001ffffff on simplebus1
pcib12: ThunderX quirk, setting ECAM to 1
pci12: <PCI bus> on pcib12
pci12: failed to allocate bus number
device_attach: pci12 attach returned 6
pcib13: <Cavium Integrated PCI/PCI-E Controller> mem 0x84a000000000-0x84a001ffffff on simplebus1
pcib13: ThunderX quirk, setting ECAM to 2
pci13: <PCI bus> on pcib13
pci13: failed to allocate bus number
device_attach: pci13 attach returned 6
pcib14: <Cavium Integrated PCI/PCI-E Controller> mem 0x84b000000000-0x84b001ffffff on simplebus1
pcib14: ThunderX quirk, setting ECAM to 3
pci14: <PCI bus> on pcib14
pci14: failed to allocate bus number
device_attach: pci14 attach returned 6
cryptosoft0: <software crypto>
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 5.0Gbps Super Speed USB v3.0
ugen0.1: <0x177d XHCI root HUB> at usbus0
uhub0: <0x177d XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen1.1: <0x177d XHCI root HUB> at usbus1
uhub1: <0x177d XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <INTEL SSDSCKHB340G4 G2010150> ACS-2 ATA SATA 3.x device
ada0: Serial Number BTWM6095091L340C
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 324322MB (664212528 512 byte sectors)
Release APs...done
arc4random: no preloaded entropy cache
Trying to mount root from zfs:zroot/ROOT/default []...
CPU 0: Cavium ThunderX r1p1 affinity: 0 0 0
Instruction Set Attributes 0 = <CRC32,SHA2,SHA1,AES+PMULL>
Instruction Set Attributes 1 = <>
Processor Features 0 = <GIC,AdvSIMD,Float,EL3,EL2,EL1,EL0>
Root mount waiting for: Processor Features 1 = <0>
Memory Model Features 0 = <4k Granule,64k Granule,16k Granule,S/NS Mem,MixedEndian,16bit ASID,256TB PA>
usbus1 usbus0
Memory Model Features 1 = <16 VMID bits>
Memory Model Features 2 = <32b CCIDX,48b VA>
Debug Features 0 = <6 CTX Breakpoints,4 Watchpoints,6 Breakpoints,PMUv3,Debug v8>
Debug Features 1 = <0>
Auxiliary Features 0 = <0>
Auxiliary Features 1 = <0>
CPU 1: Cavium ThunderX r1p1 affinity: 0 0 1
CPU 2: Cavium ThunderX r1p1 affinity: 0 0 2
CPU 3: Cavium ThunderX r1p1 affinity: 0 0 3
CPU 4: Cavium ThunderX r1p1 affinity: 0 0 4
CPU 5: Cavium ThunderX r1p1 affinity: 0 0 5
CPU 6: Cavium ThunderX r1p1 affinity: 0 0 6
CPU 7: Cavium ThunderX r1p1 affinity: 0 0 7
CPU 8: Cavium ThunderX r1p1 affinity: 0 0 8
CPU 9: Cavium ThunderX r1p1 affinity: 0 0 9
CPU 10: Cavium ThunderX r1p1 affinity: 0 0 10
CPU 11: Cavium ThunderX r1p1 affinity: 0 0 11
CPU 12: Cavium ThunderX r1p1 affinity: 0 0 12
CPU 13: Cavium ThunderX r1p1 affinity: 0 0 13
CPU 14: Cavium ThunderX r1p1 affinity: 0 0 14
CPU 15: Cavium ThunderX r1p1 affinity: 0 0 15
CPU 16: Cavium ThunderX r1p1 affinity: 0 1 0
CPU 17: Cavium ThunderX r1p1 affinity: 0 1 1
CPU 18: Cavium ThunderX r1p1 affinity: 0 1 2
CPU 19: Cavium ThunderX r1p1 affinity: 0 1 3
CPU 20: Cavium ThunderX r1p1 affinity: 0 1 4
CPU 21: Cavium ThunderX r1p1 affinity: 0 1 5
CPU 22: Cavium ThunderX r1p1 affinity: 0 1 6
CPU 23: Cavium ThunderX r1p1 affinity: 0 1 7
CPU 24: Cavium ThunderX r1p1 affinity: 0 1 8
CPU 25: Cavium ThunderX r1p1 affinity: 0 1 9
CPU 26: Cavium ThunderX r1p1 affinity: 0 1 10
CPU 27: Cavium ThunderX r1p1 affinity: 0 1 11
CPU 28: Cavium ThunderX r1p1 affinity: 0 1 12
CPU 29: Cavium ThunderX r1p1 affinity: 0 1 13
CPU 30: Cavium ThunderX r1p1 affinity: 0 1 14
CPU 31: Cavium ThunderX r1p1 affinity: 0 1 15
CPU 32: Cavium ThunderX r1p1 affinity: 0 2 0
CPU 33: Cavium ThunderX r1p1 affinity: 0 2 1
CPU 34: Cavium ThunderX r1p1 affinity: 0 2 2
CPU 35: Cavium ThunderX r1p1 affinity: 0 2 3
CPU 36: Cavium ThunderX r1p1 affinity: 0 2 4
CPU 37: Cavium ThunderX r1p1 affinity: 0 2 5
CPU 38: Cavium ThunderX r1p1 affinity: 0 2 6
CPU 39: Cavium ThunderX r1p1 affinity: 0 2 7
CPU 40: Cavium ThunderX r1p1 affinity: 0 2 8
CPU 41: Cavium ThunderX r1p1 affinity: 0 2 9
CPU 42: Cavium ThunderX r1p1 affinity: 0 2 10
CPU 43: Cavium ThunderX r1p1 affinity: 0 2 11
CPU 44: Cavium ThunderX r1p1 affinity: 0 2 12
CPU 45: Cavium ThunderX r1p1 affinity: 0 2 13
CPU 46: Cavium ThunderX r1p1 affinity: 0 2 14
CPU 47: Cavium ThunderX r1p1 affinity: 0 2 15
CPU 48: Cavium ThunderX r1p1 affinity: 1 0 0
CPU 49: Cavium ThunderX r1p1 affinity: 1 0 1
CPU 50: Cavium ThunderX r1p1 affinity: 1 0 2
CPU 51: Cavium ThunderX r1p1 affinity: 1 0 3
CPU 52: Cavium ThunderX r1p1 affinity: 1 0 4
CPU 53: Cavium ThunderX r1p1 affinity: 1 0 5
CPU 54: Cavium ThunderX r1p1 affinity: 1 0 6
CPU 55: Cavium ThunderX r1p1 affinity: 1 0 7
CPU 56: Cavium ThunderX r1p1 affinity: 1 0 8
CPU 57: Cavium ThunderX r1p1 affinity: 1 0 9
CPU 58: Cavium ThunderX r1p1 affinity: 1 0 10
CPU 59: Cavium ThunderX r1p1 affinity: 1 0 11
CPU 60: Cavium ThunderX r1p1 affinity: 1 0 12
CPU 61: Cavium ThunderX r1p1 affinity: 1 0 13
CPU 62: Cavium ThunderX r1p1 affinity: 1 0 14
CPU 63: Cavium ThunderX r1p1 affinity: 1 0 15
CPU 64: Cavium ThunderX r1p1 affinity: 1 1 0
CPU 65: Cavium ThunderX r1p1 affinity: 1 1 1
CPU 66: Cavium ThunderX r1p1 affinity: 1 1 2
CPU 67: Cavium ThunderX r1p1 affinity: 1 1 3
CPU 68: Cavium ThunderX r1p1 affinity: 1 1 4
CPU 69: Cavium ThunderX r1p1 affinity: 1 1 5
CPU 70: Cavium ThunderX r1p1 affinity: 1 1 6
CPU 71: Cavium ThunderX r1p1 affinity: 1 1 7
CPU 72: Cavium ThunderX r1p1 affinity: 1 1 8
CPU 73: Cavium ThunderX r1p1 affinity: 1 1 9
CPU 74: Cavium ThunderX r1p1 affinity: 1 1 10
CPU 75: Cavium ThunderX r1p1 affinity: 1 1 11
CPU 76: Cavium ThunderX r1p1 affinity: 1 1 12
CPU 77: Cavium ThunderX r1p1 affinity: 1 1 13
CPU 78: Cavium ThunderX r1p1 affinity: 1 1 14
CPU 79: Cavium ThunderX r1p1 affinity: 1 1 15
CPU 80: Cavium ThunderX r1p1 affinity: 1 2 0
CPU 81: Cavium ThunderX r1p1 affinity: 1 2 1
CPU 82: Cavium ThunderX r1p1 affinity: 1 2 2
CPU 83: Cavium ThunderX r1p1 affinity: 1 2 3
CPU 84: Cavium ThunderX r1p1 affinity: 1 2 4
CPU 85: Cavium ThunderX r1p1 affinity: 1 2 5
CPU 86: Cavium ThunderX r1p1 affinity: 1 2 6
CPU 87: Cavium ThunderX r1p1 affinity: 1 2 7
CPU 88: Cavium ThunderX r1p1 affinity: 1 2 8
CPU 89: Cavium ThunderX r1p1 affinity: 1 2 9
CPU 90: Cavium ThunderX r1p1 affinity: 1 2 10
CPU 91: Cavium ThunderX r1p1 affinity: 1 2 11
CPU 92: Cavium ThunderX r1p1 affinity: 1 2 12
CPU 93: Cavium ThunderX r1p1 affinity: 1 2 13
CPU 94: Cavium ThunderX r1p1 affinity: 1 2 14
CPU 95: Cavium ThunderX r1p1 affinity: 1 2 15
uhub1: 2 ports with 2 removable, self powered
uhub0: 2 ports with 2 removable, self powered
random: unblocking device.
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
lo0: link state changed to UP
root@a01:~ # ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=800000<>
ether 00:00:00:00:00:00
inet6 2604:1380:2000:a900::5 prefixlen 127
inet6 fe80::d2:a735:511a:71b0%lagg0 prefixlen 64 scopeid 0x2
inet 147.75.83.194 netmask 0xfffffffc broadcast 147.75.83.195
inet 10.80.69.133 netmask 0xfffffffe broadcast 255.255.255.255
laggproto lacp lagghash l2,l3,l4
groups: lagg
media: Ethernet autoselect
status: no carrier
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
root@a01:~ # kldstat
Id Refs Address Size Name
1 14 0xffff000000000000 1455258 kernel
3 2 0xffff0000014bb000 48140 opensolaris.ko
4 1 0xffff000001504000 2c4d38 zfs.ko
5 1 0xffff0000017c9000 42cc0 tmpfs.ko
6 1 0xffff000173000000 41000 if_lagg.ko
#!/bin/sh -eux
# usage:
# ssh -p 22 root@target curl -sLo /tmp/depenguinator.sh https://git.io/JeQM5
# ssh -p 22 root@target chmod +x /tmp/depenguinator.sh
# ssh -p 22 root@target /tmp/depenguinator.sh
### depenguinator pick your poison
#SITE=https://download.freebsd.org/ftp
SITE=https://koan-ci.com
VENDOR=$(lscpu --json | jq -r '.lscpu[] | select(.field == "Vendor ID:") | .data')
case "$VENDOR" in
APM) ### ampere
echo Ampere
BASE=${SITE}/snapshots/arm64/aarch64/13.0-CURRENT ;;
CAVIUM) ### cavium thunderX
echo ThunderX
BASE=${SITE}/releases/arm64/aarch64/12.1-RELEASE ;;
esac
### update the ubuntu bits
export DEBIAN_FRONTEND=noninteractive
apt update -yq
## apt upgrade -yq
apt install -yq zfsutils-linux
### give us back the swap partition and convert type to zfs
swapoff --all
sed -i '/swap/d' /etc/fstab
### man https://rodsbooks.com/gdisk/sgdisk.html
zpool destroy zroot || true
sgdisk -t 2:a504 /dev/sda
sgdisk -t 2:516e7cba-6ecf-11d6-8ff8-00022d09712b /dev/sda
sgdisk -c 2:zfs /dev/sda
time dd if=/dev/zero of=/dev/sda2 bs=1024 conv=sync || true
sgdisk -z /dev/sda2
kpartx /dev/sda
sgdisk -i 2 /dev/sda
# Partition GUID code: 516E7CBA-6ECF-11D6-8FF8-00022D09712B (FreeBSD ZFS)
# Partition unique GUID: 9216D1FD-8855-46F5-B336-C565C9BA4267
# First sector: 1026048 (at 501.0 MiB)
# Last sector: 10403077 (at 5.0 GiB)
# Partition size: 9377030 sectors (4.5 GiB)
# Attribute flags: 0000000000000000
# Partition name: 'zfs'
### download bits from a geo-DNS appropriate server
cd /var/tmp
echo nameserver 9.9.9.9 | tee /etc/resolv.conf
for f in base base-dbg kernel kernel-dbg; do
test -f ${f}.txz || curl -#LO ${BASE}/${f}.txz
echo fetched ${BASE}/${f}.txz
done
### make a compatible zpool with all the good things
# -o autoexpand=on \
# -o delegation=on \
# -o failmode=continue \
# -o feature@multi_vdev_crash_dump=enabled \
# -o feature@sha512=enabled \
# -o feature@skein=enabled \
# -o feature@spacemap_histogram=enabled \
# -o feature@async_destroy=enabled \
# -o feature@bookmarks=enabled \
# -o feature@embedded_data=enabled \
# -o feature@empty_bpobj=enabled \
# -o feature@enabled_txg=enabled \
# -o feature@extensible_dataset=enabled \
# -o feature@filesystem_limits=enabled \
# -o feature@hole_birth=enabled \
# -o feature@large_blocks=enabled \
# -o feature@large_dnode=enabled \
zpool create -d \
-o ashift=12 \
-o feature@lz4_compress=enabled \
-O checksum=sha256 \
-O compression=lz4 \
-O atime=off \
-R /mnt \
zroot /dev/disk/by-partlabel/zfs
zpool get all zroot
### create a FreeBSD-friendly zfs layout
zfs create -o canmount=off zroot/ROOT
zfs create -o canmount=noauto -o mountpoint=/ zroot/ROOT/default
zfs set canmount=off mountpoint=none zroot
zpool set bootfs=zroot/ROOT/default zroot
zpool export zroot
zpool import -R /mnt zroot
# it wont mount itself and then stuff ends up in the wrong places
zfs mount zroot/ROOT/default
zfs create -o canmount=off -o mountpoint=/usr zroot/usr
zfs create -o setuid=off zroot/usr/home
zfs create -o setuid=off zroot/usr/ports
zfs create -o setuid=off zroot/usr/src
zfs create -o canmount=off -o mountpoint=/var zroot/var
zfs create -o setuid=off -o exec=off zroot/var/audit
zfs create -o setuid=off -o exec=off zroot/var/crash
zfs create -o setuid=off -o exec=off zroot/var/log
zfs create -o setuid=off -o exec=off -o atime=on zroot/var/mail
zfs create -o setuid=off -o exec=off zroot/var/tmp
# readonly=off toggle later otherwise untar of base.txz fails
zfs create -o setuid=off -o exec=off zroot/var/empty
ln -s /usr/home /mnt/home
zfs list -o canmount,mounted,mountpoint,name,referenced
### daemonise
### linux tar isn't perfect *but* it is good enough
### tar: Ignoring unknown extended header keyword 'SCHILY.fflags'
for f in base base-dbg kernel kernel-dbg; do
tar xJ -C /mnt -f /var/tmp/${f}.txz
done
zfs set readonly=on zroot/var/empty
zfs snapshot -r zroot@unpacked
### these bits live outside zfs
cp /mnt/boot/loader.efi /boot/efi/EFI/BOOT/BOOTAA64.EFI
### ensure we can get in remotely afterwards
tee /mnt/etc/resolv.conf <<- DNS
nameserver 9.9.9.9
DNS
tee -a /mnt/etc/ssh/sshd_config <<- SSHD
PermitRootLogin without-password
UseDNS no
UsePAM no
Port 22
Port 2200
ChallengeResponseAuthentication no
SSHD
mkdir -m 0700 /mnt/root/.ssh
tee /mnt/root/.ssh/authorized_keys <<- KEYS
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxKqF4cbpw79SXH6Tvzn+oZuz4W2CiYZli4n9g+B8nm dch@skunkwerks.at 20170905
KEYS
### misc fstab
# mkdir /mnt/dev/fd /mnt/efi
echo tmpfs /tmp tmpfs rw,mode=01777,size=120g 0 0 > /mnt/etc/fstab
# Device Mountpoint FStype Options Dump Pass#
#/dev/gpt/swap none swap sw 0 0
#/dev/gpt/BIOS /efi msdosfs rw,late 0 0
#tmpfs /tmp tmpfs rw,mode=01777,size=12g 0 0
#proc /proc procfs rw 0 0
#fdescfs /dev/fd fdescfs rw 0 0' > /mnt/etc/fstab
#
## linux64
#linprocfs /compat/linux/proc linprocfs rw 0 0
#linsysfs /compat/linux/sys linsysfs rw 0 0
#tmpfs /compat/linux/dev/shm tmpfs rw,mode=1777 0 0
tee -a /mnt/boot/loader.conf <<- LOADER
autoboot_delay="30"
beastie_disable="YES"
boot_multicons="YES"
boot_serial="YES"
console="efi"
zfs_load="YES"
opensolaris_load="YES"
mlx5_load="YES"
mlx5en_load="YES"
mlxfw_load="YES"
linuxkpi_load="YES"
xz_load="YES"
tmpfs_load="YES"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
LOADER
# extract IP info for later
ip -j addr | jq -r '.[] | select(.ifname == "bond0") | .addr_info[]' \
> /tmp/addr.json
IP=$(jq -r 'select(.label == "bond0") | .local' /tmp/addr.json)
IP6=$(jq -r 'select(.prefixlen == 127) | .local' /tmp/addr.json)
ROUTE=$(ip -f inet route | grep -Po '(?<=default via )([0-9.]+)')
ROUTE6=$(ip -f inet6 route | grep -Po '(?<=default via )([0-9.:a-f]+)')
tee -a /mnt/etc/rc.conf <<- RCCONF
hostname="a01"
cloned_interfaces="lagg0"
ifconfig_lagg0_alias0="inet ${IP}/30"
# ifconfig_lagg0_alias1="inet PRIVATE/31"
ifconfig_lagg0_ipv6="inet6 ${IP6}/127"
defaultrouter="${ROUTE}"
ipv6_defaultrouter="${ROUTE6}"
# static_routes="private"
# route_private="-net 10.0.0.0/8 ROUTEPRIVATE"
sshd_enable="YES"
sendmail_enable="NONE"
inetd_enable="NO"
growfs_enable="YES"
cloudinit_enable="YES"
zfs_enable="YES"
RCCONF
case "$VENDOR" in
APM) ### ampere
tee -a /mnt/etc/rc.conf <<- AMPERE
ifconfig_mce0="up"
ifconfig_mce1="up"
ifconfig_lagg0="laggproto lacp laggport mce0 laggport mce1"
AMPERE
;;
CAVIUM) ### cavium thunderX
tee -a /mnt/etc/rc.conf <<- CAVIUM
ifconfig_vnic0="up"
ifconfig_vnic1="up"
ifconfig_lagg0="laggproto lacp laggport vnic0 laggport vnic1"
iovctl_files="/etc/iov/vnicpf0.conf"
CAVIUM
;;
esac
## enable latest pkg repo
mkdir -p /mnt/usr/local/etc/pkg/repos/
tee /mnt/usr/local/etc/pkg/repos/FreeBSD.conf <<- REPO
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
REPO
## install firstboot_pkgs script
mkdir -p /mnt/usr/local/etc/rc.d
curl -#L https://git.io/Je7Z4 -o /mnt/usr/local/etc/rc.d/firstboot_pkgs
chmod +x /mnt/usr/local/etc/rc.d/firstboot_pkgs
## enable firstboot setup
tee /mnt/etc/rc.conf.d/firstboot_pkgs <<- PKGS
firstboot_pkgs_enable=YES
firstboot_pkgs_list="net/mosh ftp/curl sysutils/tmux net/rsync \
lang/erlang-runtime22 devel/git sysutils/fd textproc/ripgrep htop \
spidermonkey60 devel/elixir-hex net/rabbiteer net/haproxy21 \
devel/git devel/rebar3 sysutils/htop sysutils/ec2-scripts \
textproc/libucl security/sudo devel/ccache devel/llvm10 \
devel/cmake editors/neovim"
PKGS
## enable sudo
mkdir -p /mnt/usr/local/etc/sudoers.d
tee /mnt/usr/local/etc//sudoers.d/wheel <<- SUDOERS
%wheel ALL=(ALL) NOPASSWD: ALL
SUDOERS
zfs snapshot -r zroot@tweaked
zpool set autoexpand=on zroot
tee /mnt/etc/rc.conf.d/growfs <<- GROWZFS
growfs_enable=YES
GROWZFS
############# clean up ##################
sync
zpool get all
zfs list -o canmount,mounted,mountpoint,name,referenced
sleep 10
zpool export zroot
sgdisk -A 3:clear:2 -d 3 /dev/sda
reboot
#!/bin/sh
# $FreeBSD: head/sysutils/firstboot-pkgs/files/firstboot_pkgs.in 432859 2017-01-30 17:48:06Z brd $
# KEYWORD: firstboot
# PROVIDE: firstboot_pkgs
# REQUIRE: NETWORKING
# BEFORE: LOGIN
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf (in the disk
# image, since this only runs on the first boot) to enable this:
#
# firstboot_pkgs_enable="YES"
#
# and place a list of packages in firstboot_pkgs_list, e.g.,
#
# firstboot_pkgs_list="apache22 php5 mysql56-server"
. /etc/rc.subr
: ${firstboot_pkgs_enable:="NO"}
name="firstboot_pkgs"
rcvar=firstboot_pkgs_enable
start_cmd="firstboot_pkgs_run"
stop_cmd=":"
firstboot_pkgs_run()
{
# Count rc.d scripts
nscriptso=`ls /usr/local/etc/rc.d | wc -l`
# Bootstrap if necessary
if ! pkg -N 2>/dev/null; then
env ASSUME_ALWAYS_YES=YES pkg bootstrap |
cat
fi
# Install requested packages, if any
for package in ${firstboot_pkgs_list}; do
env ASSUME_ALWAYS_YES=YES pkg install ${package} </dev/null |
cat
done
# Count rc.d scripts again
nscriptsn=`ls /usr/local/etc/rc.d | wc -l`
# If we have more scripts, request a reboot
if [ $nscriptsn -ne $nscriptso ]; then
echo "Requesting reboot after installing packages with rc.d scripts."
touch ${firstboot_sentinel}-reboot
fi
}
load_rc_config $name
run_rc_command "$1"
[{
"ifindex": 1,
"ifname": "lo",
"flags": ["LOOPBACK","UP","LOWER_UP"],
"mtu": 65536,
"qdisc": "noqueue",
"operstate": "UNKNOWN",
"group": "default",
"txqlen": 1000,
"link_type": "loopback",
"address": "00:00:00:00:00:00",
"broadcast": "00:00:00:00:00:00",
"addr_info": [{
"family": "inet",
"local": "127.0.0.1",
"prefixlen": 8,
"scope": "host",
"label": "lo",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},{
"family": "inet6",
"local": "::1",
"prefixlen": 128,
"scope": "host",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}]
},{
"ifindex": 2,
"ifname": "enP2p1s0",
"flags": ["BROADCAST","MULTICAST"],
"mtu": 1500,
"qdisc": "noop",
"operstate": "DOWN",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "00:1b:21:e0:6a:9d",
"broadcast": "ff:ff:ff:ff:ff:ff",
"addr_info": []
},{
"ifindex": 3,
"ifname": "enp1s0f0",
"flags": ["BROADCAST","MULTICAST","SLAVE","UP","LOWER_UP"],
"mtu": 1500,
"qdisc": "mq",
"master": "bond0",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "98:03:9b:bd:e3:f4",
"broadcast": "ff:ff:ff:ff:ff:ff",
"addr_info": []
},{
"ifindex": 4,
"ifname": "enp1s0f1",
"flags": ["BROADCAST","MULTICAST","SLAVE","UP","LOWER_UP"],
"mtu": 1500,
"qdisc": "mq",
"master": "bond0",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "98:03:9b:bd:e3:f4",
"broadcast": "ff:ff:ff:ff:ff:ff",
"addr_info": []
},{
"ifindex": 5,
"ifname": "bond0",
"flags": ["BROADCAST","MULTICAST","MASTER","UP","LOWER_UP"],
"mtu": 1500,
"qdisc": "noqueue",
"operstate": "UP",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "98:03:9b:bd:e3:f4",
"broadcast": "ff:ff:ff:ff:ff:ff",
"addr_info": [{
"family": "inet",
"local": "147.75.84.78",
"prefixlen": 30,
"broadcast": "147.75.84.79",
"scope": "global",
"label": "bond0",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},{
"family": "inet",
"local": "10.80.69.131",
"prefixlen": 31,
"broadcast": "255.255.255.255",
"scope": "global",
"label": "bond0:0",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},{
"family": "inet6",
"local": "2604:1380:2000:a900::3",
"prefixlen": 127,
"scope": "global",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
},{
"family": "inet6",
"local": "fe80::9a03:9bff:febd:e3f4",
"prefixlen": 64,
"scope": "link",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment