OS Installer Makes sdcard read only

I just tried to use the OS installer on Ubuntu Desktop 20.04.5 LTS and it ended with a failure indicating that the card was read-only after verifying the files. When I attempted to use the card in the RPi 4, it failed to launch because the RPi could not write to the SDCard. When I put the card back into the Ubuntu machine, I was unable to do anything with it because the installer indeed set the entire drive (/dev/sdb in this case) to read-only, as opposed to just the boot partition (or whatever it was supposed to set to read-only). The sdcard can no longer be used because it cannot be reformatted due to this issue. I'm using installer version 1.1-43 with rpi4-v13.2.0 image.

Tagged:

Comments

  • Hi @pastyGRB
    Thanks for reaching out. I couldn't reproduce the issue. The installer is saving logs. With Windows it's under AppData\Local\Emteria\Emteria.OS Installer\logs. Can you take a look at your home directory if you can find the log from flashing and upload it here?

  • edited January 2023

    Thanks for the follow up @smieschek

    I found the log at "~/.local/share/Emteria/Emteria.OS Installer/logs"

    Below is the log. You can see at the very bottom where it forcibly unmounts the drives and that is likely what puts the drive into read-only state. When it tries to open the drive again, it cannot because it is trying to open it for writing, but it is now read-only.

    +00:00 (, 0) Starting emteria installer v1.1-43-g68add26
    +00:00 (, 0) Detected SSL support: true
    - runtime version: "OpenSSL 1.1.1g 21 Apr 2020"
    - build version: "OpenSSL 1.1.1g 21 Apr 2020"
    +00:00 (, 0) QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    +00:52 (, 0) Opening remote connection
    +00:52 (, 0) Using PackageData version: 1
    +00:57 (, 0) Using PackageData version: 1
    +00:59 (, 0) Refreshing drives
    +01:00 (, 0) Ignoring external drive "USB_3.0_FD at /dev/sda"
    +01:00 (, 0) Ignoring system drive "DB4032 at /dev/mmcblk0"
    +01:00 (, 0) Ignoring system drive "/dev/mmcblk0boot0"
    +01:00 (, 0) Ignoring system drive "/dev/mmcblk0boot1"
    +01:00 (, 0) Found 0 drive(s)
    +01:24 (, 0) Refreshing drives
    +01:25 (, 0) Ignoring external drive "USB_3.0_FD at /dev/sda"
    +01:25 (, 0) Ignoring system drive "DB4032 at /dev/mmcblk0"
    +01:25 (, 0) Ignoring system drive "/dev/mmcblk0boot0"
    +01:25 (, 0) Ignoring system drive "/dev/mmcblk0boot1"
    +01:25 (, 0) Found 1 drive(s)
    +01:29 (, 0) Checking for OEM config
    +01:30 (, 0) No OEM config available
    +01:30 (, 0) Started downloading "package.json"
    +01:30 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/package.json"
    +01:30 (, 0) Finished downloading "package.json"
    +01:30 (, 0) Using PackageData version: 1
    +01:30 (, 0) Started downloading "boot.zip"
    +01:30 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/boot.zip"
    +01:32 (, 0) Finished downloading "boot.zip"
    +01:32 (, 0) Started downloading "bootloader.zip"
    +01:32 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/bootloader.zip"
    +01:32 (, 0) Finished downloading "bootloader.zip"
    +01:32 (, 0) Started downloading "dtbo.zip"
    +01:32 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/dtbo.zip"
    +01:33 (, 0) Finished downloading "dtbo.zip"
    +01:33 (, 0) Started downloading "super.zip"
    +01:33 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/super.zip"
    +03:05 (, 0) Finished downloading "super.zip"
    +03:05 (, 0) Started downloading "oem.zip"
    +03:05 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/oem.zip"
    +03:06 (, 0) Finished downloading "oem.zip"
    +03:06 (, 0) Started downloading "metadata.zip"
    +03:06 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/metadata.zip"
    +03:06 (, 0) Finished downloading "metadata.zip"
    +03:06 (, 0) Started downloading "misc.zip"
    +03:06 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/misc.zip"
    +03:06 (, 0) Finished downloading "misc.zip"
    +03:06 (, 0) Started downloading "vbmeta.zip"
    +03:06 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/vbmeta.zip"
    +03:06 (, 0) Finished downloading "vbmeta.zip"
    +03:06 (, 0) Started downloading "vendor_boot.zip"
    +03:06 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/vendor_boot.zip"
    +03:07 (, 0) Finished downloading "vendor_boot.zip"
    +03:07 (, 0) Started downloading "vbmeta_system.zip"
    +03:07 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/vbmeta_system.zip"
    +03:07 (, 0) Finished downloading "vbmeta_system.zip"
    +03:07 (, 0) Started downloading "userdata-2147483648.zip"
    +03:07 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/userdata-2147483648.zip"
    +03:07 (, 0) Finished downloading "userdata-2147483648.zip"
    +03:07 (, 0) Started downloading "userdata-4187593113.zip"
    +03:07 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/userdata-4187593113.zip"
    +03:08 (, 0) Finished downloading "userdata-4187593113.zip"
    +03:08 (, 0) Started downloading "userdata-8589934592.zip"
    +03:08 (, 0) Using path "/root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0/userdata-8589934592.zip"
    +03:08 (, 0) Finished downloading "userdata-8589934592.zip"
    +03:08 (, 0) Finished DownloadWorker
    +03:08 (, 0) Using PackageData version: 1
    +03:08 (, 0) Flashing on raw "/dev/sdb"
    +03:08 (, 0) Initializing package base at "//root/.local/share/Emteria/Emteria.OS Installer/rpi4-v13.2.0"
    +03:08 (, 0) Drive: "SD at /dev/sdb" with 30989615104 bytes
    +03:08 (, 0) Raw at "/dev/sdb"
    +03:08 (, 0) Mounted at "/media/cspasternak/system-boot"
    +03:08 (, 0) Mounted at "/media/cspasternak/writable"
    +03:08 (, 0) Starting step 0 : Reading package
    +03:08 (, 0) Using PackageData version: 1
    +03:08 (, 0) Finished step 0 : Reading package
    +03:08 (, 0) Starting step 1 : Verifying files
    +03:11 (, 0) Finished step 1 : Verifying files
    +03:11 (, 0) Starting step 2 : Preparing
    +03:11 (, 0) Drive is still mounted, forcibly unmounting before proceeding
    +03:11 (, 0) - unmounted /media/cspasternak/system-boot
    +03:11 (, 0) - unmounted /media/cspasternak/writable
    +03:11 (, 0) Finished step 2 : Preparing
    +03:11 (, 0) Starting step 3 : Opening to write
    +03:11 (, 0) Failed opening raw: "/dev/sdb"
    +03:11 (, 0) Error: 30
    +03:11 (, 0) Failed to open drive for raw writing

  • @pastyGRB thanks for the log. I'm not aware of such an issue in the past.
    The "system-boot" and "writable" seem to be partitions that were on the SD card before. The installer is supposed to unmount those and than write on the SD card (which failed). I don't think the installer changed anything on the SD card as it could not be opened for writing.
    Is it possible the SD card was read-only to begin with? Having single partitions on the SD card which are read-only should not be an issue, as the SD card is written in raw mode.

    I would suggest formatting the SD card and retrying, but if I understood correctly you cannot format the SD card. What's your process in doing so? Can you try: https://askubuntu.com/a/618030

  • Unfortunately, at this point, the card is lost and normal methods to format it wont work as every computer (including my Mac) see it as write protected. I decided to try using an old USB to see what it would do and I got it to write successfully. Maybe something happened with the desktop during the flashing or maybe it was a bad card. Either way, i'm now able to make progress given the success with the USB drive. Thanks for having a look. I'm very excited to launch this project.

  • @pastyGRB thanks for the feedback, great to hear that you are making progress!

Sign In or Register to comment.