tomazbracic
Flashing Nerves to CM4's eMMC directly - wrong size partitions?
Hi,
I have:
- Raspberry CM4 8Gb, 32Gb eMMC
- CM4 IO expansion board
I would like to correctly flash CM4 and make it operational (without SD Card).
I was following or lets say combining few sources:
- https://qbereau.hashnode.dev/flashing-a-nerves-raspberry-image-from-sd-card-to-emmc
- https://forum.elixirforum.com/t/flashing-a-nerves-rpi-image-from-sd-card-to-emmc/49912
- https://www.digikey.es/es/maker/projects/how-to-flash-the-raspberry-pi-compute-module-4-cm4-emmc-with-an-os/3e33d2593b914a98bfe7cc08d4af5dbb
I ended up with a working CM4. I can use LAN and connect to it. So it kind of works. But I am confused with the partitioning on CM4. This is the output of cmd("df -h") command on it.
iex(1)> cmd("df -h")
Filesystem Size Used Available Use% Mounted on
/dev/root 28.3M 28.3M 0 100% /
devtmpfs 1.0M 0 1.0M 0% /dev
tmpfs 770.6M 8.0K 770.5M 0% /tmp
tmpfs 385.3M 4.0K 385.3M 0% /run
/dev/mmcblk0p1 18.7M 15.5M 3.1M 83% /boot
/dev/mmcblk0p3 510.0M 434.6M 75.4M 85% /root
tmpfs 1.0M 0 1.0M 0% /sys/fs/cgroup
So this /dev/mmcblk0p3 is to my understanding too small. Am I correct? It should be around 30Gb?
For instance… on my 16Gb SDCard on another Nerves system (plain RPi4 - SDCard, no eMMC) I can see this:
iex(5)> cmd("df -h")
Filesystem Size Used Available Use% Mounted on
/dev/root 28.3M 28.3M 0 100% /
devtmpfs 1.0M 0 1.0M 0% /dev
tmpfs 368.8M 8.0K 368.8M 0% /tmp
tmpfs 184.4M 4.0K 184.4M 0% /run
/dev/mmcblk0p1 18.7M 15.5M 3.1M 83% /boot
tmpfs 1.0M 0 1.0M 0% /sys/fs/cgroup
/dev/mmcblk0p3 14.5G 603.5M 13.9G 4% /root
So, what did I do wrong? I would really appreciate some feedback.
Thanks!
Tomaz
First Post!
quentin
Hi Thomaz,
Your problem might reside in your fwup.conf and fwup-revert.conf
You’ll see something like define(APP_PART_COUNT, 1044480)
You should try to increase it to define(APP_PART_COUNT, 62914560) to make space for 30GB instead of 510MB.
Not 100% sure but worth a look.
Hope it helps.
Quentin
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









