[SOLVED] NVME ssd no access

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
iiro_k
Level 1
Level 1
Posts: 7
Joined: Tue Nov 30, 2021 2:35 pm

[SOLVED] NVME ssd no access

Post by iiro_k »

So, built a new computer and booted from a previous SSD which had the Linux installed. The system clearly sees the SSD, but gives me no access to it.

Running the lsblk gives me this

Code: Select all

 iiro@iiro-Z97P-D3:~$ lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0     7:0    0     4K  1 loop /snap/bare/5
loop1     7:1    0  55,6M  1 loop /snap/core18/2620
loop2     7:2    0 114,9M  1 loop /snap/core/13741
loop3     7:3    0 313,5M  1 loop /snap/cura-slicer/88
loop4     7:4    0  55,6M  1 loop /snap/core18/2566
loop5     7:5    0 157,8M  1 loop /snap/freemind/4
loop6     7:6    0  63,2M  1 loop /snap/core20/1695
loop7     7:7    0  81,3M  1 loop /snap/gtk-common-themes/1534
loop8     7:8    0   115M  1 loop /snap/core/13886
loop9     7:9    0  62,3M  1 loop /snap/istekram/12
loop10    7:10   0 164,8M  1 loop /snap/gnome-3-28-1804/161
loop11    7:11   0 346,3M  1 loop /snap/gnome-3-38-2004/119
loop12    7:12   0 162,9M  1 loop /snap/gnome-3-28-1804/145
loop13    7:13   0 346,3M  1 loop /snap/gnome-3-38-2004/115
loop14    7:14   0   140K  1 loop /snap/gtk2-common-themes/13
loop15    7:15   0 424,2M  1 loop /snap/kde-frameworks-5-qt-5-15-3-core20/8
loop16    7:16   0    99M  1 loop /snap/shotcut/872
loop17    7:17   0    20K  1 loop /snap/hello-world/29
loop18    7:18   0 164,2M  1 loop /snap/polar-bookshelf/86
loop19    7:19   0    99M  1 loop /snap/shotcut/875
loop20    7:20   0 230,5M  1 loop /snap/riseup-vpn/179
loop21    7:21   0 130,3M  1 loop /snap/teams-insiders/10
loop22    7:22   0 189,6M  1 loop /snap/audacity/1032
loop23    7:23   0 313,5M  1 loop /snap/cura-slicer/90
loop24    7:24   0 320,4M  1 loop /snap/vlc/3078
loop25    7:25   0 104,6M  1 loop /snap/kdenlive/71
loop26    7:26   0 249,1M  1 loop /snap/audacity/1051
loop27    7:27   0   219M  1 loop /snap/gnome-3-34-1804/72
loop28    7:28   0  45,9M  1 loop /snap/snap-store/599
loop29    7:29   0 437,4M  1 loop /snap/kde-frameworks-5-99-qt-5-15-7-core20/3
loop30    7:30   0 295,7M  1 loop /snap/vlc/2344
loop31    7:31   0  91,7M  1 loop /snap/gtk-common-themes/1535
loop32    7:32   0   5,5M  1 loop /snap/solvespace/479
loop33    7:33   0 437,2M  1 loop /snap/kde-frameworks-5-98-qt-5-15-6-core20/9
loop34    7:34   0  45,9M  1 loop /snap/snap-store/592
loop35    7:35   0  62,3M  1 loop /snap/istekram/13
loop36    7:36   0    97M  1 loop /snap/kdenlive/75
loop37    7:37   0  63,2M  1 loop /snap/core20/1634
loop38    7:38   0   219M  1 loop /snap/gnome-3-34-1804/77
loop39    7:39   0     4M  1 loop /snap/solvespace/420
loop40    7:40   0 225,3M  1 loop /snap/riseup-vpn/172
sda       8:0    0 111,8G  0 disk 
├─sda1    8:1    0   512M  0 part 
└─sda2    8:2    0 111,3G  0 part /
nvme0n1 259:0    0 931,5G  0 disk /mnt/nvme-Samsung_SSD_980_1TB_S649NL0T989635K
Nvme is clearly seen on the last row, but i have no idea on what to doo next. Tried fiddling in bios, but no use. It does allow me to access it as a main user, but wont give me any options more then look around. It seems to be set as root.

