Bug 218473 - [EFI] boot/loader.efi halt with ufs disk
Summary: [EFI] boot/loader.efi halt with ufs disk
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-08 05:40 UTC by Masachika ISHIZUKA
Modified: 2018-02-10 04:57 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masachika ISHIZUKA 2017-04-08 05:40:52 UTC
Loader.efi was working until r316585.
At r316585, loader.efi is stopped with the message 'EFI console: \".
Work around is to roll back /sys/boot r316584 or copy loader.efi from 11.0-RELEASE-p8.
I don't use zfs as follows.

% gpart show ada0

=>       34  500118125  ada0  GPT  (238G)
         34       2014        - free -  (1.0M)
       2048    1024000     1  efi  (500M)
    1026048      81920     2  ms-basic-data  (40M)
    1107968     262144     3  ms-reserved  (128M)
    1370112  127845242     4  ms-basic-data  (61G)
  129215354       1158        - free -  (579K)
  129216512     931840     5  ms-recovery  (455M)
  130148352    8388608     6  freebsd-ufs  (4.0G)
  138536960   16777216    12  freebsd-swap  (8.0G)
  155314176   96757760    13  freebsd-ufs  (46G)
  252071936     954368     7  ms-recovery  (466M)
  253026304       2048        - free -  (1.0M)
  253028352    3807104     8  ms-basic-data  (1.8G)
  256835456        128     9  freebsd-boot  (64K)
  256835584   25165824    10  freebsd-ufs  (12G)
  282001408   33554432    11  freebsd-ufs  (16G)
  315555840   33554432    14  freebsd-ufs  (16G)
  349110272  134217728    15  freebsd-ufs  (64G)
  483328000   16788144    16  !d3bfe2de-3daf-11df-ba40-e3a556d89593  (8.0G)
  500116144       2015        - free -  (1.0M)
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-04-18 15:44:22 UTC
A commit references this bug:

Author: tsoome
Date: Tue Apr 18 15:43:47 UTC 2017
New revision: 317092
URL: https://svnweb.freebsd.org/changeset/base/317092

Log:
  loader: zfs reader vdev_probe should check for minimum device size

  The smallest device we can have in the pool is 64MB, since we are trying to
  walk all four labels to find the most up to date uberblock, this limit will
  also give us good method to check if we even should attempt to probe.

  Enforcing the check also will make sure we are not getting wrapped while
  calculating the label offset.

  Also, after label check, we should verify if we actually got any UB or not.

  PR:		218473
  Reported by:	Masachika ISHIZUKA
  Reviewed by:	allanjude
  Differential Revision:	https://reviews.freebsd.org/D10381

Changes:
  head/sys/boot/zfs/zfsimpl.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-02-10 04:57:09 UTC
A commit references this bug:

Author: kevans
Date: Sat Feb 10 04:56:08 UTC 2018
New revision: 329100
URL: https://svnweb.freebsd.org/changeset/base/329100

Log:
  MFC Loader Fixes 2017q2: r316437,r316577,r316578,r316585,r316590,r316612,
  r316625,r316628,r316654,r316682,r316704,r316771,r317092,r317097,r317099,
  r317652,r317785,r317886,r317887,r318142,r318320,r318356,r318678,r318754,
  r318982,r318986,r318987,r318988,r318989,r318990,r318991,r318992,r318993,
  r318994,r318999,r319083,r319084,r319085,r320011,r320234,r320288,r320304,
  r320467,r320482

  r316437: Small cleanup to make i386/loader match efi/loader boot environment
  code

  r316577: loader: part.c cstyle cleanup

  r316578: loader: want mechanism to avoid RA with bcache

  r316585: loader: zfs reader should check all labels

  r316590: libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory

  r316612: In r298230 the value of HEAP_MIN was changed from 3MB to 64MB.
  Correct a comment.

  r316625: Do not use -msoft-float with intention of disabling FP on aarch64

  r316628: Silence GCC warning by initializing the local variable.

  r316654: loader: r316585 did miss userboot update

  r316682: loader: r316585 did miss sparc/ofw

  r316704: loader.efi: only fetch zfs pool guid for the actual boot device

  r316771: loader: Avoid possible overflow via environment variable

  r317092: loader: zfs reader vdev_probe should check for minimum device size

  r317097: loader: F_READ/F_WRITE should be checked against masked flag

  r317099: loader: uboot disk ioctl should call disk_ioctl

  r317652: loader.efi: ResetSystem does not use data with EFI_SUCCESS

  r317785: zfsboot: drvsize() may be unusable on some systems

  r317886: distinguish NFS versus TFTP boot by rootpath

  r317887: loader: network read rework

  r318142: libstand: NULL pointer dereference in rarp

  r318320: loader: add ip layer code into libstand

  r318356: libstand: increase nfs max read size to 16k

  r318678: Replacing iterating over rootpath by strsep(3).

  r318754: Pass -N directly to ld via -Wl rather than passing it to the
  compiler driver.

  r318982: Pass a "FREEBSD" user-class in PXE dhcp request

  r318986: add a comment on vendor index 19 and 20 to avoid confusion

  r318987: Support URI scheme for root-path in netbooting

  r318988: Always build tftpfs support along with nfs for pxeboot

  r318989: Always issue the pxe request

  r318990: Partially revert r314948

  r318991: Document recent changes on pxeboot

  r318992: Capitalize DHCP

  r318993: Use the usual FreeBSD spelling for the DHCP user class

  r318994: Catch with the change in the user class

  r318999: Update the comments concerning net_parse_rootpath to reflect what
  it is now

  r319083: Followup on the user-class changes

  r319084: Small cleanup in dev_net.c

  r319085: use the same option list for dhcp discovery and request

  r320011: Add chain loader support for loader

  r320234: Make structure padding explicit in EFI_MEMORY_DESCRIPTOR

  r320288: Allow Clang's integrated assembler to assemble boot0

  r320304: loader.efi: Disable smbios for arm

  r320467: loader: chain load relocate data declaration is bad

  r320482: As with arm64 mark the EFI PE header as allocated on arm.

  PR:		218473

