NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-amd64/52959: Current kernel with EFI bootloader fails to find root on dk1 (second gpt part)



>Number:         52959
>Category:       port-amd64
>Synopsis:       Current kernel with EFI bootloader fails to find root on dk1 (second gpt part)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 28 17:40:00 +0000 2018
>Originator:     Ian Clark
>Release:        current
>Organization:
n/a
>Environment:
NetBSD ohmyno.co.uk 8.99.12 NetBSD 8.99.12 (salome) #3: Sun Jan 28 12:59:42 GMT 2018  ian%ohmyno.co.uk@localhost:/usr/src_current/sys/arch/amd64/compile/salome amd64

>Description:
I currently run 8_BETA, booting with EFI, using bootx64.efi.

My root disk is GPT partitioned:

$ sudo gpt show wd0
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34        2014         Unused
        2048      524288      1  GPT part - EFI System
      526336   999688847      2  GPT part - NetBSD FFSv1/FFSv2
  1000215183          32         Sec GPT table
  1000215215           1         Sec GPT header

I boot with 'boot hd0b:netbsd.gz'

On 8_BETA (from last week sometime) everything works okay, the machine boots as expected.

If I boot -current however the machine tries to boot from dk0 rather than dk1 as expected. use -a and specifying dk1 works.

I've replace bootx64.efi with the latest from -current and the problem remains.

However, if I boot a live USB image (from current) and at the boot prompt locate the root dev and boot that (in my case it ends up being hd4) then the machine boots finding dk1 as it should.

I've booted with -x (and also force defined DEBUG_GEOM in x86_autoconf.c) and recorded the dmesg:

Boot from USB (mbr) bootloader: http://tsunami.ohmyno.co.uk/~ian/pr/dmesg_usb_boot.txt
Boot from EFI bootloader: http://tsunami.ohmyno.co.uk/~ian/pr/dmesg_efi_boot.txt


(there's some extra debugging I added at the bottom to work out what device was being passed to 'setroot' in kern_subr.c)
>How-To-Repeat:
Setup NetBSD on a GPT disc, with the first partition as the EFI partition and the second as the NetBSD root partition.

Boot with 'boot hd0b:netbsd' (or similar)

On 8_BETA this should work as expected
On current this fails to find the correct root device.
>Fix:



Home | Main Index | Thread Index | Old Index