Fail on read-only FS without useful notice

  • Hello.

    First I had a lot of frustration with 3 consecutive errors:
    1. root couldn't open X apps. Solved with "export XAUTHORITY=~me/.Xauthority", already as root.
    2. LibreELEC.USB-SD.Creator.Linux-64bit.bin crashed on segmentation fault. Solved with this forum answer.
    3. After those 2 hurdles, the USB SD Creator failed to write to my SD card because, according to the message in the program, a lack of permissions. Which sounds weird, as I was root.

    It helped to increase my confusion to see the following message in the console, behind the program window, although it turned out to have nothing to do with the real problem:
    QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Permission denied
    (BTW: why adding an inotify watch?)

    The real problem was that my card adapter had the read-only lock switch on. I realized that when I moved away from LibreELEC to Raspbian and tried to use dd and it usefully told me that it could not write to a read-only file system. I switched that off, tried SD Creator again, and it worked.

  • Those inotify things are part of Qt - just ignore them.
    Regarding reading read-only switch - I can't find any way for this. And I think "lack of permission" is correct in this case - you didn't allow to write to the card :cool:


  • Regarding reading read-only switch - I can't find any way for this. And I think "lack of permission" is correct in this case - you didn't allow to write to the card :cool:

    I agree: the behavior is correct; I only wish the error message was more specific. I had not used SD cards in a long while and I had forgotten about the R-O switch. If it wasn't for the attempt I took with dd, I wouldn't have realized that was the problem.