My Bela suddenly has stopped appearing on my laptop when I plug it in - it doesn't mount as a hard drive and I am unable to SSH into it or use the IDE. The lights still come on and flash.

The last thing I did was edit the /etc/fstab as detailed here: https://www.instructables.com/id/Mounting-a-USB-Thumb-Drive-with-the-Raspberry-Pi/

After editing that file and doing 'sudo reboot' the Bela has not reappeared. I've restarted the computer, plugged it in a few times, and tried with a different computer.

This was in an attempt to access audio files from a USB stick, an issue I detailed here: https://forum.bela.io/d/814-read-files-from-usb-stick

Any tips? Thanks!

My update on this: I've been able to revive my Bela by flashing an SD card with a fresh copy of the Bela software image and using the jumper cable method to startup from the SD card rather than the eMMC.

It would be pretty useful to know why this happened, though, if anyone has any tips. Is it a result of me editing the /etc/fstab file?

The root question remains, as well, of how to access files from a USB stick within PD!

sorry for not getting back about the USB drive issue before: I actually didn't have any around to test with. Editing /etc/fstab seems to be a good step in that direction, but maybe if you have an error in there, it will prevent something else from working fine?
My guess is that some errors there make this line in /opt/Bela/bela_gadget.sh to fail:

# make boot partition available as mass storage
echo `cat /opt/Bela/rootfs_dev`p1 > functions/mass_storage.0/lun.0/file

this in turns prevents the rest of the file from being executed, so that the other functions available over USB are not enabled.

So, now that you can log into the board on the SD card, we want to look at your /etc/fstab on the emmc and see what's wrong with it.

So:
- boot from the SD card
- mount the ext4 partition of the emmc on /mnt/

mount /dev/mmcblk1p2  /mnt/

- get the current content of that fstab from that partition:

cat /mnt/etc/fstab

- post the result back here so we can see what went wrong
- while you are at it, try removing the line set -e from /mnt/opt/Bela/bela_gadget.sh (that is on the eMMC): this should prevent an error occurred during execution (as it's happening now) from stopping all the USB gadget from being loaded. I applied the same change to the main repo now, here. This should allow you to log back into the eMMC (if you boot without an SD card).

    no worries at all, thanks for the reply. I'm not in my studio today, I'll give this a try tomorrow and let you know how it goes!

    giuliomoro - get the current content of that fstab from that partition:
    cat /mnt/etc/fstabif("undefined"!==typeof hljs)hljs.ha();else if("undefined"===typeof hljsLoading){hljsLoading=1;var a=document.getElementsByTagName("head")[0],e=document.createElement("link");e.type="text/css";e.rel="stylesheet";e.href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/styles/default.min.css";a.appendChild(e);e=document.createElement("script");e.type="text/javascript";e.onload=function(){var d={},f=0;hljs.hb=function(b){b.removeAttribute("data-hljs");var c=b.innerHTML;c in d?b.innerHTML=d[c]🙁7<++f&&(d={},f=0),hljs.highlightBlock(b.firstChild),d[c]=b.innerHTML)};hljs.ha=function(){for(var b=document.querySelectorAll("pre[data-hljs]"),c=b.length;0<c😉hljs.hb(b.item(--c))};hljs._ha()};e.async=!0;e.src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/highlight.min.js";a.appendChild(e)}
    - post the result back here so we can see what went wrong

    ok, I've done this and the result is:
    /dev/mmcblk1p2 / ext4 defaults 0 1
    /dev/mmcblk1p1 /mnt/boot vfat defaults 0 2
    /dev/sda1 /home/pi/usbdrv vfat uid=pi,gid=pi,umask=0022,sync,auto,nosuid,rw,nouser 0 0

      giuliomoro - while you are at it, try removing the line set -e from /mnt/opt/Bela/bela_gadget.sh (that is on the eMMC): this should prevent an error occurred during execution (as it's happening now) from stopping all the USB gadget from being loaded. I applied the same change to the main repo now, here. This should allow you to log back into the eMMC (if you boot without an SD card).

      I did this as well, but it doesn't seem to work - if I remove the SD card the Bela still won't boot properly using the eMMC. If I have the SD card in it loads fine. Strangely I don't seem to need to have the jumper cables attached as described on the wiki page for it to boot from the SD card.

        yannseznec Strangely I don't seem to need to have the jumper cables attached as described on the wiki page for it to boot from the SD card.

        That's only needed if the bootloader on the eMMC is old (i.e.: older than Bela v0.3.4)

        yannseznec /dev/sda1 /home/pi/usbdrv vfat uid=pi,gid=pi,umask=0022,sync,auto,nosuid,rw,nouser 0 0

        yup this would have never worked! You are trying to mount /dev/sda1 to a folder /home/pi/usbdrv for user pi, but neither the folder not the user exist on Bela!

        yannseznec I did this as well, but it doesn't seem to work - if I remove the SD card the Bela still won't boot properly using the eMMC.

        By coincidence, last night someone came to the office with exactly the same problem as yours. So I realized - by connecting to the board over serial during boot - that the problem is a bit more complex than that, and removing the set -e line alone is not sufficient.

        Anyhow, if you check out the other post you'll find instructions on how to mount it properly. The nofail is critical, to avoid errors when the drive is not present at boot.

        It is critical to try to manually mount /dev/sda1 after you edit fstab and before your reboot, so you can catch any errors that would potentially hang you at boot.

        oh my god I can't believe I didn't notice that file path I was trying. insert a facepalm emoji here.

        yup, that's the one!

        ok I have the Bela booting from the eMMC again, now I'll try your solution for the USB stick!

        5 days later
        6 years later

        exactly the same problem here: wrong fstab line, no USB-gadget, no SSH, no eMMC mount...
        Any solution to access eMMC filesystem before I flash a Bela system on an SD?

        try flashing the SD card and boot from it but do not attempt to erase the eMMC, then from the booted system you can try to access it.

        so noway to access eMMC directly as a USB storage device...
        By chance I had handy the ssd of a Bela-mini, so it has been done quickly, yeah!
        thank you!