You are not logged in.

#1 2019-11-26 10:40:35

hoWlExat
Member
Registered: 2019-11-15
Posts: 35

[SOLVED] Access new SSD to partition it

I just got a new M.2 SSD.

I can see it with `lsblk`:

NAME           MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
...
nvme1n1          259:4  0   1.8T  0 disk  

However, it doesn't show any existing partitions, so I figured I'd try to run `cgdisk /dev/nvme1n1`. But when I do that, I get the message:

Could not load partitions from 'nvme1n1'! Aborting!

What is it that I need to do before running `cgdisk` to make this SSD available?

Last edited by hoWlExat (2019-11-28 07:53:13)

Offline

#2 2019-11-26 11:43:32

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: [SOLVED] Access new SSD to partition it

[SOLVED] .load partitions from '/dev/sdb'! Aborting! - cgdisk /dev/sdb

man cfdisk wrote:

Next, cfdisk tries to read the current partition table from the disk drive. If it is unable to figure out the partition table, an error is displayed and the program will exit. This might also be caused by incorrect geometry information, and can be overridden on the command line. Another way around this problem is with the -z option. This will ignore the partition table on the disk.


--
saint_abroad

Offline

#3 2019-11-28 07:53:00

hoWlExat
Member
Registered: 2019-11-15
Posts: 35

Re: [SOLVED] Access new SSD to partition it

Thanks, @sabroad. I'll document what worked for me, so others can know, in the future:

# 1 - Clear the device.
sudo sgdisk --clear /dev/<device-name>

# 2 - Partition the device.
sudo cgdisk /dev/<device-name>

# 3 - Apply the filesystem.
sudo mkfs.ext4 /dev/<partition-name>

`<device-name>` and `<partition-name>` can be found by running the command, `lsblk`. Also, if you aren't trying to set up an ext4 filesystem (the standard for a "Linux filesystem" partition type), you will need to use a different `mkfs` command. For example, `mkfs.fat32 -F32 /dev/<partition-name>`.

Offline

Board footer

Powered by FluxBB