[ Solved ] cannot access partition in Terminal

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
tgar
Level 1
Level 1
Posts: 23
Joined: Thu Apr 02, 2015 3:15 pm

[ Solved ] cannot access partition in Terminal

Post by tgar »

I have a dual boot laptop: Windows-10 and Linux Mint Cinnamon 19.1

The laptop has two internal SSD. One SSD has both operating systems. The second SSD has two partitions for data: smaller formatted ext4, larger partition formatted ntfs.

The problem I am facing now is that I cannot access the data partitions on the second SSD from terminal. Specifically, I am trying to access /dev/nvme0n1p2. (GUI file manager...no problem.)

The partition I am trying to access now is: nvme0n1p2

I confirmed that the data SSD is mounted by the key symbol in GParted and from the terminal commands referenced below.

I am new to Linux. I appreciate your advice & assistance.

tom@lm:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 260M 0 part /boot/efi
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 136.4G 0 part
├─sda4 8:4 0 511M 0 part
└─sda5 8:5 0 101.3G 0 part /
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 68.4G 0 part /media/tom-1
└─nvme0n1p2 259:2 0 408.6G 0 part /media/tom

tom@lm:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 3920368 0 3920368 0% /dev
tmpfs 790348 1500 788848 1% /run
/dev/sda5 104023904 9846752 88849948 10% /
tmpfs 3951732 57480 3894252 2% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 3951732 0 3951732 0% /sys/fs/cgroup
/dev/nvme0n1p1 70030768 53060 66377324 1% /media/tom-1
/dev/nvme0n1p2 428425212 147064 428278148 1% /media/tom
/dev/sda1 262144 49772 212372 19% /boot/efi
tmpfs 790344 60 790284 1% /run/user/1000

GParted
gparted.odt
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
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: cannot access partition in Terminal

Post by catweazel »

tgar wrote: Sat Mar 23, 2019 12:36 pm The problem I am facing now is that I cannot access the data partitions on the second SSD from terminal. Specifically, I am trying to access /dev/nvme0n1p2. (GUI file manager...no problem.)

The partition I am trying to access now is: nvme0n1p2

Code: Select all

tom@lm:~$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 238.5G  0 disk 
├─sda1        8:1    0   260M  0 part /boot/efi
├─sda2        8:2    0    16M  0 part 
├─sda3        8:3    0 136.4G  0 part 
├─sda4        8:4    0   511M  0 part 
└─sda5        8:5    0 101.3G  0 part /
nvme0n1     259:0    0   477G  0 disk 
├─nvme0n1p1 259:1    0  68.4G  0 part /media/tom-1
└─nvme0n1p2 259:2    0 408.6G  0 part /media/tom
You cannot access a block device by accessing the block device itself. You access it through its mount point. For the device /dev/nvme0n1p2, you access it via /media/tom. For example:

ls -l /dev/nvme0n1p2 is incorrect.

ls -l /media/tom is correct.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
tgar
Level 1
Level 1
Posts: 23
Joined: Thu Apr 02, 2015 3:15 pm

Re: cannot access partition in Terminal

Post by tgar »

Thanks for your response,

Sitting in my home directory, here is what I get for the command ls -l /media/tom

tom@lm:~$ ls -l /media/tom
total 4556
drwxrwxrwx 1 tom tom 4096 Mar 20 11:46 4A1AA9C11AA9AB01
-rwxrwxrwx 1 root root 8149 Mar 23 19:33 doc-2.odt
-rwxrwxrwx 1 root root 19666 Mar 22 14:15 'how to install veracrypt.odt'
-rwxrwxrwx 1 root root 19371 Mar 21 19:54 'notes to install Vera.odt'
drwxrwxrwx 1 root root 0 Mar 18 10:42 '$RECYCLE.BIN'
drwxrwxrwx 1 root root 0 Mar 18 10:41 'System Volume Information'
-rwxrwxrwx 1 root root 9216 Feb 19 20:34 'Untitled 1.doc'
-rwxrwxrwx 1 root root 4599055 Sep 12 2018 veracrypt-1.23-setup-gui-x64

4A1AA9C11AA9AB01 is a partition on SDA3 which is used for OS

As the following blkid shows, 2CEE3B70EE3B3206 is the partition on the 2nd SSD to which I am trying to copy a file.

tom@lm:~$ blkid
/dev/nvme0n1p1: LABEL="vol 68" UUID="3e3559e6-c3f2-4754-b2a2-2911e9204a5b" TYPE="ext4" PARTLABEL="ext4 partition" PARTUUID="eaaec947-4f50-48bc-a293-1bac82ee2b2f"
/dev/nvme0n1p2: LABEL="vol 408" UUID="2CEE3B70EE3B3206" TYPE="ntfs" PARTLABEL="ntfs data partition" PARTUUID="6c88a22d-2253-49f8-9c83-c13c52e94036"
/dev/sda1: LABEL="SYSTEM" UUID="3AA9-2205" TYPE="vfat" PARTLABEL="SYSTEM" PARTUUID="4b274f16-9cf7-4183-8079-487f098260b8"
/dev/sda3: UUID="4A1AA9C11AA9AB01" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="9503dabd-5508-4642-867e-41ba77bf3948"
/dev/sda4: LABEL="WinRE" UUID="4008A8FC08A8F258" TYPE="ntfs" PARTLABEL="WinRE" PARTUUID="49e0b245-04c2-4fea-b898-dd75c02c57f6"
/dev/sda5: UUID="267cccc2-6e24-4f18-aba7-632b37a744b4" TYPE="ext4" PARTUUID="8033ff23-0f45-42e8-9697-4fe82dd2dae6"

Anyway, when I try to copy a file from my home directory on the first SSD to the ntfs partition on the 2nd SSD, here is what I get. Maybe my command is wrong. I don't know.

tom@lm:~/Documents$ cp test5.odt /media/tom/nvme0n1p2/test5.odt
cp: cannot create regular file '/media/tom/nvme0n1p2/test5.odt': No such file or directory

Thanks again.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: cannot access partition in Terminal

Post by catweazel »

tgar wrote: Sat Mar 23, 2019 8:49 pm tom@lm:~/Documents$ cp test5.odt /media/tom/nvme0n1p2/test5.odt
cp: cannot create regular file '/media/tom/nvme0n1p2/test5.odt': No such file or directory

Code: Select all

cp test5.odt /media/tom/
or

Code: Select all

cp test5.odt /media/tom/some.other.name.odt
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
tgar
Level 1
Level 1
Posts: 23
Joined: Thu Apr 02, 2015 3:15 pm

Re: cannot access partition in Terminal

Post by tgar »

Ta Da

what I needed to do was do what you said !

tom@lm:~/Documents$ cp test5.odt /media/tom/test5.odt
tom@lm:~/Documents$

Thank you.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: cannot access partition in Terminal

Post by catweazel »

tgar wrote: Sat Mar 23, 2019 9:44 pm Thank you.
It's a pleasure.

Cheers.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Locked

Return to “Hardware Support”