Solved argggg: how to mount USB port ro and run fsck properly?

I got automount, it tells me i need to run fsck I mount it to /mnt it tells me hahaha nope!

Code:
[userx@FreeBSD ~]$ sudo fsck /dev/da0s2
Can't open /dev/da0s2: No such file or directory
[userx@FreeBSD ~]$ sudo fsck /dev/da0s2
Can't open /dev/da0s2: No such file or directory
mount it ro
Code:
[userx@FreeBSD ~]$ sudo mount  -t ext2fs  -o ro /dev/da0s2  /mnt
[userx@FreeBSD ~]$ sudo fsck /dev/da0s2
Can't open /dev/da0s2: No such file or directory
[userx@FreeBSD ~]$ ls /mnt
$RECYCLE.BIN
11 Mickey.wma
......
nope.
Code:
[userx@FreeBSD ~]$ mount
/dev/nvd0p9 on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
map -hosts on /net (autofs)
map -media on /media (autofs)
/dev/fuse on /usr/home/userx/.gvfs (fusefs, nosuid, mounted by userx)
/dev/ada0p2 on /media/data (ext2fs, asynchronous, local, noatime, nosuid, automounted)
/dev/da0s2 on /mnt (ext2fs, local, read-only)
last line is what I am trying to run fsck on.

Code:
[userx@FreeBSD ~]$ sudo fsck /mnt
Can't open /dev/da0s2: No such file or directory

if I ls /mnt it shows me its contents on the usb hdd.

if I try to mount it rw
Code:
[userx@FreeBSD ~]$ sudo umount /mnt
[userx@FreeBSD ~]$ sudo mount  -t ext2fs  -o rw /dev/da0s2  /mnt
mount: /dev/da0s2: Operation not permitted
 
Install sysutils/e2fsprogs (it contains e2fsck(8)). The standard FreeBSD fsck(8) only supports UFS and msdosfs(5) (fsck_ufs(8), fsck_msdosfs(8)).

I thought I remembered doing a fsck on ext2fs before in a different install on a different laptop. I did however run gparted check disk in it in Linux and came back and still got the same error.

I did this, off this page I added the relevant to ntfs and ext2fs . this is a new used laptop btw, hp 840 g3. so it is a little different then my g2 sound card I know is anyways. Intel i7-6600U (4) @ 2.808GHz Skylake GT2 [HD Graphics 520] .. Just thought I put that part in one of these help me post.
https://vermaden.wordpress.com/2018/10/11/freebsd-desktop-part-17-automount-removable-media/
With this now being a fresh install . it automounts the onboard hdd's partitions I have yet to egt aorund to ubs ports. that is comming up next to see if it will mount that one drive w/o errors.
 
Other than what SirDice already said (you have to have a fsck program for the correct file system type installed), there is another issue.

You complain about the error message:
Code:
$ sudo mount  -t ext2fs  -o ro /dev/da0s2  /mnt
$ sudo fsck /dev/da0s2
Can't open /dev/da0s2: No such file or directory
Did you check whether /dev/da0s2 actually does exist? My educated guess is that it doesn't actually exist. If you do a "ls /dev" at that time, you would probably find that you don't find da0s2. Here's why: When mounting a special device, the special device typically vanishes from /dev, and that's a deliberate choice.

Suggestion: Next time you get an error message, actually read it. This error message was very clear: There is no such file or directory as /dev/da0s2. All the singing and dancing about other topics (like what is mounted at /mnt and what is inside the mount point and such) is not relevant to the error message.
 
Other than what SirDice already said (you have to have a fsck program for the correct file system type installed), there is another issue.

You complain about the error message:
Code:
$ sudo mount  -t ext2fs  -o ro /dev/da0s2  /mnt
$ sudo fsck /dev/da0s2
Can't open /dev/da0s2: No such file or directory
Did you check whether /dev/da0s2 actually does exist? My educated guess is that it doesn't actually exist. If you do a "ls /dev" at that time, you would probably find that you don't find da0s2. Here's why: When mounting a special device, the special device typically vanishes from /dev, and that's a deliberate choice.

Suggestion: Next time you get an error message, actually read it. This error message was very clear: There is no such file or directory as /dev/da0s2. All the singing and dancing about other topics (like what is mounted at /mnt and what is inside the mount point and such) is not relevant to the error message.
well I mounted it, then did ls /mnt it showed the contents of the hdd so yeah it is there.
in the second code post
Code:
[userx@FreeBSD ~]$ sudo mount  -t ext2fs  -o ro /dev/da0s2  /mnt
[userx@FreeBSD ~]$ sudo fsck /dev/da0s2
Can't open /dev/da0s2: No such file or directory
[userx@FreeBSD ~]$ ls /mnt
$RECYCLE.BIN
11 Mickey.wma
......
ls showing it is mounted to /dev/da0s2 read only

I ran gparted check on it again and just got into it. So I am marking this solved.
 
Back
Top