Depending on if I have a usb inserted my hard disk can be either at /dev/sda or /dev/sdb. When making mender-convert artifacts you must specify the exact location, my update needs to work for several different USFFCs so I cannot use a specific partuuid.
I assumed it would be easiest to use /dev/disk/by-path/ as this will be consistent across multiple devices - indeed this works for installing the original image, however as the links are not resolved when trying to perform an update I get an error saying âActive root partition matches neither RootfsPartA nor RootfsPartBâ.
I feel sure I am missing something obvious - and something as simple as having a usb present at boot isnât enough to dismantle all the efforts of Mender??
Please let me know if you have any solutions to this issue,
James
I have not investigated the /dev/disk/by-path mechanism with Mender and I have not heard of anyone doing so. It doesnât surprise me there are issues with it. I suspect we would gladly take pull requests to enable that if it is possible to do so.
That said, I donât understand why you cannot use the PARTUUID support. The PARTUUID values only need to be unique within a system so reusing them across multiple hardware platforms should not be an issue.
Like as @drewmoseley states, this is the reason why I use PARTUUIDâs so as to abstract away from underlying disk technologies like usb disks, ssdâs, hard drives, nvm drives across many different systems. If I recall PARTUUIDâs are embedded in the partition table records and are not inadvertently changed by subsequent replacement of the partitions contents.
Thanks for your quick responses, your suggestion is that I instead make a script that creates all four necessary partitions on each device and assign them specific PARTUUIDs, before copying over the partitioned image generated by mender-convert (which will have been given the same specific partuuids in mender-convert-config)?
Unless i have misunderstood your requirements, the partitioning is part of the mender-convert process already, and from version 2.2.0 partuuid configuration can be defined in the mender-convert config file
Hi @dellgreen thanks very much for your responses thus far - I have switched to using partuuid paths and have made sure Iâm on version 2.2.0. I have had success making a mender-convert image that is booting okay, I can also begin a standalone update now - but Iâm running into issues rebooting into it (see picture). Any ideas?
Also is there an easy way to get a log info from an update?
Here are the configs Iâm currently using:
MENDER_ENABLE_SYSTEMD="n"
MENDER_PARTITION_SCHEME="gpt"
MENDER_BOOT_PART_SIZE_MB="512"
MENDER_DATA_PART_SIZE_MB="64"
MENDER_ENABLE_PARTUUID="y"
# Partition used as the boot partition.
MENDER_BOOT_PART="/dev/disk/by-partuuid/12341234-1234-1234-1234-123412341231"
# Partition used as the first (A) rootfs partition.
MENDER_ROOTFS_PART_A="/dev/disk/by-partuuid/12341234-1234-1234-1234-123412341232"
# Partition used as the first (B) rootfs partition.
MENDER_ROOTFS_PART_B="/dev/disk/by-partuuid/12341234-1234-1234-1234-123412341233"
# Partition used as the persistent data partition.
MENDER_DATA_PART="/dev/disk/by-partuuid/12341234-1234-1234-1234-123412341234"
MENDER_DEVICE_TYPE="x86_64"
MENDER_STORAGE_TOTAL_SIZE_MB="14400"
# Nothing to copy
MENDER_COPY_BOOT_GAP="n"
function platform_modify() {
#
# Make sure /lib64 exists since the Mender binary requires it.
# Some systems put everything under /lib (ie Yocto) and a simple
# symlink is enough to find everything Mender needs.
#
if [ ! -e work/rootfs/lib64 ]; then
run_and_log_cmd "ln -s /lib work/rootfs/lib64"
fi
}
the first thing i would check would be to mount the A/B partitions of the disk-image, on your desktop/laptop machine and inspect the contents to see if the kernel its trying to load actually exists at the path it outlines in your grub screenshot.
Hi @dellgreen, this issue is looking a bit more insidious - it only occurs when I try to update the OS from 18.04 LTS to 20.04 LTS (if I update to the same version it is fine). And indeed the kernel image it is looking for âvmlinuz-4.15.0-118-genericâ is not on the update, it has the newer âvmlinuz-5.4.0-52-genericâ.
Is updating the OS in this way beyond Menderâs remit - is there any way around this issue?