Files
snapd/gadget/install/kernel.go
alfonsosanchezbeato 20cde6b251 many: build drivers tree when current mount is not the target mount (#14047)
* tests: fix muinstaller tests for 24

* many: build drivers tree when current mount is not the target mount

In some cases (when using the snapd install API or when installing
from initramfs), the place where the kernel snap / components used for the
installation are mounted is different to the final location in the
installed system. This change considers this so the drivers tree is
generated with symlinks pointing to the final expected location.

* overlord: use model to check if we need to set-up drivers tree

instead of using a device context, as for the installation using snapd
API case we have a model but not a context.

* tests/lib/tools/setup_nested_hybrid_system.sh: re-try kpartx -d

* tests/muinstaller-real: check that drivers tree is created

* tests/muinstaller-real: we need a bigger disk with latest kernel

* tests/lib/tools/setup_nested_hybrid_system.sh: clean up

after building muinstaller. On classic we have weird issues otherwise
due to a desktop agent installing lxd.

* tests/lib/prepare-restore.sh: purge lxd-installer

lxd-installer was causing failures in the restore step for 24.04.
2024-06-11 20:07:52 +01:00

39 lines
1.1 KiB
Go

// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2024 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package install
import (
"github.com/snapcore/snapd/snap"
)
// KernelSnapInfo includes information from the kernel snap that is
// needed to build a drivers tree.
type KernelSnapInfo struct {
Name string
Revision snap.Revision
// MountPoint is the root of the files from the kernel snap
MountPoint string
// NeedsDriversTree will be set if a drivers tree needs to be
// build on installation
NeedsDriversTree bool
// IsCore is set if this is UC
IsCore bool
}