Hi!
my SD suddenly block the system on boot. This time it has nothing to do with fstab (commenting the line has no effect). When powering the Bela, power led is lit, but nothing else. It seems Bela wants to boot on it.
The last action I did with the card is copying files on it, I did it on a computer. I had to chown user for that. No idea if it matters. Filesystem is EXT4.
I checked the card, it is perfectly sane.

if I hotplug the SD and mount -a, it works!

If I understand correctly the AM3358 TRM, the device cannot boot from an external USB drive connected to the USB host port. This means that Linux from the eMMC/SD should be starting fine, but at some point that hangs because of the presence of the external disk. If you cannot trace what's happening some other way, consider connecting a UART adapter to the 5x1 pin header (J1) on the BBB:

That will show the linux log as it boots and eventually provide a console to log in into the device. It could be useful to debug what's happening.

  • Ward replied to this.

    thank you!
    just to be sure you understood : I boot from eMMC, SD card is only there to record soundfiles.

    I see. Well ... thing is you said "SSD" and not "SD", so I assumed it was a USB SSD drive ...

    I am not sure what the rules are for booting from SD card, that's something that's done in uboot. I believe it takes a look at the SD card and decides based on the presence of files and/or specifically binary blobs whether it should try to boot from it. @Ward can maybe help here, as he's clearly done it properly.

    • Ward replied to this.

      sorry for SD-SSD mistake... shame on me :-/
      I correct for the next...

      I checked SD if it wouldn't have some flags up, but it didn't.
      I don't really know what happened when I mounted it on the Debian: after chown it created a lost+found directory. I removed it but it didn't fix nothing. No other hidden files appear.

      giuliomoro changed the title to SD blocking the system .

      Anyhow, I would think that as long as the SD card doesn't have a first partition which contains a /uEnv.txt or /boot/uEnv.txt and a valid kernel file system in /boot/, then it shouldn't boot from it.

      giuliomoro @Ward can maybe help here

      I tried modifying and recompiling the u-boot binary that is provided with the Bela and I asked on the BeagleBoard forum but I'm sorry to say I gave up. I just use a 32GB SDHC with the normal Bela image and then an extra partition appended that takes up the remaining +/- 26GB.

      ok thank you anyway... The strange thing about that is it used to work.

      From the thread that Ward linked:

      By default “u-boot” on the eMMC will scan the microSD for a bootable image (it looks for /uEnv.txt and /boot/uEnv.txt trigger files and if u-boot finds them it’ll boot it)…

      Are those files there?

      for sure not! Maybe u-boot can't complete the check on the SD and hangs?

      Maybe
      You need to check via uart ad I suggested. Or create a small dummy empty first partition and then a second big one taking up tall the space. I believe uboot only looks in the first partition so by keeping it wiped you may be able to remove the glitch

      8 days later

      If you manually format the SD card to ext4 from your computer's it could be that the filesystem has features enabled that the Bela does not have. This is what I wrote in my notes when I encountered that:

      I looked at it using the serial boot logs: Failed to start File System Check on /dev/mmcblk0p3 which resulted in Linux starting in emergency mode.

      Then I manually tried fsck /dev/mmcblk0p3 and that failed indicating the ext4 was created with a new feature not supported by the older (2017) fsck supplied with the Bela image.

      I found that mkfs.ext4 uses a config file located at /etc/mke2fs.conf that could be overridden by setting env variable MKE2FS_CONFIG. I made a copy of the .conf present on the Bela and uses that from the production laptop.

      ok, I tried with a dummy fat32 partition placed before EXT4, and with an empty space, but it doesn't solve the issue.
      How do I have to set MKE2FS_CONFIG env variable?

      So what I did is that I copied the /etc/mke2fs.conf from the bela to my own computer. Then I do this from my (linux) computer:

      env MKE2FS_CONFIG=path/to/copied/mke2fs.conf
      mkfs.ext4  -F /dev/path/to/partition

      I don't know if this solves your problem necessarily. It just something I thought that might be worth sharing as it took me hours to figure out what went wrong.

      giuliomoro If you cannot trace what's happening some other way, consider connecting a UART adapter to the 5x1 pin header (J1) on the BBB:

      That will show the linux log as it boots and eventually provide a console to log in into the device. It could be useful to debug what's happening.

      I would very much recommend doing this though as that likely points you in the right direction!

      7 days later

      maybe I'll try that later.
      I started the actions from 0:
      -format in EXT4: it works on Bela!
      -copy files, on my computer: doesn't boot
      -formatted in FAT32 and copy files: it boots.
      I keep this solution for now.