Bug 241606 - 12.0-p11 can't load kernel : upgrade from 11.2-p15 : missing currdev-zfs in boot loader
Summary: 12.0-p11 can't load kernel : upgrade from 11.2-p15 : missing currdev-zfs in b...
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: standards (show other bugs)
Version: 12.0-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-standards mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-31 06:18 UTC by Michel Le Cocq
Modified: 2019-11-05 05:25 UTC (History)
1 user (show)

See Also:


Attachments
boot loader FreeBSD 12.0-p11 missing currdev-zfs (92.25 KB, image/jpeg)
2019-10-31 06:18 UTC, Michel Le Cocq
no flags Details
boot 12.0-p11 from 11.2-p15 ! (29.26 KB, image/jpeg)
2019-10-31 08:24 UTC, Michel Le Cocq
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Le Cocq 2019-10-31 06:18:50 UTC
Created attachment 208720 [details]
boot loader FreeBSD 12.0-p11 missing currdev-zfs

Hi, 

Hi encounter trouble with boot loader of FreeBSD 12.0.

To upgrade to 12.0 RELEASE I upgrade in first from 11.1-RELEASE-p7 to 11.1-RELEASE-p15, then to 11.2-RELEASE-p15 to arrive at 12.0-RELEASE-p11.
All of this with freebsd-update tools.

~~~
# beadm list
BE               Active Mountpoint  Space Created
[...]
11.1-RELEASE-p7  -      -          956.0K 2018-03-10 09:44
11.1-RELEASE-p15 -      -           11.3M 2019-10-27 13:52
11.2-RELEASE-p15 -      -          804.0K 2019-10-27 15:51
12.0-RELEASE-p11 NR     /            3.1G 2019-10-30 14:31
~~~

All upgrade process seems ok but now when I boot on 12.0-RELEASE-p11 boot loader says can't load kernel.

I have to set in boot loader currdev-zfs to my zfs vol then it's ok. See attachement.

set currdev-zfs=zfs/ROOT/12.0-RELEASE-p11

Some infos bellow :

~~~
# zpool status zroot
  pool: zroot
 state: ONLINE
