Score:0

Unable to format NVMe SSD to EXT4 but it is formatting in FAT32 and NTFS fine

ru flag

I am trying to format SSD to ext4 but it is not happening. When I try to format it to FAT32 or NTFS is works fine.

I had run the smart tool and found no problem. I have also clean formatted the disk but it is not working. Checked for bad blocks and found none. Also, did the sudo dd if=/dev/zero of=/dev/nvme0n1 count=16 and it works correctly.

When I format it to ext4, it gives input/output or invalid argument error after that SSD gets removed from disks but after restarting it appears again.

Please note SSD works fine if I format it as FAT32 or NTFS and I was able to store files in it but I am trying to install Linux into SSD which requires EXT4.

muru avatar
us flag
Which tool are you using to format it? What does `sudo parted /dev/XdY` report? (Also, `XdY`? NVME drives would follow the `nvmeXnYpZ` [disk>namespace>partition] pattern, not the `sda`/`hda`/`vdb`, etc. pattern.)
Muhammad Awwab Tahir avatar
ru flag
@muru yes I have updated the pattern. I am using `/dev/nvme0n1p1`. I tried to create partition with `sudo parted /dev/nvme0n1p1`, it works and then I formatted it using `mkfs.ext4 /dev/nvme0n1p1` but it is giving this `Writing superblocks and filesystem accounting information: mkfs.ext4: Input/output error while writing out and closing file system`
Muhammad Awwab Tahir avatar
ru flag
@muru I have also used the disks and gparted tools. They give the same error.
muru avatar
us flag
Ah, sorry, I meant `sudo parted /dev/nvme0p1 p` (with a `p` at the end to print the partition info).
Muhammad Awwab Tahir avatar
ru flag
No problem @muru
Muhammad Awwab Tahir avatar
ru flag
It is displaying this with `sudo parted /dev/nvme0n1 p` --> `Model: Lexar 250GB SSD (nvme) Disk /dev/nvme0n1: 250GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 512B 250GB 250GB primary 2 250GB 250GB 512B primary `
Muhammad Awwab Tahir avatar
ru flag
And with `sudo parted /dev/nvme0n1p1 p` --> `Error: /dev/nvme0n1p1: unrecognised disk label Model: NVMe Device (nvme) Disk /dev/nvme0n1p1: 250GB Sector size (logical/physical): 512B/512B Partition Table: unknown Disk Flags: `
oldfred avatar
cn flag
The only time you need dos/MBR/msdos partition table is if installing Windows in BIOS mode. Windows requires gpt partitioning for UEFI (since 2012). Try converting to gpt first. http://www.rodsbooks.com/gdisk/ or with gparted select gpt under device, advanced over msdos(MBR) default partitioning before starting.Many SSD also need firmware update to work or work correctly. Check version. `sudo apt install nvme-cli` & `sudo nvme list` shows FW Rev. Compare to latest firmware revision available.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.