Any ideas on how to proceed?
Last edited by LockBot on Thu May 11, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
iiro_k
Level 1
Level 1
Posts: 7
Joined: Tue Nov 30, 2021 2:35 pm

Re: NVME ssd no access

Post by iiro_k »

Tried remounting it, no success yet - but lsblk now gives me this on the last rows

Code: Select all

sda       8:0    0 111,8G  0 disk 
├─sda1    8:1    0   512M  0 part 
└─sda2    8:2    0 111,3G  0 part /
nvme0n1 259:0    0 931,5G  0 disk /home/iiro/Asiakirjat/nvme
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: NVME ssd no access

Post by AndyMH »

A bare SSD is going to be blank, use either gparted or disks to create a partition table on it and then create partitions as required.

The drive is not showing any partitions and you cannot mount a drive, if you had any partitions on it they would show as nvme0n1p1, nvme0n1p2, etc.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
iiro_k
Level 1
Level 1
Posts: 7
Joined: Tue Nov 30, 2021 2:35 pm

Re: NVME ssd no access

Post by iiro_k »

So i made a 900Gb partion on the disk and it seemed to work. By running sudo fdisk -l i now get this with all the rest

Code: Select all

Disk /dev/nvme0n1: 931,53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 980 1TB                     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 16384 bytes / 131072 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device         Boot Start        End    Sectors  Size Id Type
/dev/nvme0n1p1       2048 1887438847 1887436800  900G 83 Linux
But still, no access to that partion. Next i tried running sudo mount /dev/nvme0n1p1

Code: Select all

mount: /etc/fstab: parse error at line 14 -- ignored
mount: /etc/fstab: parse error at line 15 -- ignored
mount: /dev/nvme0n1p1: can't find in /etc/fstab
So i tried mounting

Code: Select all

iiro@iiro-Z97P-D3:~$ mount /dev/nvme0n1p1 /mnt/mydrive
mount: only root can do that
iiro@iiro-Z97P-D3:~$ sudo su
...
root@iiro-Z97P-D3:/home/iiro# mount /dev/nvme0n1p1 /mnt/mydrive
mount: /mnt/mydrive: mount point does not exist
so now running lsblk gets me this

Code: Select all

         8:0    0 111,8G  0 disk 
├─sda1      8:1    0   512M  0 part 
└─sda2      8:2    0 111,3G  0 part /
nvme0n1   259:0    0 931,5G  0 disk /home/iiro/Asiakirjat/nvme
└─nvme0n1p1
          259:1    0   900G  0 part 
And to mount all, the error message is gone.

Code: Select all

root@iiro-Z97P-D3:/home/iiro# sudo mount -a
mount: /etc/fstab: parse error at line 14 -- ignored
mount: /etc/fstab: parse error at line 15 – ignored
But still, i no have access and i feel like i am on my wits end on how to proceed. I know i am getting close, but have no idea on how to proceed with this.
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: NVME ssd no access

Post by AndyMH »

You are getting there, but syntax on mount and fstab wrong. You can mount a partition anywhere in the linux filesystem but the mountpoint must exist first. So in your case you need to create the folder /mnt/mydrive. Style points for the mountpoint = all lower case (linux is case sensitive) no spaces = keep it simple. Outside of /home/you and media/you everything else in the filesystem is owned by root so you need admin privileges to do it. The root account is disabled by default in mint (more secure) so you would use sudo to give yourself temporary admin privileges, i.e. sudo mkdir /mnt/mydrive. The GUI way, just open your file manager, navigate to / and right click on /mnt and 'open as root', then you can right click and create new folder.

Accepted practice (can be ignored) is either to mount partitions in /mnt or /media, or if it is a data partition /home/you/somewhere might be more useful, your choice.

Once you have the mountpoint then for fixed internal drives best way is to edit fstab so it mounts on boot. This is an entry in my fstab for an ext4 partition on an internal drive:

Code: Select all

UUID=fb689910-e942-46e1-b03d-e7032e0e36bb	/media/ultrabay       	ext4	  defaults,nofail	0	2
Using the UUID is better than /dev/nvme0n1p1 because device names are not fixed in linux, it depends on what order devices get reported to the system on boot. You get the UUID as an output from blkid. DO NOT try to retype, copy/paste from the terminal.

