Unable to use an usb-key anymore

greetings to all,

I have burned a live-usb key of EOS with the dd method.

This worked fine. Then I needed to use it as a regular key. So I recreated an ms-dos partition table, created a fat 32 file system on it. Everything seems to be fine in gparted, but when I use it, the key seems to stay read-only, and a bootable key writer on mint tells me that there is no more space on it.

I reformatted the whole key with dd cat /dev/null > of=dev/sdb and started again to create a FAT32 filesystem on it but I still have the same problem.

thanks for your help

falke

ok, dd + recreation of partition table plus fat32 file system seems to solve my problem (after a reboot).

yet , i’m trying to make an btrfs file-system usb-key to make subvolume backup on it using btrfs send… But although the key is mounted with rw im unable to write ont it ???

Question do I have to create a subvolume on it to be able to write something to it ?

Silly question :wink:

Would your USB need to be bootable? If not, why create a Fat partition in the first place?

Some insight might be here:

hi , my goal it to make btrfs backups of any of my btrfs main partition ie /@ and /@home.

in fact, when btrfs filesysystem becomes corrupted , i would lost everything.

I want to take advantage of btrfs-filesystem for the restoring facility.

The external drive must not be bootable.

Is it permissions? How are you testing your ability to write.

No. You can write to the root of a btrfs partition.

@dalto ,

strange is that I can write a ro backup to it following this tutorial ,

https://connect.ed-diamond.com/Linux-Pratique/lp-114/realiser-une-sauvegarde-et-la-restaurer-avec-btrfs

but I can’t create/modify a file.

the device is mounted under /run/media/falke/xxxx with rw ?? Strange

/dev/sdb1 on /run/media/falke/9d80d7f8-dfdc-4d25-a6c0-18ef6b0431fa type btrfs (rw,nosuid,nodev,relatime,space_cache=v2,subvolid=5,subvol=/,uhelper=udisks2)

What does ls -l show?

this

[falke@falke-macbookair72 ~]$ ls -ld /run/media/falke/9d80d7f8-dfdc-4d25-a6c0-18ef6b0431fa/
drwxr-xr-x 1 root root 24 18 mai   17:40 /run/media/falke/9d80d7f8-dfdc-4d25-a6c0-18ef6b0431fa/

So it is only writable by root. This is probably fine for the purpose of btrfs snapshots since you need to be root for that anyway.

Are you writing to it as root during your testing?

Yes i must run the commands as root (though not understanding why the backups have to be made with ro rights…), but in général I don’t understand why the media isn’t writable for a normal user…

When you create a new filesystem it is owned by root.

If you want it to be available to your user, you can chown it to your user.

But Fat32 usb-sticks aren’t onwed by root… (At the end, that’s logicical) they haven’t permission s

fat32, exfat and friends don’t support POSIX permissions.