Unable to partition SSD <SOLVED>

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
TheCatLady
Level 1
Level 1
Posts: 4
Joined: Mon Sep 20, 2021 7:46 am

Unable to partition SSD <SOLVED>

Post by TheCatLady »

I'm trying to install LM 20.2 on a new SSD I've just put in. The drive is a Samsung EVO 970 500GB NVMe M2. When I'm in the installer, it won't give me the option of partitioning the drive. So, I tried using a live session and GParted to partition the drive into /, /Home and swap. However, it gives an error, "Too many Primary Partitions". I did a search but can't find anything related to this. I'm booting from a USB using Legacy boot.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Unable to partition SSD

Post by Flemur »

TheCatLady wrote: Mon Sep 20, 2021 9:19 am o, I tried using a live session and GParted to partition the drive into /, /Home and swap. However, it gives an error, "Too many Primary Partitions". I did a search but can't find anything related to this. I'm booting from a USB using Legacy boot.
Legacy = MBR partition table which allows four primary partitions...so it should allow three; check that there aren't other partitions on the disk (try deleting all of them and starting anew). FWIW, you don't need a swap partition, Mint 20.x uses a swap file in the "/" partition. You can also get more than four partitions with an "extended partition" which holds "logical partitions" that mostly act like normal partitions, but you shouldn't need to if you're just making "/" and /home.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
TheCatLady
Level 1
Level 1
Posts: 4
Joined: Mon Sep 20, 2021 7:46 am

Re: Unable to partition SSD

Post by TheCatLady »

Flemur wrote: Mon Sep 20, 2021 10:43 am
TheCatLady wrote: Mon Sep 20, 2021 9:19 am o, I tried using a live session and GParted to partition the drive into /, /Home and swap. However, it gives an error, "Too many Primary Partitions". I did a search but can't find anything related to this. I'm booting from a USB using Legacy boot.
Legacy = MBR partition table which allows four primary partitions...so it should allow three; check that there aren't other partitions on the disk (try deleting all of them and starting anew). FWIW, you don't need a swap partition, Mint 20.x uses a swap file in the "/" partition. You can also get more than four partitions with an "extended partition" which holds "logical partitions" that mostly act like normal partitions, but you shouldn't need to if you're just making "/" and /home.
Thank you for the reply :)

This is a "fresh" drive, brand new, plugged in. I did try deleting and starting over, same result. I also tried just telling Mint to install to the drive, it goes through the whole installation, then near the end it comes up with an error "Can't install Master Boot Record (?) to NVME blah blah, choose another partition".

I have another SSD with Mint 19.3 on it, I wanted to install 20.2 on the new drive so I could dual boot between them, don't know if that caused the problem. I have installed LM 20.2 on that drive now and wiped 19.3. Still can't partition the EVO 970??

Here's the error message from GParted:
GParted 0.30.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2

Shrink /dev/nvme0n1 from 465.76 GiB to 65.04 GiB 00:00:02 ( SUCCESS )

calibrate /dev/nvme0n1 00:00:00 ( SUCCESS )

path: /dev/nvme0n1 (device)
start: 0
end: 976773167
size: 976773168 (465.76 GiB)
check file system on /dev/nvme0n1 for errors and (if possible) fix them 00:00:00 ( SUCCESS )

e2fsck -f -y -v -C 0 '/dev/nvme0n1' 00:00:00 ( SUCCESS )

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

11 inodes used (0.00%, out of 30531584)
0 non-contiguous files (0.0%)
0 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 2/1
2196279 blocks used (1.80%, out of 122096646)
0 bad blocks
1 large file

0 regular files
2 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
------------
2 files
e2fsck 1.44.1 (24-Mar-2018)
shrink file system 00:00:02 ( SUCCESS )

resize2fs -p '/dev/nvme0n1' 68198400K 00:00:02 ( SUCCESS )

Resizing the filesystem on /dev/nvme0n1 to 17049600 (4k) blocks.
Begin pass 3 (max = 3727)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/nvme0n1 is now 17049600 (4k) blocks long.

resize2fs 1.44.1 (24-Mar-2018)
========================================

Create Primary Partition #1 (ext4, 392.71 GiB) on /dev/nvme0n1 00:00:00 ( ERROR )

create empty partition 00:00:00 ( ERROR )
libparted messages ( INFO )

Too many primary partitions.
Sorry for my bad English :P
Aztaroth
Level 5
Level 5
Posts: 769
Joined: Mon Jan 11, 2021 1:48 am

Re: Unable to partition SSD

Post by Aztaroth »

TheCatLady wrote: Mon Sep 20, 2021 9:19 am I'm trying to install LM 20.2 on a new SSD I've just put in. The drive is a Samsung EVO 970 500GB NVMe M2. When I'm in the installer, it won't give me the option of partitioning the drive. So, I tried using a live session and GParted to partition the drive into /, /Home and swap. However, it gives an error, "Too many Primary Partitions". I did a search but can't find anything related to this. I'm booting from a USB using Legacy boot.
Hello,
Had a similar issue with the same SSD model recently bought when I plugged it into my laptop. I'll just check if the issue is exactly the same before giving my recipe (which perhaps won't work in some other case) :
When showing in Gnome Disk Tools, the Partition Table was neither GUID/GPT nor MBR : it was "loop". Is it the same for you ?
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)
TheCatLady
Level 1
Level 1
Posts: 4
Joined: Mon Sep 20, 2021 7:46 am

Re: Unable to partition SSD

Post by TheCatLady »

