LUKS encrypted USB drive "not writable"

I want to back up my C2 to a LUKS-encrypted USB stick.

I can unlock & mount the stick, which is listed in Storage as “Encrypted USB storage”, but Settings\System\Backup says “The memory card is not writable”. (It is not writeable either :smile:)

This drive is writeable when unlocked & mounted on my desktop PC.

Any ideas what’s causing this?

How did you encrypted your USB drive? With LUKS? Which format do you use? Ext4?

Is there an option called Mount if you press and hold the storage?
Otherwise, you will probably need to mount and decrypt it manually. You will also need to enable developer mode.

Check this page for more information: SD Card Format and Encryption | Sailfish OS Documentation

I formatted the drive as encrypted LUKS ext4 on my Linux Mint PC, on which it is read & writeable.

Yes, I mounted the drive from Storage and I have developer mode enabled.

I’ll check your link.

Thanks.

ETA:

The info in that link describes pretty much everything I want - but for SD cards.

I want to do the same with a USB pen-drive, which will be easier to use than fiddling with the SD card tray..

1 Like

I erased the USB stick from my PC, then LUKS formatted it with the C2.

That then allowed writes to the drive.

Now the original problem appears on my PC, which when I insert the stick says “folder contents can’t be displayed” because I don’t have the necessary permission! At least this error indicates this is a permissions issue and I will be able to back-up to encrypted USB.

I was expecting to share LUKS encrypted devices like I do with my desktop and laptop. That anything written to a pen-drive from the C2 is inaccessible from other devices is a hindrance, but probably good from a security perspective.

I have tried to repeat this with a 128Gb SD card.

The card formats and mounts and is listed in Storage as “Encrypted memory card SD128G”

Backup has different ideas, saying “The memory card is not mounted” - with “Mount” button displayed. Tapping this button does nothing.

???

ETA:

Going back to Storage after trying this shows the card as unmounted. Attempts to remount it fail - with only a briefly flashed, barely noticeable error message “Could not mount memory card” at the top of the screen, and an unchanged blue circle “Unmounted encrypted memory card SD128G”

??

Interesting: if I reformat the 128Gb SD card on my PC as vFAT, it mounts and works OK on my C2. Attempting to format it as ext4, encrypted or not, either by PC or C2 fails now.

This card is likely 5+ years old, though it is SD-HC rated “C10”.

Is there a minimum spec for SD cards formatted as ext4?

I also see from pherjung’s link:

Limitations

  • Memory cards encrypted with Sailfish OS cannot be used on your computer.

  • Memory cards encrypted with a computer cannot be used on Sailfish OS.

Ah-ha.

Why is this ?

I’m used to sharing encrypted USB sticks between my Linux machines.

1 Like

This is not true (anymore?).
I’m using an encrypted 256 ext4 uSD daily for hourly backup (rsync) and storage on the phone.
It works nicely on the phone (XA2 dualSIM 5.0.0.76) and computer.
I don’t remember for sure where I formatted the uSD, but I’d say it was in the phone.

Regarding an USB stick, open and mounting on the phone are possible here, with a stick encrypted on the PC (cryptsetup 2.7.0).
However, Settings can sometimes hang or freeze and have to be restarted to get it working right.
Unfortunately, I can’t unmount and lock it. Settings just doesn’t do anything when I select unmount or lock. In the terminal, umount works.

Formatting the stick on the phone was not successful here either.

3 Likes

The partition scheme is different, for the backup APP you need old exfat with mbr, newer filesystems use guid…

Edit: you can use dd Command From recovery mode to backup partitions manually.

I have my USB stick working and unmount & lock do nothing for me either.

Should I use umount -a ?

I would rather do mount to see what is mounted / how the stick is named.
Then, specifically unmount it.

2 Likes

Agreed, I have for sure formatted SD cards on my computer & stuck them into my phone.

Tangentially: is it possible to connect a USB stick to a SfOS phone?! With a suitable cable/adapter I’m sure. And the system picks it up?

Sure! Search for an USB-A to USB-C adaptor.
It also works with an SSD hard drive and even a mouse. Amazing to see the cursor appearing!
It probably also works with a keyboard or a independently powered mechanical hard drive but I didn’t try.

2 Likes

You can even use soundcards/DAC, the Linux kernel strong is!

4 Likes

I should get one of these adapters!

Update: I have installed a new 256Gb Sandisk uSDXC card. It formats quickly and mounts fine.