Changes:
_U  stable/11/
  stable/11/lib/libstand/Makefile
  stable/11/lib/libstand/arp.c
  stable/11/lib/libstand/bootp.c
  stable/11/lib/libstand/bootp.h
  stable/11/lib/libstand/bootparam.c
  stable/11/lib/libstand/dosfs.c
  stable/11/lib/libstand/dosfs.h
  stable/11/lib/libstand/ether.c
  stable/11/lib/libstand/globals.c
  stable/11/lib/libstand/ip.c
  stable/11/lib/libstand/net.c
  stable/11/lib/libstand/net.h
  stable/11/lib/libstand/netif.c
  stable/11/lib/libstand/netif.h
  stable/11/lib/libstand/nfs.c
  stable/11/lib/libstand/rarp.c
  stable/11/lib/libstand/rpc.c
  stable/11/lib/libstand/rpc.h
  stable/11/lib/libstand/stand.h
  stable/11/lib/libstand/tftp.c
  stable/11/lib/libstand/udp.c
  stable/11/share/mk/bsd.stand.mk
  stable/11/sys/boot/common/bcache.c
  stable/11/sys/boot/common/commands.c
  stable/11/sys/boot/common/dev_net.c
  stable/11/sys/boot/common/disk.c
  stable/11/sys/boot/common/md.c
  stable/11/sys/boot/common/part.c
  stable/11/sys/boot/efi/Makefile.inc
  stable/11/sys/boot/efi/boot1/Makefile
  stable/11/sys/boot/efi/boot1/boot1.c
  stable/11/sys/boot/efi/boot1/zfs_module.c
  stable/11/sys/boot/efi/fdt/Makefile
  stable/11/sys/boot/efi/include/efidef.h
  stable/11/sys/boot/efi/libefi/Makefile
  stable/11/sys/boot/efi/libefi/efinet.c
  stable/11/sys/boot/efi/libefi/efipart.c
  stable/11/sys/boot/efi/libefi/time.c
  stable/11/sys/boot/efi/loader/Makefile
  stable/11/sys/boot/efi/loader/arch/arm/start.S
  stable/11/sys/boot/efi/loader/arch/arm64/Makefile.inc
  stable/11/sys/boot/efi/loader/main.c
  stable/11/sys/boot/forth/menu.rc
  stable/11/sys/boot/i386/boot0/Makefile
  stable/11/sys/boot/i386/common/drv.h
  stable/11/sys/boot/i386/libi386/Makefile
  stable/11/sys/boot/i386/libi386/bioscd.c
  stable/11/sys/boot/i386/libi386/biosdisk.c
  stable/11/sys/boot/i386/libi386/biosmem.c
  stable/11/sys/boot/i386/libi386/libi386.h
  stable/11/sys/boot/i386/libi386/pxe.c
  stable/11/sys/boot/i386/libi386/pxe.h
  stable/11/sys/boot/i386/libi386/relocater_tramp.S
  stable/11/sys/boot/i386/loader/Makefile
  stable/11/sys/boot/i386/loader/chain.c
  stable/11/sys/boot/i386/loader/help.i386
  stable/11/sys/boot/i386/loader/main.c
  stable/11/sys/boot/i386/pxeldr/pxeboot.8
  stable/11/sys/boot/i386/zfsboot/zfsboot.c
  stable/11/sys/boot/mips/beri/boot2/Makefile
  stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c
  stable/11/sys/boot/mips/beri/loader/beri_disk_sdcard.c
  stable/11/sys/boot/ofw/libofw/ofw_disk.c
  stable/11/sys/boot/ofw/libofw/ofw_net.c
  stable/11/sys/boot/ofw/libofw/openfirm.c
  stable/11/sys/boot/ofw/libofw/openfirm.h
  stable/11/sys/boot/powerpc/ps3/ps3cdrom.c
  stable/11/sys/boot/powerpc/ps3/ps3disk.c
  stable/11/sys/boot/sparc64/loader/main.c
  stable/11/sys/boot/uboot/lib/disk.c
  stable/11/sys/boot/uboot/lib/net.c
  stable/11/sys/boot/usb/storage/umass_loader.c
  stable/11/sys/boot/userboot/userboot/main.c
  stable/11/sys/boot/userboot/userboot/userboot_disk.c
  stable/11/sys/boot/zfs/libzfs.h
  stable/11/sys/boot/zfs/zfsimpl.c