Parece que você já tem algum aplicativo aberto que possui o cartão SD montado, bloqueando a raiz / usuário de montá-lo. Verifique se o gparted está aberto.
Mudei o formato do sistema de arquivos do meu cartão SD para NTFS para que os aplicativos no meu sistema gravassem nele. Não consegui mais acessá-lo, então mudei de volta para FAT, mas ainda não consigo acessá-lo como root ou usuário comum. Como root, não lista. Quanto ao acesso com o usuário, recebo um pop-up de erro, que diz "Não é possível acessar o volume de 32 GB, não autorizado a executar a operação".
O comando df
me fornece a seguinte saída:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk0p1 10732080 8523064 1640800 84% /
devtmpfs 995380 0 995380 0% /dev
shmfs 997360 52396 944964 6% /dev/shm
tmp 997360 19924 977436 2% /tmp
tmpfs 199476 56 199420 1% /run
tmpfs 5120 0 5120 0% /run/lock
run 997360 448 996912 1% /var/host/dbus
/dev/mapper/encstateful 3164880 139276 3009220 5% /var/host/timezone
/dev/root 1763840 1583608 180232 90% /lib/modules/3.18.0-13527-gc2f2230
media 997360 4 997356 1% /var/host/media
/home/.shadow/dbb3045.../vault 10732080 8523064 1640800 84% /home/friskybits/Downloads
none 997360 0 997360 0% /sys/fs/cgroup
none 997360 4
O comando sudo lsblk -f
me fornece a seguinte saída:
NAME FSTYPE LABEL MOUNTPOINT
loop0
└─encstateful (dm-1) ext4
loop1 squashfs
loop2 squashfs
loop3 squashfs
loop4 squashfs
loop5 squashfs
loop6 squashfs
zram0 [SWAP]
mmcblk0rpmb
mmcblk0boot0
mmcblk0boot1
mmcblk0
├─mmcblk0p1 ext4
├─mmcblk0p2
├─mmcblk0p3 ext4 ROOT-A
│ └─vroot (dm-0)
├─mmcblk0p4
├─mmcblk0p5 ext4 ROOT-A
├─mmcblk0p6
├─mmcblk0p7
├─mmcblk0p8 ext4 OEM
├─mmcblk0p9
├─mmcblk0p10
├─mmcblk0p11
└─mmcblk0p12 vfat EFI-SYSTEM
mmcblk1
└─mmcblk1p1 vfat
O comando sudo lsblk -m
me fornece a seguinte saída:
NAME SIZE OWNER GROUP MODE
loop0 3.1G root disk brw-rw----
└─encstateful (dm-1) 3.1G root root brw-------
loop1 397.5M root disk brw-rw----
loop2 48.8M root disk brw-rw----
loop3 4K root disk brw-rw----
loop4 4K root disk brw-rw----
loop5 4K root disk brw-rw----
loop6 4K root disk brw-rw----
zram0 2.8G root disk brw-rw----
mmcblk0rpmb 4M root disk brw-rw----
mmcblk0boot0 4M root disk brw-rw----
mmcblk0boot1 4M root disk brw-rw----
mmcblk0 14.7G root disk brw-rw----
├─mmcblk0p1 10.5G root disk brw-rw----
├─mmcblk0p2 16M root disk brw-rw----
├─mmcblk0p3 2G root disk brw-rw----
│ └─vroot (dm-0) 1.7G root root ---------
├─mmcblk0p4 16M root disk brw-rw----
├─mmcblk0p5 2G root disk brw-rw----
├─mmcblk0p6 512B root disk brw-rw----
├─mmcblk0p7 512B root disk brw-rw----
├─mmcblk0p8 16M root disk brw-rw----
├─mmcblk0p9 512B root disk brw-rw----
├─mmcblk0p10 512B root disk brw-rw----
├─mmcblk0p11 8M root disk brw-rw----
└─mmcblk0p12 16M root disk brw-rw----
mmcblk1 29.7G root disk brw-rw----
└─mmcblk1p1 29.7G root disk brw-rw----
E o comando sudo parted -ls
me fornece a seguinte saída:
Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/encstateful: 3297MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 3297MB 3297MB ext4
Error: /dev/mmcblk0rpmb: unrecognised disk label
Warning: Error fsyncing/closing /dev/mmcblk0rpmb: Input/output error
Error: /dev/mmcblk0boot0: unrecognised disk label
Error: /dev/mmcblk0boot1: unrecognised disk label
Model: MMC 400073 (sd/mmc)
Disk /dev/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
11 32.8kB 8421kB 8389kB RWFW
6 8421kB 8422kB 512B KERN-C
7 8422kB 8422kB 512B ROOT-C
9 8422kB 8423kB 512B reserved
10 8423kB 8423kB 512B reserved
2 10.5MB 27.3MB 16.8MB KERN-A
4 27.3MB 44.0MB 16.8MB KERN-B
8 44.0MB 60.8MB 16.8MB ext4 OEM msftdata
12 128MB 145MB 16.8MB fat16 EFI-SYSTEM boot
5 145MB 2292MB 2147MB ext2 ROOT-B
3 2292MB 4440MB 2147MB ext2 ROOT-A
1 4440MB 15.7GB 11.3GB ext4 STATE msftdata
Warning: /dev/mmcblk1 contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table?
Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Model: SD SS32G (sd/mmc)
Disk /dev/mmcblk1: 31.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
11 32.8kB 8421kB 8389kB RWFW
6 8421kB 8422kB 512B KERN-C
7 8422kB 8422kB 512B ROOT-C
9 8422kB 8423kB 512B reserved
10 8423kB 8423kB 512B reserved
2 10.5MB 27.3MB 16.8MB KERN-A
4 27.3MB 44.0MB 16.8MB KERN-B
8 44.0MB 60.8MB 16.8MB OEM msftdata
12 128MB 145MB 16.8MB EFI-SYSTEM boot
5 145MB 147MB 2097kB ROOT-B
3 147MB 2244MB 2097MB ROOT-A
1 2244MB 2263MB 18.9MB STATE msftdata
Como posso acessar o cartão SD?
Parece que você já tem algum aplicativo aberto que possui o cartão SD montado, bloqueando a raiz / usuário de montá-lo. Verifique se o gparted está aberto.
(suposição: o cartão SD é visto como /dev/mmcblk1
, substitua mmcblk1p1
pelas letras reais da partição, por exemplo sdb1
se um pendrive USB ou um cartão SD conectado via USB, /dev/mmcblk1p1
- - > /dev/sdb1
)
sudo mkdir -p /mnt/sd1 # only if you want a new mountpoint
sudo umount /dev/mmcblk1p1 # only if already mounted (but with bad permissions)
sudo mount -o rw,users,umask=000 /dev/mmcblk1p1 /mnt/sd1 # mount
ou (se conectado via USB)
sudo mkdir -p /mnt/sd1 # only if you want a new mountpoint
sudo umount /dev/sdb1 # only if already mounted (but with bad permissions)
sudo mount -o rw,users,umask=000 /dev/sdb1 /mnt/sd1 # mount
Verifique as permissões
ls -ld /mnt/sd1
Teste
sudo bash -c "echo 'Hello World' > /mnt/sd1/hello.txt" # test writing with sudo
cat /mnt/sd1/hello.txt # test reading (as user)
ls -l /mnt/sd1 # check permissions of the content
rm /mnt/sd1/hello.txt # test removing (as user)
echo 'I am a user' > /mnt/sd1/user.txt # test writing (as user)
Editar: Diferentes umask
alternativas são ilustradas com as seguintes linhas de comando, neste caso, assumindo o dispositivo /dev/sdb1
$ sudo umount /mnt/sd1; sudo mount -o rw,users,umask=077 /dev/sdb1 /mnt/sd1;ls -ld /mnt/sd1
drwx------ 2 root root 4096 jan 1 1970 /mnt/sd1 # only root has permissions
$ sudo umount /mnt/sd1; sudo mount -o rw,users,umask=033 /dev/sdb1 /mnt/sd1;ls -ld /mnt/sd1
drwxr--r-- 2 root root 4096 jan 1 1970 /mnt/sd1 # users have read permissions
$ sudo umount /mnt/sd1; sudo mount -o rw,users,umask=022 /dev/sdb1 /mnt/sd1;ls -ld /mnt/sd1
drwxr-xr-x 2 root root 4096 jan 1 1970 /mnt/sd1 # users have read and execute permissions
$ sudo umount /mnt/sd1; sudo mount -o rw,users,umask=011 /dev/sdb1 /mnt/sd1;ls -ld /mnt/sd1
drwxrw-rw- 2 root root 4096 jan 1 1970 /mnt/sd1 # users have read and write permissions
$ sudo umount /mnt/sd1; sudo mount -o rw,users,umask=000 /dev/sdb1 /mnt/sd1;ls -ld /mnt/sd1
drwxrwxrwx 2 root root 4096 jan 1 1970 /mnt/sd1 # users have full permissions
Se isso não funcionar, você pode encontrar uma solução ou pelo menos uma explicação no link a seguir,
Não é possível formatar meu drive USB. Eu já tentei com mkdosfs e gparted: Análise do problema