Aztaroth wrote: Mon Sep 20, 2021 4:55 pm
TheCatLady wrote: Mon Sep 20, 2021 9:19 am I'm trying to install LM 20.2 on a new SSD I've just put in. The drive is a Samsung EVO 970 500GB NVMe M2. When I'm in the installer, it won't give me the option of partitioning the drive. So, I tried using a live session and GParted to partition the drive into /, /Home and swap. However, it gives an error, "Too many Primary Partitions". I did a search but can't find anything related to this. I'm booting from a USB using Legacy boot.
Hello,
Had a similar issue with the same SSD model recently bought when I plugged it into my laptop. I'll just check if the issue is exactly the same before giving my recipe (which perhaps won't work in some other case) :
When showing in Gnome Disk Tools, the Partition Table was neither GUID/GPT nor MBR : it was "loop". Is it the same for you ?
It says Partition Table: None
I can create a partition, but as soon as I hit Close, it reverts back. ??

I'm going to try and move the drive to the other M2 slot, see if it helps.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Unable to partition SSD

Post by rene »

TheCatLady wrote: Mon Sep 20, 2021 2:10 pm

Code: Select all

[ ... ]
Shrink /dev/nvme0n1 from 465.76 GiB to 65.04 GiB  00:00:02    ( SUCCESS )
[ ... ]
check file system on /dev/nvme0n1 for errors and (if possible) fix them  00:00:00    ( SUCCESS )
[ ... ]    	
e2fsck -f -y -v -C 0 '/dev/nvme0n1'  00:00:00    ( SUCCESS )
[ ... ]    	
Eeeh? /dev/nvme0n1 is the disk and not a partition of such. I.e., a filesystem lives on e.g. /dev/nvme0n1p1. It's possible to have a filesystem live directly on the disk and outside of a partition like that but it's for all practical purposes an error and I'm not at all surprised that it confuses the installer and/or gparted.

If indeed that's what happening here simply wiping the filesystem signature from the drive may be all there's to it. Very, very careful with the below: you need to be sure to have the correct "/dev/nvme0n1" and especially since you just said something about switching slots. I'll uppercase the name so as to force you to think about and put in the right device name, but you should from a terminal on the live/installer system just be able to do e.g.

Code: Select all

sudo dd if=/dev/zero of=/dev/NVME0N1 bs=1M count=1
to zero out the first 1M of the drive. After that, installer and/or gparted should it seems be much happier.

Again, careful to have the right device; if you zero out the first M of the wrong one you destroy(-ish) your installation.
TheCatLady
Level 1
Level 1
Posts: 4
Joined: Mon Sep 20, 2021 7:46 am

Re: Unable to partition SSD

Post by TheCatLady »

rene wrote: Mon Sep 20, 2021 7:10 pm
TheCatLady wrote: Mon Sep 20, 2021 2:10 pm

Code: Select all

[ ... ]
Shrink /dev/nvme0n1 from 465.76 GiB to 65.04 GiB  00:00:02    ( SUCCESS )
[ ... ]
check file system on /dev/nvme0n1 for errors and (if possible) fix them  00:00:00    ( SUCCESS )
[ ... ]    	
e2fsck -f -y -v -C 0 '/dev/nvme0n1'  00:00:00    ( SUCCESS )
[ ... ]    	
Eeeh? /dev/nvme0n1 is the disk and not a partition of such. I.e., a filesystem lives on e.g. /dev/nvme0n1p1. It's possible to have a filesystem live directly on the disk and outside of a partition like that but it's for all practical purposes an error and I'm not at all surprised that it confuses the installer and/or gparted.

If indeed that's what happening here simply wiping the filesystem signature from the drive may be all there's to it. Very, very careful with the below: you need to be sure to have the correct "/dev/nvme0n1" and especially since you just said something about switching slots. I'll uppercase the name so as to force you to think about and put in the right device name, but you should from a terminal on the live/installer system just be able to do e.g.

Code: Select all

sudo dd if=/dev/zero of=/dev/NVME0N1 bs=1M count=1
to zero out the first 1M of the drive. After that, installer and/or gparted should it seems be much happier.

Again, careful to have the right device; if you zero out the first M of the wrong one you destroy(-ish) your installation.
Thank you so much! That did the trick :D I wonder why it was doing that? But it's all good now, managed to partition the drive like I wanted to, thanks.
Aztaroth
Level 5
Level 5
Posts: 769
Joined: Mon Jan 11, 2021 1:48 am

Re: Unable to partition SSD

Post by Aztaroth »

rene wrote: Mon Sep 20, 2021 7:10 pm If indeed that's what happening here simply wiping the filesystem signature from the drive may be all there's to it. Very, very careful with the below: you need to be sure to have the correct "/dev/nvme0n1" and especially since you just said something about switching slots. I'll uppercase the name so as to force you to think about and put in the right device name, but you should from a terminal on the live/installer system just be able to do e.g.
Nice to see your tip solved the OP's issue. I wasn't sure we had the same problem, that's why I didn't post my recipe at first (I'm still not sure). I also couldn't do anything with Gnome Disks Tool or gparted, but the CLI version of parted seemed less restricted :

- first, I ran parted in sudo mode (sbc was the Samsung SSD)

Code: Select all

sudo parted /dev/sdc
after the (parted) prompt :

Code: Select all

mklabel gpt
checked with

Code: Select all

print
the partition table was gpt indeed.

And Gnome Disks Tool could be used to manage partitions as I wished.

I would be grateful I you'd share some advises or critics about the method.
dual boot LMDE4 (mostly) + LM19.3 Cinnamon (sometimes)
Locked

Return to “Installation & Boot”