← Back to team overview

ubuntu-phone team mailing list archive

Porting: mount issues

 

Hi everyone,

I'm having some trouble fixing mount problems and hope someone knows
what's wrong. These are the 3 main issues:


* My device appears to have no UDA, userdata, USERDATA or similar
symlink to the user partition device node in /dev. I only have
/dev/mmcblk0p26 and a symlink "/dev/block/179:26" to that device node.
In /dev/disk I have "by-id", "by-path" and "by-uuid" but nothing else,
i.e. no by-name or by-label or by-disklabel. blkid also prints no labels
for partitions. I suspect this is because of:
> /dev/mmcblk0: PTTYPE="dos"
(i.e. no gpt)

  => This is not a serious problem if bug #1199084 gets fixed (mount
support via cmdline parameters). Still, maybe there's a kernel config or
kernel patch to export partition labels to userspace? The kernel knows
about partition labels from reading an ATAG param and creates a
/proc/emmc file to list them.



* Because of that first problem, I hard-coded the userdata partition
path in scripts/touch in the initramfs. This works fine and the device
boots. The update-fstab script in /usr/lib/lxc-android-config then fails
because it can't find the userdata partition, so I manually updated the
/etc/fstab file:
> /dev/mmcblk0p26	/data	ext4	noatime,nodiratime,errors=remount-ro	0	0
(similar for /system and a bind mount for /vendor)

Now things fail on boot, probably because that partition was already
mounted in the initramfs script.
> mount: /dev/mmcblk0p26 already mounted or /data busy
> mount: according to mtab, /dev/mmcblk0p26 is mounted on /
The android container fails to mount /data as well.

What's wrong with my setup? Something in the initramfs? Bad fstab? I've
heard that /etc/fstab is not even supposed to exist and that it should
*only* be at /data/ubuntu/etc/fstab.. So what's supposed to be at /
then, and how do I get it there? :)



* I'm not sure about this last point, maybe it's alright. When booting
Ubuntu Touch, the devices are at /dev/mmcblk0p[0-29]. In the android
container or when booting the recovery, I find them at
/dev/block/mmcblk0p[0-29]. Not sure if this is a problem, maybe udev
does things differently from whatever-android-uses-instead-of-udev.. :-)


It's surprising that my device actually boots up and has a usable GUI
with all those problems. I'm thankful for any help with this.

Cheers,
Florian