oe-alliance/oe-alliance-core

Automatic Installation/Backuprestore: userdata partition not mounted

jeepcook opened this issue · 2 comments

Same issue opened in o-atv but I think it's a oe-a issue, please confirm.

Using Flash online manager on a multiboot installation, the automatic restore doesn't work because the userdata partition is not mount at boot.

Example:

  • The current partition is Slot 3, I want to install a new image version on Slot 2
  • Select Flash online
  • Choose a downloaded image or a new 7.3 current one
  • Select the Slot 2
  • Select yes to Backup settings
  • Select Flash and restore settings and no plugins
  • The flash is ok, the files fast, noplugins, settings are created in /media/hdd/images/config.
  • Choose reboot/multiboot Slot2
  • After reboot the system should execute a background restore without booting to enigma2 and execute myrestore.sh if exists. And after this process do a last reboot (because I choose fast mode) and a new image with all backup parameters is installed on Slot 2. But the problem is the userdata is not mounted after the reboot so no fast, noplugins, settings files are found by the process on /media/hdd/images/config and the system start with the installation wizard.

On a multiboot installation, userdata for a hdd is on /dev/sda5, so the mount to do is:
mount /dev/sda5 /media/hdd
but this is not done

So I have to do the mount command, kill enigma2 and after that the restore is executed but in interactive mode. And after the last reboot everything is ok, mounts included because of fstab restore.

Here is the result for the blkid command where we can see the userdata partition:
/dev/sda2: UUID="7e1571c3-5e7b-40b7-8979-ecdd592271c2" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs2" PARTUUID="9a83fd6b-c4d5-4400-9483-c6e20c6c8bd5"
/dev/sda4: UUID="c85ee1e3-d27c-4862-9a51-ccb764e5b773" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs3" PARTUUID="4c4eb89b-031d-4369-8cb1-19d1cbc132fe"
/dev/sda5: UUID="6688774d-5504-4765-ad32-a54179d9a60e" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="userdata" PARTUUID="81b40474-af72-42ad-a09c-d35fd43f6eb5"
/dev/mmcblk0p3: SEC_TYPE="msdos" UUID="280F-2363" BLOCK_SIZE="512" TYPE="vfat"
/dev/mmcblk0p16: UUID="47f12fa3-c63b-4051-a1d0-f6a14cd23cc1" BLOCK_SIZE="4096" TYPE="ext4"
/dev/sda1: PARTLABEL="kernel2" PARTUUID="4f51e1db-8c4a-4b66-ae0b-e3f52ea9f299"
/dev/sda3: PARTLABEL="kernel3" PARTUUID="f2d7a230-ff39-453e-b0c8-ab6bd65d1d85"

The mount command result after a full restore (fstab included):
/dev/mmcblk0p16 on / type ext4 (rw,relatime,data=ordered)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=469232k,nr_inodes=117308,mode=755)
tmpfs on /media type tmpfs (rw,relatime,size=64k,nr_inodes=117378)
tmpfs on /var/volatile type tmpfs (rw,relatime,size=469512k,nr_inodes=117378)
/dev/sda5 on /media/hdd type ext4 (rw,relatime,data=ordered)
/dev/mmcblk0p3 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/etc/auto.network on /media/autofs type autofs (rw,relatime,fd=6,pgrp=2634,timeout=5,minproto=5,maxproto=5,indirect)

Has this issue started to happen just recently?
No it's an old bug

Image/Box Model (please complete the following information):

  • Version: 7.3
  • BoxModel: SF8008

Tested the mount-helper script but it doesn't work

BusyBox v1.36.0 () multi-call binary.

Usage: basename FILE [SUFFIX] | -a FILE... | -s SUFFIX FILE...

Strip directory path and SUFFIX from FILE

    -a              All arguments are FILEs
    -s SUFFIX       Remove SUFFIX (implies -a)

BusyBox v1.36.0 () multi-call binary.

Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A|B|C N] { PATTERN | -e PATTERN... | -f FILE... } [FILE]...

Search for PATTERN in FILEs (or stdin)

    -H      Add 'filename:' prefix
    -h      Do not add 'filename:' prefix
    -n      Add 'line_no:' prefix
    -l      Show only names of files that match
    -L      Show only names of files that don't match
    -c      Show only count of matching lines
    -o      Show only the matching part of line
    -q      Quiet. Return 0 if PATTERN is found, 1 otherwise
    -v      Select non-matching lines
    -s      Suppress open and read errors
    -r      Recurse
    -R      Recurse and dereference symlinks
    -i      Ignore case
    -w      Match whole words only
    -x      Match whole lines only
    -F      PATTERN is a literal (not regexp)
    -E      PATTERN is an extended regexp
    -m N    Match up to N times per file
    -A N    Print N lines of trailing context
    -B N    Print N lines of leading context
    -C N    Same as '-A N -B N'
    -e PTRN Pattern to match
    -f FILE Read pattern from file

root@sf8008:~# cat /etc/udev/mdev-mount.log


Action=
Hotplug count =
Major=
Mdev=
Devpath=
Devtype=
Subsystem=
Minor=
Physdevpath=
Physdevdriver=
Physdevbus=
Working directory= /home/root