compulab-yokneam / meta-mender-compulab

Mender Layer for CompuLab Boards
5 stars 1 forks source link

error unmounting during mender install #3

Closed arrow53 closed 3 years ago

arrow53 commented 3 years ago

@vraevsky when I try to do a mender install I'm seeing the below. Any thoughts?

root@ucm:/data# mender install core-image-full-cmdline-ucm-imx8m-plus.mender 
INFO[0000] Loaded configuration file: /var/lib/mender/mender.conf 
INFO[0000] Loaded configuration file: /etc/mender/mender.conf 
INFO[0000] Mender running on partition: /dev/mmcblk2p3  
INFO[0000] Start updating from local image file: [core-image-full-cmdline-ucm-im
x8m-plus.mender] 
Installing Artifact of size 163150848...
INFO[0000] No public key was provided for authenticating the artifact 
INFO[0000] Opening device "/dev/mmcblk2p2" for writing  
WARN[0000] Inactive partition "/dev/mmcblk2p2" is mounted at "/run/media/mmcblk2
p2". This might be caused by some "auto mount" service (e.g udisks2) that mounts
 all block devices. It is recommended to blacklist the partitions used by Mender
 to avoid any issues. 
WARN[0000] Performing umount on "/run/media/mmcblk2p2". 
ERRO[0000] Error unmounting partition /dev/mmcblk2p2    
ERRO[0000] Download failed: Payload: can not install Payload: core-image-full-cm
dline-ucm-imx8m-plus.ext4: Failed to write the update to the inactive partition:
 "/dev/mmcblk2p2": invalid argument 
ERRO[0000] Payload: can not install Payload: core-image-full-cmdline-ucm-imx8m-p
lus.ext4: Failed to write the update to the inactive partition: "/dev/mmcblk2p2"
: invalid argument 

Note as I'm standalone I do have the mender service disabled https://docs.mender.io/system-updates-yocto-project/customize-mender#disabling-mender-as-a-system-service

vraevsky commented 3 years ago

1) Please post lsblk 2) umount -l of the p2 partition and retry the install

arrow53 commented 3 years ago
root@ucm:/data# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mtdblock0     31:0    0    8M  0 disk 
mmcblk2      179:0    0 29.1G  0 disk 
|-mmcblk2p1  179:1    0   64M  0 part /boot/efi
|-mmcblk2p2  179:2    0  8.7G  0 part /run/media/mmcblk2p2
|-mmcblk2p3  179:3    0  8.7G  0 part /
`-mmcblk2p4  179:4    0 11.6G  0 part /data
mmcblk2boot0 179:32   0    4M  1 disk 
mmcblk2boot1 179:64   0    4M  1 disk 

The umount thing seemed to work! Is this a step I should do or is this a bug?

vraevsky commented 3 years ago

Please post: blkid cat /etc/udev/mount.blacklist.d/mender cat /etc/fstab

arrow53 commented 3 years ago

@vraevsky I should note this doesn't always happen. I'm not at a state where it's happening. Here is what I have now but I'll post them again if I can get it to break again.

root@ucm-imx8m-plus:~# blkid
/dev/mmcblk2p1: SEC_TYPE="msdos" UUID="4D3C-D878" BLOCK_SIZE="512" TYPE="vfat" P
ARTUUID="09501fb1-01"
/dev/mmcblk2p2: UUID="c26edb99-48e1-43f6-9264-dad2c27ddb2a" BLOCK_SIZE="4096" TY
PE="ext4" PARTUUID="09501fb1-02"
/dev/mmcblk2p3: UUID="096eabd1-0dff-4341-95f4-0ed629fe770f" BLOCK_SIZE="4096" TY
PE="ext4" PARTUUID="09501fb1-03"
/dev/mmcblk2p4: UUID="12cc1d56-da84-4dad-9c76-b5e7b31b1aa0" BLOCK_SIZE="4096" TY
PE="ext4" PARTUUID="09501fb1-04"
root@ucm-imx8m-plus:~# cat /etc/udev/mount.blacklist.d/mender
09501fb1-02
09501fb1-03
root@ucm-imx8m-plus:~# cat /etc/fstab
# stock fstab - you probably want to override this with a machine specific one

/dev/root            /                    auto       defaults              1  1
proc                 /proc                proc       defaults              0  0
devpts               /dev/pts             devpts     mode=0620,ptmxmode=0666,gid
=5      0  0
tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,stri
ctatime 0  0
tmpfs                /var/volatile        tmpfs      defaults              0  0

# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto  0  0

# Where the U-Boot environment resides; for devices with SD card support ONLY!
PARTUUID=09501fb1-01 /boot/efi            auto       defaults,sync         0  2
PARTUUID=09501fb1-04 /data                auto       defaults              0  2
root@ucm-imx8m-plus:~#
vraevsky commented 3 years ago

It looks like the /etc/udev/mount.blacklist.d/mender file was ignored for a some reason.

arrow53 commented 3 years ago

I wonder if I had old mount names. I made a new project and I didn't realize those names are re-generated. I had this previously

MENDER_BOOT_PART = "0dd26200-01"
MENDER_DATA_PART = "0dd26200-04"
MENDER_ROOTFS_PART_A = "0dd26200-02"
MENDER_ROOTFS_PART_B = "0dd26200-03"
arrow53 commented 3 years ago

@vraevsky I'm going to close. I think I just had an old image sticking around. I'm done several updates with no issues. Sorry for the hassle.