[SOLVED]: VIM3: Domain: u-boot - Cannot create an eMMC partition

Describe the bug A clear and concise description of what the bug is.
I created and mounted a partition on eMMC, but after rebooting the partition is not visible

To Reproduce Steps to reproduce the behavior:

  • Create a partition starting from 212992 368640 as root with sudo fdisk /dev/mmcblk0
  • Create an ext4 partition as root with sudo mkfs.ext4 /dev/mmcblk0p1
  • Create and enable a systemd mount point file as root with sudo systemctl enable media-data.mount
  • Start partition as root with sudo systemctl start media-data.mount

Expected behavior A clear and concise description of what you expected to happen.

Partition is mounted after reboot and I can see the partition with df and execute sudo fw_printenv

Additional context Add any other context about the problem here.

What should I change inside the u-boot procedure

  • What is the eMMC flash layout
  • Why is the eMMC root partition hided?
  • Something is going on with u-boot I can’t envision now.

[UPDATE]: Found eMMC rootfs sector 0xb400000 = 188743680 / 512 = 368640

If I create an MBR or GPT partition and mount the rootfs partition created above. I cannot use sudo fw_printenv I get Cannot open /dev/env: No such file or directory

[UPDATE 2]: Found by my own what should I add into /etc/fw_env.config

# Block device example
#/dev/env                   0x0                   0x10000
/dev/mmcblk0             0x6c00000       0x10000

Executing sudo fw_setenv test__env 1 and sudo fw_printenv test__env I could read the variable and delete it with sudo fw_setenv test__env

BTW I created a GPT partition with XFS over LVM2 and mounted with systemctl as mmcblk0p1 like a charme :smiley:

Problem is solved.

CAUTION: This feature is an advanced feature that allows you to change the u-boot keys and values from user land without entering the u-boot mode. Use it if you know what you are doing and use it wisely otherwise you will brick your board.

1 Like