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

**URL:** <https://hub.mender.io/t/etc-fstab-will-sometimes-filled-with-uuid-entries-swap-and-boot-and-will-destroy-upgrade-install/2515>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [September 28, 2020, 7:59pm UTC](https://hub.mender.io/t/etc-fstab-will-sometimes-filled-with-uuid-entries-swap-and-boot-and-will-destroy-upgrade-install/2515 "2020-09-28T19:59:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![crowdmaker](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@crowdmaker](https://hub.mender.io/u/crowdmaker)\
**Post date:** [September 28, 2020, 7:59pm UTC](https://hub.mender.io/t/etc-fstab-will-sometimes-filled-with-uuid-entries-swap-and-boot-and-will-destroy-upgrade-install/2515/1 "2020-09-28T19:59:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [September 29, 2020, 2:02pm UTC](https://hub.mender.io/t/etc-fstab-will-sometimes-filled-with-uuid-entries-swap-and-boot-and-will-destroy-upgrade-install/2515/2 "2020-09-29T14:02:37Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![cveilleux](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/cveilleux/32/307_2.png) [@cveilleux](https://hub.mender.io/u/cveilleux)\
**Post date:** [November 10, 2020, 8:20pm UTC](https://hub.mender.io/t/etc-fstab-will-sometimes-filled-with-uuid-entries-swap-and-boot-and-will-destroy-upgrade-install/2515/3 "2020-11-10T20:20:35Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![cveilleux](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/cveilleux/32/307_2.png) [@cveilleux](https://hub.mender.io/u/cveilleux)\
**Post date:** [November 13, 2020, 5:19pm UTC](https://hub.mender.io/t/etc-fstab-will-sometimes-filled-with-uuid-entries-swap-and-boot-and-will-destroy-upgrade-install/2515/4 "2020-11-13T17:19:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![malveo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/malveo/32/704_2.png) [@malveo](https://hub.mender.io/u/malveo)\
**Post date:** [December 11, 2020, 11:38am UTC](https://hub.mender.io/t/etc-fstab-will-sometimes-filled-with-uuid-entries-swap-and-boot-and-will-destroy-upgrade-install/2515/5 "2020-12-11T11:38:38Z")

</div>

Hi @cveilleux, @crowdmaker

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

> [@Issue on Dunfell (/etc/fstab invalid entry) - fail to boot](https://hub.mender.io/t/issue-on-dunfell-etc-fstab-invalid-entry-fail-to-boot/2972/2):
>
> Hi @malveo, We have seen other reports of this e.g [/etc/fstab will sometimes filled with UUID-Entries (swap and boot) and will destroy upgrade/install](https://hub.mender.io/t/etc-fstab-will-sometimes-filled-with-uuid-entries-swap-and-boot-and-will-destroy-upgrade-install/2515/4). Root cause is still unclear, as this is not something that is added by meta-mender. But it is becoming a pattern, that might be worth investigating closer.

Best,  
Mauro
