uc20 grubenv block seems odd

Bug #1852544 reported by Dimitri John Ledkov
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gadget snap for Personal Computers using Intel or AMD processors
Invalid
Undecided
Unassigned
Ubuntu Image
Invalid
Undecided
Unassigned
snapd
Fix Released
High
Unassigned

Bug Description

uc20 grubenv block seems to be in the wrong location

it seems to be at (UbuntuSeed)/boot/grub/grubenv

but it should be at (UbuntuSeed)/EFI/ubuntu/grubenv

or i should change the location of which env is loaded in the grub.cfg script

Tags: core20
description: updated
tags: added: core20
description: updated
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Actually this might be a snapd bug!

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I think there is disconnect how ESP looks on disk, and how things are mounted (bound mounted) on the running system.

I.e. whilst grubenv is preped/written to /boot/grub/grubenv it is actually located at (should be located at) EFI/ubuntu/grubenv

Changed in ubuntu-image:
status: New → Invalid
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

So....

I think grubenv at ubuntu-image creation time should be written to EFI/ubuntu/grubenv, not to boot/grub/grubenv, despite the fact that that is where it is at runtime.

I expect no /var/ directory on the UbuntuSeed partition.

I expect no /snaps/ directory on the UbuntuSeed partition.

But this is me probably reading the code wrong! Or the fact that many different pieces are out-of-date / incompatible from each other.

So I am attaching what is current.txt in the UbuntuSeed partition, and what initrd seems to expect. Please check/validate if that makes sense or is wrong and need changes! And then we need to make like ubuntu-image and/or snap prepare-image to do the expect things on disk, and then adjust gadget|initramfs to match that.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Or is like top level /snaps expected to be a "pool" and like systems/$date/snaps/aux-info.json has points to the right /snaps? But then what is /var/lib/snapd/snaps/*.snap -> just redundant copies?

Changed in snapd (Ubuntu):
importance: Undecided → Critical
importance: Critical → High
Revision history for this message
John Lenton (chipaca) wrote :

Is there something snapd needs to do, here?

affects: snapd (Ubuntu) → snapd
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I think this is now done, at least in edge.

$ cat systems/20191210/grubenv
# GRUB Environment Block
snapd_recovery_kernel=/snaps/pc-kernel_359.snap

Looks good.

Changed in snap-pc:
status: New → Invalid
Changed in snapd:
status: New → Fix Committed
Changed in snapd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.