This is a good intro to fstab:
https://help.ubuntu.com/community/Fstab

The easiest way to edit fstab, open your file manager, navigate to / and right click on /etc and 'open as root', scroll down and double click on fstab to edit*. Always a good idea to make a copy of fstab before you make changes, that way, screw up and the system won't boot, you can boot your mint install stick, open the file manager, navigate to /etc on your system disk, delete fstab and rename the copy.

Yes you can use the mount command, syntax slightly different to fstab, but fstab is the better way. My example is for an ext4 partition, if you use ntfs (or exfat), options are slightly different.

Without all the above, in your file manager (nemo if running cinnamon) the partition should show up in the devices pane on the left as xxGB volume. Click on it to mount. It will mount at /media/you/the_UUID. Not user friendly, so a tip, whenever you create a partition give it a label, e.g. mylabel, then it will show in the file manager as mylabel and mount at /media/you/mylabel.

Any problems report back what you did. If you find that your partition mounts read-only, that is easy to fix.

Final tip - you used a msdos/legacy partition table, that is fine but there are limitations. If you have a drive > 2TB (you don't) you must use a GPT partition table and a legacy partition table is limited to 4 primary partitions.

* quicker, in a terminal xed admin:/etc/fstab change xed to your text editor if not running cinnamon.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Oskar1224
Level 5
Level 5
Posts: 693
Joined: Thu Mar 04, 2021 11:55 am
Location: Quebec, Canada

Re: NVME ssd no access

Post by Oskar1224 »

I will come back with more comments but I'm now on Nemo, I got owners rights and try to create a new directory under/mnt but my question is do I name the new directory fstab or any other name I want like nfmountdisks ?

Or make first a /mnt/fstab directory and under it make nfmountdisks ?

wrong entry, sorry
Last edited by Oskar1224 on Fri Nov 11, 2022 11:39 pm, edited 1 time in total.
Nicolas
Oskar1224
Level 5
Level 5
Posts: 693
Joined: Thu Mar 04, 2021 11:55 am
Location: Quebec, Canada

Re: NVME ssd no access

Post by Oskar1224 »

Sorry also should I delete the existing mounting points I have to avoid confusion? (I will go to Disks utility, select each HDD and select UNMOUNT

wrong entry, sorry
Last edited by Oskar1224 on Fri Nov 11, 2022 11:38 pm, edited 1 time in total.
Nicolas
Oskar1224
Level 5
Level 5
Posts: 693
Joined: Thu Mar 04, 2021 11:55 am
Location: Quebec, Canada

Re: NVME ssd no access

Post by Oskar1224 »

sorry wrong entry
Nicolas
iiro_k
Level 1
Level 1
Posts: 7
Joined: Tue Nov 30, 2021 2:35 pm

Re: NVME ssd no access

Post by iiro_k »

Thank you AndyMH!

Did take some fiddling around, but finally got it. Also if somebody is stuck with the same problem, restarting the computer sometimes does not work - just shut it down wait some time and then restart. Dont know what happens there, but something doesnt click on restart only.

The only remaining issue and the reason why i dont change this to solved yet is, i can only access this nvme as a root. I can see it as a regular user, but it doesnt allow me to copy files to it. Only when i log in to it as root. Any ideas how to change this?
iiro_k
Level 1
Level 1
Posts: 7
Joined: Tue Nov 30, 2021 2:35 pm

Re: NVME ssd no access

Post by iiro_k »

So, moving this to solved. To the last remaining issue, i tried some googling and hitting up terminal but had no luck on changing the rights to the drive. So i went to file manager, access it as a root and changed the priviledges - booted and there we are. Thank you Andy!
User avatar
AndyMH
Level 21
Level 21
Posts: 13759
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: NVME ssd no access

Post by AndyMH »

iiro_k wrote: Mon Nov 14, 2022 3:33 am The only remaining issue and the reason why i dont change this to solved yet is, i can only access this nvme as a root. I can see it as a regular user, but it doesnt allow me to copy files to it. Only when i log in to it as root. Any ideas how to change this?
As an example, if the partition on your nvme drive is mounting at is /media/mylabel, then in a terminal:

Code: Select all

sudo chown $USER:$USER /media/mylabel
this changes ownership of the mountpoint to you.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Storage”