I have sd card with raspberry os installation that I use with PiZero. I am trying to edit wpa_supplicant.conf from my arch pc.
after I connect and mount sd card to pc I can edit file like this:
sudo vim <mount_point>/rootfs/etc/wpa_supplicant/wpa_supplicant.conf
I am also able to create any file on partition. But if unmount/disconnect sd card and remount/reconnect (without booting and placing sd card elsewhere) the files and changes are gone. Why does it happen?
info on mount
mount | grep sdf /dev/sdf2 on <mount_point>/rootfs type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2) /dev/sdf1 on <mount_point>/boot type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
sudo fdisk -l
Model: Generic MassStorageClass (scsi) Disk /dev/sdf: 3980MB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 4194kB 48.0MB 43.8MB primary fat32 lba 2 50.3MB 3980MB 3930MB primary ext4
[ 3598.359501] sd 11:0:0:2: [sdf] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=6s [ 3598.359510] sd 11:0:0:2: [sdf] tag#0 Sense Key : Aborted Command [current] [ 3598.359512] sd 11:0:0:2: [sdf] tag#0 Add. Sense: Incompatible medium installed [ 3598.359514] sd 11:0:0:2: [sdf] tag#0 CDB: Read(10) 28 00 00 41 80 08 00 00 08 00 [ 3598.359515] I/O error, dev sdf, sector 4292616 op 0x0:(READ) flags 0x83700 phys_seg 1 prio class 0
seems like sd card is failing