NVMe sem permissão escrita para formatar

Olá. Retirei um NVMe com dual boot (W11 e Ubuntu Budgie 24.04 LTS) de um note e o substituí por outro de maior capacidade. Acontece que agora ele não é reconhecido em um case (testei em dois cases) no Ubuntu Budgie 24.04 LTS (o mesmo acontece no W11). Verifiquei e está íntegro, sendo reconhecido pelo GParted como sda, mas não permite criar uma nova partição, informando que está como somente leitura. Usei os comandos sudo chmod 750 /dev/sda e sudo chown $USER /dev/sda -R, como indicado em outro post aqui do fórum. Alguém tem outra indicação sobre como resolver isso?

Qual o erro que mostra na tela?

Dá uma analisada nele com o smartctl:

smartctl -x -q noserial /dev/nvme0

Ah, se houver mais de um nvme conectado, então precisa saber qual é.

Outro ponto é que se você estiver usando um dispositivo de conversão NVME → USB, talvez seja diferente. Recomendo tentar a leitura e recuperação com ele conectado diretamente ao computador. Pode até ser que o dispositivo nvme → usb só permita acesso somente leitura, ou seja, que não haja nada errado com o dispositivo.

1 curtida

Respondendo a vocês, a mensagem obtida com o comando smartctl é: Smartctl open device: /dev/sda [USB NVMe Realtek] failed: Permission denied

Estranho aparecer como USB e /dev/sda sendo nvme, vc tá usando um adaptador USB?

Pode tentar apagar tudo e criar uma
Nova participação ext4 com esses commandos.

sudo umount /dev/sda
sudo wipefs -af /dev/sda
sudo sgdisk -e /dev/sda --new=0:0: -t 0:8300 && partprobe

Não esqueça o nemero 1 nesse ultimo.
sudo mkfs.ext4 /dev/sda1

Então sudo smartctl -x -q noserial /dev/sda

1 curtida

Sim, Sparrow, está em um case e já tentei desmontá-lo e a resposta é que não está montado. Também não é listado no fstab.

A “permission denied” error when formatting an NVMe USB drive often indicates that the user lacks the necessary privileges to modify the drive. To resolve this, you can try changing the ownership of the mount point or using Diskpart to clear read-only attributes. Ensure the drive is properly initialized and formatted with a compatible file system, and consider checking for write protection or malware.

Here’s a more detailed breakdown of potential solutions:

  1. Check File System and Permissions:
  • Verify the file system:

Ensure the NVMe drive is formatted with a file system that supports permissions, like NTFS or exFAT.

  • Check ownership and permissions:

You may need to change the ownership of the drive’s mount point to your user account. This can be done using the chown command in Linux/macOS or by adjusting permissions in the Disk Management tool in Windows

  1. Diskpart (Windows):
  • Open Diskpart: Open Command Prompt as an administrator and type diskpart.
  • List disk: Type list disk to see all connected drives.
  • Select the NVMe drive: Identify the NVMe drive by its size and type select disk <disk number>.
  • Clear read-only attributes: Type attributes disk clear readonly to remove any write protection.
  • Format the drive: You can then format the drive using format fs=<filesystem> label=<label> quick (replace <filesystem> with ntfs or exfat and <label> with your desired name).
  1. Hardware Troubleshooting:
  • Check the USB connection:

Ensure the NVMe enclosure is properly connected to the USB port. Try different USB ports (USB 2.0 and 3.0) and cables.

  • Test on another computer:

If possible, try connecting the NVMe drive to a different computer to rule out issues with your current system.

  1. Addressing Read-Only Mode:
  • Check for write protection:

Some USB drives have a physical switch that enables write protection. Ensure it’s in the OFF position.

  • Clear read-only attributes:

Use Diskpart or other tools to remove any write protection attributes that might be preventing formatting.

  1. Malware and Viruses:
  • Scan for malware: Run a scan with your antivirus software to check for any malicious software that might be interfering with the drive.
  1. Alternative Formatting Methods:
  • Third-party tools: Consider using a third-party disk management tool like EaseUS Partition Master or AOMEI Partition Assistant to format the drive. These tools often offer more advanced features and may be able to handle problematic drives.

By systematically checking these potential causes and trying the suggested solutions, you should be able to resolve the “permission denied” error and format your NVMe USB drive successfully.

1 curtida

Acho que o problema é seu adaptador
Tira ele do adaptador coloca direto na placa mãe dē boot pelo pendrive do Ubuntu e formata o nvme com ext4 ou exfat depois coloca de volta no case.

1 curtida

É que estou tentando evitar, mas acho que não tem outro jeito :frowning:

Swatquest, como tenho dual boot, mais tarde vou tentar via W11, como sugerido.

Foi do ia do google.

Veja os caminhos e procure pelo específico problema.

1 curtida

Aparentemente resolveria via W11 com o AOMEI Partition Assistent, por exemplo, mas é pago, então só voltando ele no note. Valeu pessoal!

Olá , aconteceu comigo , o que fiz foi antes de tirar o SSD do computador fiz backup de todos os dados que eu queria, ai apos instalar o Ubuntu no SSD novo eu montei o NVMe no case e usei apenas o Gnome Disco para apagar todas as partições, dai formatei-o em padrão Exfat, montei o CASE e o novo sistema “Ubuntu 24.04.3 LTS” reconheceu de boa como SSD Exbom que é a marca do CASE , agora uso ele como SSD EXTERNO,

Bom se for o seu caso também pode dar certo se assim fizer.

Olá, Edylima. Tentei isso, mas não adiantou, não permitia fazer nada com o NVMe no case, cheguei a retornar ele no note, instalei o Ubuntu novamente e retirei para ver se conseguia formatá-lo para usar no case, e nada. No fim, por outras razões, retornei ele no note e instalei normalmente o SO.

1 curtida