[...
  scan: none requested
config:

	NAME                STATE     READ WRITE CKSUM
	zroot               ONLINE       0     0     0
	  mirror-0          ONLINE       0     0     0
	    gpt/zroot-nvme  ONLINE       0     0     0
	    gpt/zroot-sata  ONLINE       0     0     0

errors: No known data errors
~~~

~~~
# gpart show -l nvd0
=>       40  500118112  nvd0  GPT  (238G)
         40     524288     1  (null)  (256M)
     524328    8388608     2  swap-nvme  (4.0G)
    8912936  491205208     3  zroot-nvme  (234G)
  500118144          8        - free -  (4.0K)

# gpart show nvd0
=>       40  500118112  nvd0  GPT  (238G)
         40     524288     1  efi  (256M)
     524328    8388608     2  freebsd-swap  (4.0G)
    8912936  491205208     3  freebsd-zfs  (234G)
  500118144          8        - free -  (4.0K)

# gpart show ada0
=>       40  500118112  ada0  GPT  (238G)
         40     524288     1  efi  (256M)
     524328    8388608     2  freebsd-swap  (4.0G)
    8912936  491205208     3  freebsd-zfs  (234G)
  500118144          8        - free -  (4.0K)

# gpart show -l ada0
=>       40  500118112  ada0  GPT  (238G)
         40     524288     1  (null)  (256M)
     524328    8388608     2  swap-sata  (4.0G)
    8912936  491205208     3  zroot-sata  (234G)
  500118144          8        - free -  (4.0K)
~~~
Comment 1 Michel Le Cocq 2019-10-31 06:27:07 UTC
Something strange.

If I set my env to 11.2-RELEASE-p15 then reboot

~~~
# freebsd-version
12.0-RELEASE-p11
# beadm activate 11.2-RELEASE-p15
Activated successfully
# shutdown -r now
~~~

then from boot menu change again my env to 12.0-RELEASE-p11.

I can see in boot menu :

~~~
1 active : zfs:zfs/ROOT/11.2-RELEASE-p15
2 bootfs : zfs:zfs/ROOT/12.0-RELEASE-p11
~~~

If I choose to boot this way it works.
Comment 2 Michel Le Cocq 2019-10-31 06:31:50 UTC
# freebsd-version 
12.0-RELEASE-p11
# beadm list
BE               Active Mountpoint  Space Created
[...]
11.1-RELEASE-p15 -      -           11.3M 2019-10-27 13:52
11.2-RELEASE-p15 R      -            2.9G 2019-10-27 15:51
12.0-RELEASE-p11 N      /          188.6M 2019-10-30 14:31
#
Comment 3 Michel Le Cocq 2019-10-31 08:16:25 UTC
I tried this to see if it came from 12.0 efi loader since 11.2 works :

# freebsd-version
12.0-RELEASE-p11
# mkdir /mnt/ada
# mkdir /mnt/nvd
# mount -t msdosfs /dev/ada0p1 /mnt/ada
# mount -t msdosfs /dev/nvd0p1 /mnt/nvd
# zfs get -H mountpoint zroot/ROOT/11.2-RELEASE-p15 
11.2-RELEASE-p15     mountpoint      /       local
# zfs mount zroot/ROOT/11.2-RELEASE-p15
# cp /mnt/11.2-RELEASE-p15/boot/loader.efi /mnt/ada/EFI/BOOT/BOOTX64.efi 
# cp /mnt/11.2-RELEASE-p15/boot/loader.efi /mnt/nvd/EFI/BOOT/BOOTX64.efi
# umount /mnt/ada
# umount /mnt/nvd
# zfs umount zroot/ROOT/11.2-RELEASE-p15
# rm -rf /mnt/*
# zfs set mountpoint=/ zroot/ROOT/11.2-RELEASE-p15

But still exactly the same : need to set at each boot ...

set currdev-zfs=zfs/ROOT/12.0-RELEASE-p11
Comment 4 Michel Le Cocq 2019-10-31 08:24:14 UTC
Created attachment 208725 [details]
boot 12.0-p11 from 11.2-p15 !
Comment 5 Michel Le Cocq 2019-10-31 12:34:39 UTC
there is a mistake in the upper comment :

I miss this line :

# zfs set mountpoint=/mnt zroot/ROOT/11.2-RELEASE-p15
Comment 6 Michel Le Cocq 2019-10-31 13:27:35 UTC
it seems to be the same as : http://freebsd.1045724.x6.nabble.com/Trouble-booting-from-EFI-with-12-stable-td6307121.html

The loader stop on this error and then drops to the prompt:
efi-autoresizecons not found
Comment 7 Michel Le Cocq 2019-10-31 13:31:13 UTC
I think you would prefer this link : https://www.mail-archive.com/freebsd-stable@freebsd.org/msg137133.html
Comment 8 Dave Cottlehuber freebsd_committer 2019-11-04 13:40:51 UTC
via IRC, confirmed I can reproduce this *only* if 11.3R /boot/boot1.efi is used as /efi/EFI/Boot/BootX64.efi. Switching to 12.0Rp9 boot1.efi or loader.efi & issue disappears.
Comment 9 Michel Le Cocq 2019-11-05 05:25:51 UTC
So it was not a Bug, it was a miss from my self.
During my first attempt I update BOOTX64.efi on only one of my 2 boot drive.
I correct doing this way :

# beadm list
BE               Active Mountpoint  Space Created
11.0-RELEASE-p1  -      -           17.0M 2017-05-24 14:14
11.0-RELEASE-p10 -      -          672.0K 2017-06-22 12:45
11.0-RELEASE-p12 -      -            1.5M 2017-10-10 10:17
11.1-RELEASE     -      -           14.1M 2017-10-10 10:33
11.1-RELEASE-p6  -      -            2.0M 2017-12-24 13:31
11.1-RELEASE-p7  -      -          956.0K 2018-03-10 09:44
11.1-RELEASE-p15 -      -           11.3M 2019-10-27 13:52
11.2-RELEASE-p15 R      /mnt         2.9G 2019-10-27 15:51
12.0-RELEASE-p11 N      /          185.8M 2019-10-30 14:31
# mkdir /mnt/ada
# mkdir /mnt/nvd
# mount -t msdosfs /dev/ada0p1 /mnt/ada
# mount -t msdosfs /dev/nvd0p1 /mnt/nvd
# cp /boot/boot1.efi /mnt/ada/EFI/BOOT/BOOTX64.efi 
# cp /boot/boot1.efi /mnt/nvd/EFI/BOOT/BOOTX64.efi
# umount /mnt/ada
# umount /mnt/nvd
# beadm activate 12.0-RELEASE-p11
Activated successfully
# shutdown -r now
Shutdown NOW!
shutdown: [pid 69091]
#                                                                                
*** FINAL System shutdown message from root@gobt ***