/etc/fstab will sometimes filled with UUID-Entries (swap and boot) and will destroy upgrade/install

Hi,

I am Using YOCTO with MENDER and everything works fine so far. But sometimes (that is really strange) the file /etc/fstab will be filled with 2 additional lines, providing an UUID for swap and boot.
If I remove these 2 entries manually with an linux-live-cd I cann normally boot.

I have explicitely disabled uuid-handling in local.config:

MENDER_STORAGE_DEVICE = “/dev/sda”
MENDER_STORAGE_DEVICE_BASE = “{MENDER_STORAGE_DEVICE}" MENDER_BOOT_PART = "{MENDER_STORAGE_DEVICE_BASE}1”
MENDER_ROOTFS_PART_A = “{MENDER_STORAGE_DEVICE_BASE}2" MENDER_ROOTFS_PART_B = "{MENDER_STORAGE_DEVICE_BASE}3”
MENDER_DATA_PART = “${MENDER_STORAGE_DEVICE_BASE}4”
INHERIT += “mender-full”
MENDER_STORAGE_DEVICE = “/dev/sda”
MENDER_FEATURES_DISABLE_append = " mender-growfs-data"
MENDER_FEATURES_DISABLE_append = " mender-partuuid"
MENDER_STORAGE_DEVICE = “/dev/sda”
MENDER_STORAGE_TOTAL_SIZE_MB=“15360”
MENDER_DATA_PART_SIZE_MB=“8192”

I have also tried to comment the 2 responsible lines out in the install.sh scripts but without success.

Where do these lines come from and how can I avoid this?

Again: When I remove just these 2 lines starting with UUID= from fstab everything works like a carm and the configuration is perfect.

I even tried to add a ROOTFS_POSTPROCESS_COMMAND to replace the complete entry of fstab but afer flashing the image (also update with mender file) the result is the follwowing:

cat fstab

Final FSTAB

/dev/root / auto defaults 1 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
tmpfs /var/volatile tmpfs defaults 0 0
appuser /home/appuser tmpfs defaults,size=1G,x-gvfs-show,uid=appuser,gid=appuser 0 0
/dev/sda1 /boot/efi auto defaults,sync 0 2
/dev/sda4 /data auto defaults 0 2

UUID=7163-9428 /boot vfat defaults 0 0
UUID=75237bab-0dc3-4683-9845-2f8465f6fdc1 swap swap defaults 0 0

How can I get rid of the last 2 useless lines??? The UIDs are never seen on my system!
blkid

/dev/sda4: LABEL=“data” UUID=“a2a47d64-214b-4278-b79b-bc155c0953ee” TYPE=“ext4”
/dev/sda3: UUID=“dfd094be-2ec2-4ca2-b5eb-235306c95e81” TYPE=“ext4”
/dev/sda2: UUID=“bd84f6f2-a5fe-49f3-a00e-336d532604ba” TYPE=“ext4”
/dev/sda1: LABEL=“boot” UUID=“8D1C-3729” TYPE=“vfat”

What the hell is this???

Thanks for any help!
Cheers

@crowdmaker I don’t think those lines are added by the Mender code. There is nothing I am aware of in our layer that could cause that.

The code you show above appears to be the /etc/mtab and not the /etc/fstab. If you system has /etc/fstab symlinked to /etc/mtab then that could be the problem.

Drew

@crowdmaker did you figure it out ?

I am seeing the same two UUID lines being added to /etc/fstab on some random builds only.

I even bisected meta-mender commits between the appearance of the bug and I can only reproduce it on 850a275a which is the current dunfell head for meta-mender.

But you had the problem back in september so the problem must be somewhere else.

For anyone else stumbling on this:

After clearing all sstate cache and doig a clean build from scratch, the problem went away.

It might not be related to mender.

Hi @cveilleux, @crowdmaker

Just an update on the same topic on a new different thread:

Best,
Mauro