Can not mount Toshiba external HD [half solved]

Share your ideas, questions or suggestions with us here.
User avatar
slughorn
Posts: 135
Joined: Mon Oct 02, 2017 2:55 pm

Re: Can not mount Toshiba external HD [half solved]

Post by slughorn »

It seems that this issue is connected with GUI?
How can I persuade the GUI to play with us?
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Can not mount Toshiba external HD [half solved]

Post by ericbsd »

The UI can't mount NTFS, due to the lakes of supports of NTFS in the FreeBSD kernel, and I am looking to an alternative to gnome-automount.
User avatar
slughorn
Posts: 135
Joined: Mon Oct 02, 2017 2:55 pm

Re: Can not mount Toshiba external HD [half solved]

Post by slughorn »

I have plaid arount.
With
# ntfs-3g /dev/da4s1 /mnt
I can mount my external device.
It is also shown within caja on the left side underneath: devices.
If I go with the mouse on it, it sais: "can not mount."
BUT: If I go with in caja up to the file system / and than click on
/mnt
Now I got access to all my backups. So I'm lucky;-)
The question is: where is the bug?
The same think happens also with Thunar.
User avatar
ericbsd
Developer
Posts: 2052
Joined: Mon Nov 19, 2012 7:54 pm

Re: Can not mount Toshiba external HD [half solved]

Post by ericbsd »

It is not a bug! Caja track /media and not /mnt, and the lake of supports of mount ntfs in FreeBSD kernel cause the problem.
Ian_Robinson
Posts: 7
Joined: Sat Dec 07, 2019 9:53 am

Re: Can not mount Toshiba external HD [half solved]

Post by Ian_Robinson »

Update on mounting disks from terminal. Commands are in bold. Added annotations are indicated by <=====

1. Why did Slughorn have a problem opening his files after successfully mounting them?

Perhaps he could not access his files because he did not have ownership or permissions.

Slughorn's output from #gpart show:

63 1953525101 da4 MBR (932G) <== da4 is an MBR disk of 932G
63 206785 - free - (101M)
206848 1953315840 1 ntfs [active] (931G) <== slice "1" (i.e., "s1") is formatted ntfs

So his command line entry (# ntfs-3g /dev/da4s1 /mnt) was correct because he used the correct command (# ntfs-3g) had the right target disk and slice (/dev/da4s1) and he identified the mount point (/mnt)

Slughorn stated he could see the files while in a terminal, but he could not see the files in his desktop file manager. I wonder if the reason he could see the files on his disk while in terminal is because he was the root user (he had the # prompt). On the other hand, he was likely the "normal" user when using his desktop. If the /mnt directory and the files belonged to the root user, he would not be able to open them as the regular user. Files cannot be accessed if you are not the owner or if you lack permissions.

To confirm who owns the directories and files,
1. He could go to terminal and become root (command is % su plus the root password when prompted)
2. Next, he would cd /mnt (change to his target directory), and
3. Enter the command ls -ltr. The command "ls -ltr" shows the type of file (directory vs. file) the permissions (-rw-r==r==), the owner (in this example, "ir"), and the group (wheel).
4. He should be able to open the directory or the file if he is the owner (or if the owner has granted the normal owner permissions),

See the sample output of the ls -ltr command below where some files are owned by root and some are owned by normal user "ir":

root@ir:/home/ir # ls -ltr
total 53550
-rw------- 1 ir wheel 301 Jan 15 18:17 .mail_aliases
-rw-r--r-- 1 ir wheel 91 Jan 15 18:17 .login_conf
-rw-r--r-- 1 ir wheel 983 Jan 15 18:17 .cshrc
-rw-r--r-- 1 ir wheel 782 Jan 15 18:17 .shrc
-rw-r--r-- 1 ir wheel 941 Jan 15 18:17 .profile
-rw-r--r-- 1 ir wheel 323 Jan 15 18:17 .login
-rw-r--r-- 1 ir wheel 267 Jan 15 18:17 .mailrc
--- long list of entries cut out ---
drwxr-xr-x 2 ir wheel 2 Jan 15 18:22 Public
drwxr-xr-x 2 ir wheel 2 Jan 15 18:22 Music
drwxr-xr-x 2 ir wheel 2 Jan 15 18:22 Pictures
drwxr-xr-x 2 ir wheel 2 Jan 15 18:22 Videos
drwxr-xr-x 2 ir wheel 3 Jan 15 18:23 Desktop
-rw-r--r-- 1 root wheel 14178 Jan 15 18:25 Xorg.0.log.old
-rw-r--r-- 1 root wheel 45428 Jan 15 18:25 Xorg.0.log
-rw-r--r-- 1 root wheel 13629 Jan 16 04:47 dmesg_from_installation.txt
drwx------ 4 ir wheel 4 Jan 16 04:54 .mozilla
root@ir:/home/ir

file ownership can be changed with the chown command. See the man page for chown (# man chown) or the FreeBSD Handbook

2. More information on determining slices:

As stated above, " . . . you need to identify which "slice" of the disk to mount."

Although the it did for Slughorn, the command #gpart show will list the disks and the type of filesystem, i.e. freebsd, ntfs, etc., but "gpart show" will not necessarily identify whether to use "s" or "p" in the mount command (as in da1s1 vs. da1p1, da2s1 vs. da2p1, etc.).

The use of "s" vs. "p" in the disk identifier depends on whether your disk has an MBR or a GUID ("GPT") Partition Table. The command, "gpart list" will help you a lot. MBR disks will use "p" to designate the type of slice, while GPT disks will use the "p" designation. See the paragraphs below:

Here is an annotated sample output showing the slices on a GPT disk and a USB thumb drive:

root@ir:~ # gpart list

Geom name: da0 <== This disk is a GPT based SATA hard disk
Mediasize: 262144 (256K) <======= Size of size of slice to check against what you think is the target
--- details cut out ---
scheme: GPT

Providers:
1. Name: da0p1 <======= Full ID of the slice
--- details cut out ---
type: freebsd-boot <======= Type of file system
index: 1 <======= Index # (Slice #) This # corresponds to the slice # as in da0p1 (slice 1)
--- details cut out ---

2. Name: da0p2 <======= Full ID of the slice
Mediasize: 597440856064 (556G) <======= size of slice to check against what you think is the target
--- details cut out ---
type: freebsd-zfs <======= Type of file system -- will let you know what type of mount command to use
index: 2 <======= Index# / Slice #
--- details cut out ---

3. Name: da0p3 <======= ID of slice
--- details cut out ---
type: freebsd-swap <======= Type of file system
index: 3 <======= Index # / Slice #
--- details cut out ---


Geom name: da3 <======== This disk is a USB Thumb Drive
--- details cut out ---
scheme: MBR <======== This USB dirve is an MBR disk

Providers:
1. Name: da3s1 <======= Full ID of slice. It is an MBR disk, so it uses "s"
Mediasize: 30962417664 (29G) <======= Size of size of slice to check against what you think is the target
--- details cut out ---
type: fat32lba <======= Type of file system -- will let you know what type of mount command to use
index: 1
--- details cut out ---
root@ir:~ #


I hope this helps.
User avatar
slughorn
Posts: 135
Joined: Mon Oct 02, 2017 2:55 pm

Re: Can not mount Toshiba external HD [half solved]

Post by slughorn »

Thanks. I have stated already (see above) that I have access via caja and thunar only if I go directory tree up until /mnt. This happens if I write the code I mentioned above.
I have no access if I click on the device directly. And I get than an error message. But I can live with it.
But thanks.
Post Reply