OS-6604: uefi-edk2 needs to support extended write for bhyve

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-02-27T14:15:36.009Z)

Fix Versions

2018-03-01 Midgar (Release Date: 2018-03-01)

Related Issues

Related Links

Description

I'm not sure yet if this is a bhyve problem or a problem with the image, but using image 38396fc7-2472-416b-e61b-d833b32bd088 from @mike.gerdts on a bhyve VM with disk configuration:

[root@headnode (coal) ~]# vmadm get 91ef6206-d095-e0ca-ecbf-bdd3af5699f7 | json disks
[
  {
    "path": "/dev/zvol/rdsk/zones/91ef6206-d095-e0ca-ecbf-bdd3af5699f7-disk0",
    "boot": false,
    "model": "virtio",
    "media": "disk",
    "image_size": 10240,
    "image_uuid": "38396fc7-2472-416b-e61b-d833b32bd088",
    "zfs_filesystem": "zones/91ef6206-d095-e0ca-ecbf-bdd3af5699f7-disk0",
    "zpool": "zones",
    "size": 10240,
    "compression": "off",
    "refreservation": 10240,
    "block_size": 4096
  },
  {
    "path": "/dev/zvol/rdsk/zones/91ef6206-d095-e0ca-ecbf-bdd3af5699f7-disk1",
    "boot": false,
    "model": "virtio",
    "media": "disk",
    "zfs_filesystem": "zones/91ef6206-d095-e0ca-ecbf-bdd3af5699f7-disk1",
    "zpool": "zones",
    "size": 1024,
    "compression": "off",
    "refreservation": 1024,
    "block_size": 8192
  }
]
[root@headnode (coal) ~]#

I booted and got:

[NOTICE: Zone booting up]

                     GNU GRUB  version 2.02~beta3-4ubuntu7

 +----------------------------------------------------------------------------+
 |*Ubuntu                                                                     |
 | Advanced options for Ubuntu                                                |
 | Ubuntu 17.10 (17.10) (on /dev/vda1)                                        |
 | Advanced options for Ubuntu 17.10 (17.10) (on /dev/vda1)                   |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 |                                                                            |
 +----------------------------------------------------------------------------+

      Use the ^ and v keys to select which entry is highlighted.
      Press enter to boot the selected OS, `e' to edit the commands
      before booting or `c' for a command-line.
   The highlighted entry will be executed automatically in 0s.
