uc20 grubenv block seems odd

Bug #1852544 reported by Dimitri John Ledkov on 2019-11-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gadget snap for Personal Computers using Intel or AMD processors
Ubuntu Image

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

description: updated
tags: added: core20
description: updated
Dimitri John Ledkov (xnox) wrote :

Actually this might be a snapd bug!

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
Dimitri John Ledkov (xnox) wrote :


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.

Dimitri John Ledkov (xnox) wrote :
Dimitri John Ledkov (xnox) wrote :
Dimitri John Ledkov (xnox) wrote :
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
John Lenton (chipaca) wrote :

Is there something snapd needs to do, here?

affects: snapd (Ubuntu) → snapd
Dimitri John Ledkov (xnox) wrote :

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

$ cat systems/20191210/grubenv
# GRUB Environment Block

Looks good.

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

Other bug subscribers