error: attempt to read or write outside of disk `hd0'.

Press any key to continue...

it did actually continue:

[    0.000000] random: get_random_bytes called from start_kernel+0x42/0x4e6 with crng_init=0
[    0.000000] Linux version 4.13.0-25-generic (buildd@lgw01-amd64-039) (gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3)) #29-Ubuntu SMP Mon Jan 8 21:14:41 UTC 2018 (Ubuntu 4.13.0-25.29-generic 4.13.13)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.13.0-25-generic root=UUID=e792c995-2eba-45bb-9f91-46d2af71fb10 ro console=tty0 console=ttyS0,115200n8 tsc=reliable earlyprintk
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] Disabled fast string operations
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[    0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003bfbdfff] usable
[    0.000000] BIOS-e820: [mem 0x000000003bfbe000-0x000000003bfddfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000003bfde000-0x000000003e4aefff] usable
[    0.000000] BIOS-e820: [mem 0x000000003e4af000-0x000000003f9a8fff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000003f9a9000-0x000000003f9aafff] usable
[    0.000000] BIOS-e820: [mem 0x000000003f9ab000-0x000000003fb7cfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000003fb7d000-0x000000003fb80fff] reserved
[    0.000000] BIOS-e820: [mem 0x000000003fb81000-0x000000003fb88fff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000003fb89000-0x000000003fb8cfff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x000000003fb8d000-0x000000003ffeffff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000003fff0000-0x000000003fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000080000000-0x00000000fbffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed003ff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000feefffff] reserved
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] random: fast init done
[    0.000000] SMBIOS 3.0 present.
[    0.000000] DMI:   SmartDC HVM, BIOS 1.00 03/14/2014
[    0.000000] tsc: Using PIT calibration value
[    0.000000] e820: last_pfn = 0x40000 max_arch_pfn = 0x400000000
[    0.000000] MTRR: Disabled
[    0.000000] x86/PAT: MTRRs disabled, skipping PAT initialization too.
[    0.000000] CPU MTRRs all blank - virtualized system.
[    0.000000] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] Using GB pages for direct mapping
[    0.000000] RAMDISK: [mem 0x35e45000-0x36f19fff]
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI: RSDP 0x00000000000FB9E0 000024 (v02 BHYVE )
[    0.000000] ACPI: XSDT 0x000000003FB870E8 00004C (v01 BHYVE  BVFACP   00000001      01000013)
[    0.000000] ACPI: FACP 0x000000003FB86000 0000F4 (v04 BHYVE  BVFACP   00000001 BHYV 00000001)
[    0.000000] ACPI: DSDT 0x000000003FB81000 0009A3 (v02 BHYVE  BVDSDT   00000001 INTL 20170303)
[    0.000000] ACPI: FACS 0x000000003FB8C000 000040
[    0.000000] ACPI: HPET 0x000000003FB85000 000038 (v01 BHYVE  BVHPET   00000001 BHYV 00000001)
[    0.000000] ACPI: APIC 0x000000003FB84000 00004A (v01 BHYVE  BVMADT   00000001 BHYV 00000001)
[    0.000000] ACPI: MCFG 0x000000003FB83000 00003C (v01 BHYVE  BVMCFG   00000001 BHYV 00000001)
[    0.000000] ACPI: SPCR 0x000000003FB82000 000050 (v01 BHYVE  BVSPCR   00000001 BHYV 00000001)
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] NODE_DATA(0) allocated [mem 0x3e484000-0x3e4aefff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x000000003fffffff]
[    0.000000]   Normal   empty
[    0.000000]   Device   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x000000003bfbdfff]
[    0.000000]   node   0: [mem 0x000000003bfde000-0x000000003e4aefff]
[    0.000000]   node   0: [mem 0x000000003f9a9000-0x000000003f9aafff]
[    0.000000]   node   0: [mem 0x000000003fff0000-0x000000003fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000003fffffff]
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0xa400 base: 0xfed00000
[    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000dffff]
[    0.000000] PM: Registered nosave memory: [mem 0x000e0000-0x000fffff]
[    0.000000] PM: Registered nosave memory: [mem 0x3bfbe000-0x3bfddfff]
[    0.000000] PM: Registered nosave memory: [mem 0x3e4af000-0x3f9a8fff]
[    0.000000] PM: Registered nosave memory: [mem 0x3f9ab000-0x3fb7cfff]
[    0.000000] PM: Registered nosave memory: [mem 0x3fb7d000-0x3fb80fff]
[    0.000000] PM: Registered nosave memory: [mem 0x3fb81000-0x3fb88fff]
[    0.000000] PM: Registered nosave memory: [mem 0x3fb89000-0x3fb8cfff]
[    0.000000] PM: Registered nosave memory: [mem 0x3fb8d000-0x3ffeffff]
[    0.000000] e820: [mem 0x40000000-0x7fffffff] available for PCI devices
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[    0.000000] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] percpu: Embedded 46 pages/cpu @ffff9efb7e000000 s149784 r8192 d30440 u2097152
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 250922
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.13.0-25-generic root=UUID=e792c995-2eba-45bb-9f91-46d2af71fb10 ro console=tty0 console=ttyS0,115200n8 tsc=reliable earlyprintk
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 960164K/1020156K available (12300K kernel code, 2481K rwdata, 3996K rodata, 2372K init, 2368K bss, 59992K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Kernel/User page tables isolation: enabled
[    0.000000] ftrace: allocating 37810 entries in 148 pages
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=1.
[    0.000000] 	Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 524544, nr_irqs: 256, preallocated irqs: 16
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] console [ttyS0] enabled
[    0.000000] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191126044627 ns
[    0.016000] tsc: Unable to calibrate against PIT
[    0.020000] tsc: HPET/PMTIMER calibration failed
[    0.020000] tsc: Marking TSC unstable due to could not calculate TSC khz
[    0.024000] Calibrating delay loop... 2404.35 BogoMIPS (lpj=4808704)
[    0.044000] pid_max: default: 32768 minimum: 301
[    0.048000] ACPI: Core revision 20170531
[    0.052000] ACPI: 1 ACPI AML tables successfully acquired and loaded
[    0.056000] Security Framework initialized
[    0.056000] Yama: becoming mindful.
[    0.060000] AppArmor: AppArmor initialized
[    0.064000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.068000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.072000] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.076000] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.080000] Disabled fast string operations
[    0.084000] CPU: Physical Processor ID: 0
[    0.100000] mce: CPU supports 0 MCE banks
[    0.104000] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8
[    0.108000] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4
[    0.128000] Freeing SMP alternatives memory: 36K
[    0.136000] smpboot: Max logical packages: 1
[    0.160000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.204000] APIC calibration not consistent with PM-Timer: 152ms instead of 100ms
[    0.204000] APIC delta adjusted to PM-Timer: 838256 (1279208)
[    0.208000] smpboot: CPU0: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz (family: 0x6, model: 0x9e, stepping: 0x9)
[    0.212000] Performance Events: unsupported p6 CPU model 158 no PMU driver, software events only.
[    0.220000] Hierarchical SRCU implementation.
[    0.224000] NMI watchdog: disabled (cpu0): hardware events not enabled
[    0.228000] NMI watchdog: Shutting down hard lockup detector on all cpus
[    0.232000] smp: Bringing up secondary CPUs ...
[    0.236000] smp: Brought up 1 node, 1 CPU
[    0.240000] smpboot: Total of 1 processors activated (2404.35 BogoMIPS)
[    0.244000] devtmpfs: initialized
[    0.248000] x86/mm: Memory block size: 128MB
[    0.252000] evm: security.selinux
[    0.256000] evm: security.SMACK64
[    0.260000] evm: security.SMACK64EXEC
[    0.264000] evm: security.SMACK64TRANSMUTE
[    0.268000] evm: security.SMACK64MMAP
[    0.272000] evm: security.ima
[    0.276000] evm: security.capability
[    0.280000] PM: Registering ACPI NVS region [mem 0x3fb89000-0x3fb8cfff] (16384 bytes)
[    0.284000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.288000] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.292000] pinctrl core: initialized pinctrl subsystem
[    0.296000] RTC time:  6:35:15, date: 02/11/18
[    0.300000] NET: Registered protocol family 16
[    0.304000] cpuidle: using governor ladder
[    0.308000] cpuidle: using governor menu
[    0.312000] PCCT header not found.
[    0.316000] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.320000] ACPI: bus type PCI registered
[    0.324000] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.328000] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0xe0000000-0xefffffff] (base 0xe0000000)
[    0.332000] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820
[    0.336000] PCI: Using configuration type 1 for base access
[    0.344000] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.344000] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.348000] ACPI: Added _OSI(Module Device)
[    0.352000] ACPI: Added _OSI(Processor Device)
[    0.356000] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.360000] ACPI: Added _OSI(Processor Aggregator Device)
[    0.368000] ACPI: Interpreter enabled
[    0.372000] ACPI: (supports S0 S5)
[    0.372000] ACPI: Using IOAPIC for interrupt routing
[    0.376000] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.380000] ACPI: PCI Root Bridge [PC00] (domain 0000 [bus 00-ff])
[    0.384000] acpi PNP0A03:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    0.384000] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[    0.388000] acpi PNP0A03:00: host bridge window expanded to [io  0x0000-0x0cf7]; [io  0x0000-0x0cf7 window] ignored
[    0.392000] PCI host bridge to bus 0000:00
[    0.392000] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    0.396000] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    0.400000] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.404000] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xdfffffff window]
[    0.408000] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xf07fffff window]
[    0.412000] pci_bus 0000:00: root bus resource [mem 0xd000000000-0xd0000fffff window]
[    0.416000] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.432000] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.436000] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.440000] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.444000] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.448000] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.452000] ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.456000] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.460000] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
[    0.480000] SCSI subsystem initialized
[    0.484000] vgaarb: loaded
[    0.492000] ACPI: bus type USB registered
[    0.496000] usbcore: registered new interface driver usbfs
[    0.500000] usbcore: registered new interface driver hub
[    0.504000] usbcore: registered new device driver usb
[    0.508000] EDAC MC: Ver: 3.0.0
[    0.516000] PCI: Using ACPI for IRQ routing
[    0.900000] NetLabel: Initializing
[    0.904000] NetLabel:  domain hash size = 128
[    0.908000] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.912000] NetLabel:  unlabeled traffic allowed by default
[    0.916000] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    0.924000] hpet0: 8 comparators, 32-bit 10.000000 MHz counter
[    0.936000] clocksource: Switched to clocksource hpet
[    1.060738] VFS: Disk quotas dquot_6.6.0
[    1.076627] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.090015] AppArmor: AppArmor Filesystem Enabled
[    1.102698] pnp: PnP ACPI init
[    1.107008] system 00:02: [io  0x0220-0x0223] has been reserved
[    1.115210] system 00:02: [io  0x0224-0x0227] has been reserved
[    1.128586] system 00:02: [io  0x04d0-0x04d1] has been reserved
[    1.135746] system 00:02: [io  0x0400-0x0407] has been reserved
[    1.212206] system 00:02: [mem 0xe0000000-0xefffffff] has been reserved
[    1.221228] pnp: PnP ACPI: found 6 devices
[    1.244219] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    1.269389] pci 0000:00:01.0: BAR 6: no space for [mem size 0x00000800 pref]
[    1.281174] pci 0000:00:01.0: BAR 6: failed to assign [mem size 0x00000800 pref]
[    1.295539] pci 0000:00:03.0: BAR 6: no space for [mem size 0x00000800 pref]
[    1.311445] pci 0000:00:03.0: BAR 6: failed to assign [mem size 0x00000800 pref]
[    1.319798] pci 0000:00:03.1: BAR 6: no space for [mem size 0x00000800 pref]
[    1.331613] pci 0000:00:03.1: BAR 6: failed to assign [mem size 0x00000800 pref]
[    1.340196] NET: Registered protocol family 2
[    1.351149] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    1.365507] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    1.373695] TCP: Hash tables configured (established 8192 bind 8192)
[    1.381483] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    1.518997] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    1.551397] NET: Registered protocol family 1
[    1.566335] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    1.575039] Unpacking initramfs...
[    3.004086] Freeing initrd memory: 17236K
[    3.161981] Scanning for low memory corruption every 60 seconds
[    3.171119] audit: initializing netlink subsys (disabled)
[    3.174712] Initialise system trusted keyrings
[    3.178072] audit: type=2000 audit(1518330911.174:1): state=initialized audit_enabled=0 res=1
[    3.186598] Key type blacklist registered
[    3.191490] workingset: timestamp_bits=36 max_order=18 bucket_order=0
[    3.201413] zbud: loaded
[    3.204549] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.209920] fuse init (API version 7.26)
[    3.216073] Key type asymmetric registered
[    3.216073] Asymmetric key parser 'x509' registered
[    3.221680] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[    3.414404] io scheduler noop registered
[    3.833365] io scheduler deadline registered
[    3.878491] io scheduler cfq registered (default)
[    3.888207] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[    3.906627] ACPI: Power Button [PWRF]
[    3.926229] GHES: HEST is not enabled!
[    4.015011] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver
[    4.096740] virtio-pci 0000:00:03.1: virtio_pci: leaving for legacy driver
[    4.152068] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[    4.408912] 00:03: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    4.474240] 00:04: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    4.520084] Linux agpgart interface v0.103
[    4.540154] loop: module loaded
[    4.550431] libphy: Fixed MDIO Bus: probed
[    4.557993] tun: Universal TUN/TAP device driver, 1.6
[    4.596068] PPP generic driver version 2.4.2
[    4.602003] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.616090] ehci-pci: EHCI PCI platform driver
[    4.623685] ehci-platform: EHCI generic platform driver
[    4.640185] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.648370] ohci-pci: OHCI PCI platform driver
[    4.673004] ohci-platform: OHCI generic platform driver
[    4.731579] uhci_hcd: USB Universal Host Controller Interface driver
[    4.751299] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f03:MOU] at 0x60,0x64 irq 1,12
[    4.773057] i8042: Warning: Keylock active
[    4.788279] serio: i8042 KBD port at 0x60,0x64 irq 1
[    4.798076] serio: i8042 AUX port at 0x60,0x64 irq 12
[    4.816630] mousedev: PS/2 mouse device common for all mice
[    4.841012] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[    4.861037] ACPI Error: Could not enable RealTimeClock event (20170531/evxfevnt-218)
[    5.024923] ACPI Warning: Could not enable fixed event - RealTimeClock (4) (20170531/evxface-654)
[    5.056225] rtc_cmos 00:05: rtc core: registered rtc_cmos as rtc0
[    5.074287] rtc_cmos 00:05: alarms up to one day, y3k, 114 bytes nvram
[    5.094031] i2c /dev entries driver
[    5.100359] device-mapper: uevent: version 1.0.3
[    5.109208] device-mapper: ioctl: 4.37.0-ioctl (2017-09-20) initialised: dm-devel@redhat.com
[    5.130157] ledtrig-cpu: registered to indicate activity on CPUs
[    5.141068] NET: Registered protocol family 10
[    5.164106] Segment Routing with IPv6
[    5.207455] NET: Registered protocol family 17
[    5.216500] Key type dns_resolver registered
[    5.476963] RAS: Correctable Errors collector initialized.
[    5.496083] registered taskstats version 1
[    5.502448] Loading compiled-in X.509 certificates
[    5.512074] Loaded X.509 cert 'Build time autogenerated kernel key: ecdf0c3ef21a8b4ca325a4d1db7d45108ca78734'
[    5.555253] zswap: loaded using pool lzo/zbud
[    5.572072] Key type big_key registered
[    5.580346] Key type trusted registered
[    5.588107] Key type encrypted registered
[    5.596073] AppArmor: AppArmor sha1 policy hashing enabled
[    5.611549] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
[    5.627242] evm: HMAC attrs: 0x1
[    5.632807]   Magic number: 6:464:569
[    5.637441] rtc_cmos 00:05: setting system clock to 2018-02-11 06:35:21 UTC (1518330921)
[    5.659245] powernow_k8: This CPU is not supported anymore, using acpi-cpufreq instead.
[    5.969730] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[    6.003702] EDD information not available.
[    6.012570] Freeing unused kernel memory: 2372K
[    6.017509] Write protecting the kernel read-only data: 18432k
[    6.032397] Freeing unused kernel memory: 2024K
[    6.062148] Freeing unused kernel memory: 100K
[    6.068106] x86/mm: Checked W+X mappings: passed, no W+X pages found.
[    6.077095] x86/mm: Checking user space page tables
[    6.084212] x86/mm: Checked W+X mappings: passed, no W+X pages found.
Loading, please wait...
starting version 234
[    6.408460] AVX2 version of gcm_enc/dec engaged.
[    6.414510] AES CTR mode by8 optimization enabled
[    6.484278] virtio_net virtio1 enp0s3f1: renamed from eth1
[    6.492173] virtio_net virtio0 enp0s3f0: renamed from eth0
Begin: Loading essential drivers ... [    7.656307] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input3
[    7.751384] raid6: sse2x1   gen()  7781 MB/s
[    7.808481] raid6: sse2x1   xor()  7139 MB/s
[    7.860306] raid6: sse2x2   gen()  7476 MB/s
[    7.912073] raid6: sse2x2   xor()  7589 MB/s
[    7.964413] raid6: sse2x4   gen() 10154 MB/s
[    8.016356] raid6: sse2x4   xor()  3518 MB/s
[    8.068140] raid6: avx2x1   gen()  7982 MB/s
[    8.116095] raid6: avx2x1   xor() 13712 MB/s
[    8.164229] raid6: avx2x2   gen() 16336 MB/s
[    8.216590] raid6: avx2x2   xor()  8427 MB/s
[    8.273681] raid6: avx2x4   gen() 13102 MB/s
[    8.328266] raid6: avx2x4   xor() 12439 MB/s
[    8.333030] raid6: using algorithm avx2x2 gen() 16336 MB/s
[    8.339402] raid6: .... xor() 8427 MB/s, rmw enabled
[    8.343314] raid6: using avx2x2 recovery algorithm
[    8.348192] xor: automatically using best checksumming function   avx
[    8.356220] async_tx: api initialized (async)
done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... [    8.456092] Btrfs loaded, crc32c=crc32c-intel
Scanning for Btrfs filesystems
done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
mdadm: error opening /dev/md?*: No such file or directory
mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
done.
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  UUID=e792c995-2eba-45bb-9f91-46d2af71fb10 does not exist.  Dropping to a shell!


BusyBox v1.22.1 (Ubuntu 1:1.22.0-19ubuntu2) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)

but as you can see, it then got stuck in the initramfs. Do we use the UUID in the disk configuration / fstab in other images? That would seem surprising.

Host platform is joyent_20180210T081538Z from the jenkins-built dev-bhyve builds.

Comments

Comment by Mike Gerdts
Created at 2018-02-12T19:12:25.514Z
I've only seen this on ubuntu images, which have no /boot partition. Some linux distros have a boot partition which is guaranteed to be within the sectors that were addressable by disks in CHS mode, which has a limit of a bit less than 8 GiB.  With a couple printfs added to grub:
cylinders: 1023
    heads: 16
  sectors: 63
     coff: 2780u
error: 534 attempt to read or write outside of disk `hd0'.
The relevant code change is:
diff --git a/grub-core/disk/i386/pc/biosdisk.c b/grub-core/disk/i386/pc/biosdisk.c
index f0aadd1..3b4ce13 100644
--- a/grub-core/disk/i386/pc/biosdisk.c
+++ b/grub-core/disk/i386/pc/biosdisk.c
@@ -529,10 +529,15 @@ grub_biosdisk_rw (int cmd, grub_disk_t disk,
       hoff = head % data->heads;
       coff = head / data->heads;
 
-      if (coff >= data->cylinders)
+      if (coff >= data->cylinders) {
+             grub_printf("cylinders: %lu\n", data->cylinders);
+             grub_printf("    heads: %lu\n", data->heads);
+             grub_printf("  sectors: %lu\n", data->sectors);
+             grub_printf("     coff: %du\n", coff);
        return grub_error (GRUB_ERR_OUT_OF_RANGE,
-                          N_("attempt to read or write outside of disk `%s'"),
+                          N_("534 attempt to read or write outside of disk `%s'"),
                           disk->name);
+      }
 
       if (grub_biosdisk_rw_standard (cmd + 0x02, data->drive,
                                     coff, hoff, soff, size, segment))

For whatever reason, the disks are not in LBA mode.

473   if (data->flags & GRUB_BIOSDISK_FLAG_LBA)
474     {
...
511     }                                                                           
512   else                                                                          
513     {                                                                           
514       unsigned coff, hoff, soff;                                                
515       unsigned head;                                                            
516                                                                                 
517       /* It is impossible to reach over 8064 MiB (a bit less than LBA24) with   
518          the traditional CHS access.  */                                        
519       if (sector >                                                              
520           1024 /* cylinders */ *                                                
521           256 /* heads */ *                                                     
522           63 /* spt */)                                                         

It seems rather important to figure out how to get the disks into LBA mode else if grub.cfg or any of the other code dynamically loaded by grub happens to be near the end of the10 GB boot disk, the VM could be unbootable.

Comment by Josh Wilsdon
Created at 2018-02-14T01:11:45.519Z
@mike.zeller ran into the same problem as far as I can tell and suggested that it was fixed by adding the boot=true flag to the root disk. I've tested and this seems reasonable so I've added that as part of TRITON-125 here:

https://github.com/joyent/sdc-cloudapi/commit/1fd2a34089861c4b32c96bea7d2d8ff4a8df56cd

I believe this will resolve the issue as boot.c in illumos-joyent will then setup the disk correctly in the zhyve configuration.

Comment by Mike Gerdts
Created at 2018-02-14T05:16:38.690Z
I can reproduce this even with "boot": true@mike.zeller was hitting multiple issues, one of which completely prevented boot. Setting "boot": true resolved the one that prevented boot, but I don't see how it could have resolved this bug that merely delays boot.

Comment by Mike Gerdts
Created at 2018-02-14T16:02:15.719Z
My latest comment on this missed the fact that there were two issues reported in this bug.  Let's take this bug as "read or write outside of disk".  The other is OS-6611.

Comment by Mike Gerdts
Created at 2018-02-26T02:05:28.572Z
With some debugging statements added to grub-core/disk/i386/pc/biosdisk.c, I see this on the console:

Disk info for drive 80 (rw) esi: 0xfe00 ds: 0x6000 edx: 0x80 eax: 0x4300 eax: 0x4300 [flags: 0x202 eax: 0x4300]
Falling back to CHS mode
   sector: 2770944
cylinders: 1023
    heads: 16
  sectors: 63
     coff: 2748u
error: 534 attempt to read or write outside of disk `hd0'.

The relevant code where the Falling back to CHS mode is seen is:

/* For readability.  */
#define GRUB_BIOSDISK_READ      0
#define GRUB_BIOSDISK_WRITE     1

#define GRUB_BIOSDISK_CDROM_RETRY_COUNT 3

static grub_err_t
grub_biosdisk_rw (int cmd, grub_disk_t disk,
                  grub_disk_addr_t sector, grub_size_t size,
                  unsigned segment)
{
...
      else
        if (grub_biosdisk_rw_int13_extensions (cmd + 0x42, data->drive, dap))
          {
            /* Fall back to the CHS mode.  */
            grub_printf("Falling back to CHS mode\n");
            data->flags &= ~GRUB_BIOSDISK_FLAG_LBA;
            disk->total_sectors = data->cylinders * data->heads * data->sectors;
            return grub_biosdisk_rw (cmd, disk, sector, size, segment);
          }

With debugging enabled in uefi (a different debug session, without grub debugging enabled), I see the following:

 Drive Params call
!!! unhandled int13 43
error: attempt to read or write outside of disk `hd0'.

From that we can see that cmd must be GRUB_BIOSDISK_WRITE. This is a relief, because it is probably not essential that grub can write to the boot disk in order to perform a successful boot.

Looking at BhyvePkg/Csm/BhyveCsm16/Bios.c, we can see that 0x42 (Extended Read) is handled, but 0x43 (Extended Write) is not handled.

Comment by Mike Gerdts
Created at 2018-02-26T14:28:34.179Z
After implementing extended write, I can see that writes are succeeding.
grub> cat (hd0,gpt1)/boot/grub/grubenv
# GRUB Environment Block
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###################################################
grub> set foo=stuff
grub> save_env foo
grub> cat (hd0,gpt1)/boot/grub/grubenv 
# GRUB Environment Block
foo=stuff
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
#########################################
...
root@79062669-e229-e55d-960d-9b18d0fed8d0:~# cat /boot/grub/grubenv 
# GRUB Environment Block
foo=stuff
#############################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################root@79062669-e229-e55d-960d-9b18d0fed8d0:~# 

Comment by Jira Bot
Created at 2018-02-27T14:15:12.387Z
illumos-extra commit 065d8bddcc6664cbe86d6ebff1cb78180fb9c94d (branch master, by Mike Gerdts)

OS-6604 uefi-edk2 needs to support extended write for bhyve
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>


Comment by Josh Wilsdon
Created at 2018-03-22T03:07:12.845Z
@mike.gerdts should I no longer be seeing these messages?

[root@headnode (coal) /var/tmp]# vmadm console b9e2cdc3-bca4-e708-de36-bf9590d7dc1f
[Connected to zone 'b9e2cdc3-bca4-e708-de36-bf9590d7dc1f' console]
error: attempt to read or write outside of disk `hd0'.

Press any key to continue...
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu

that's with your ubuntu-14.04 image and platform 20180321T231539Z.

Comment by Jira Bot
Created at 2018-03-26T18:06:27.585Z
smartos-live commit 719cfa372c3da30d737da2f0fb361ef92bea8b90 (branch master, by Mike Gerdts)

OS-6823 need uefi-csm-rom.bin with fix for OS-6604
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Approved by: Patrick Mooney <patrick.mooney@joyent.com>


Comment by Jira Bot
Created at 2018-03-29T16:36:56.059Z
smartos-live commit 719cfa372c3da30d737da2f0fb361ef92bea8b90 (branch vminfod, by Mike Gerdts)

OS-6823 need uefi-csm-rom.bin with fix for OS-6604
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Approved by: Patrick Mooney <patrick.mooney@joyent.com>