# mount /dev/ada0p1 no such file or directory freebsd



## ahmadreza (Apr 14, 2022)

Hello
I try to mount my partition but I am justified by the error I mentioned in the title

I even searched and got help from the form below, but since I am new, I did not find anything

I got "mount: /dev/ada0p1: No such file or directory" problem

I tried the following command and got the following output:

`file -s /dev/ada0p1`
`/dev/ada0p1: Linux rev 1.0 ext4 filesystem data, UUID=3b46bb1b-b750-4da4-975e-a717d01f2097 (extents) (64bit) (large files) (huge files)`


_____________________________________________

`zdb -l /dev/ada0p1`


`failed to unpack label 0
failed to unpack label 1
failed to unpack label 2
failed to unpack label 3`

please guide me
Thanks


----------



## SirDice (Apr 14, 2022)

Why are you looking for ZFS when file(1) clearly indicates it's a Linux ext4 partition?


----------



## ahmadreza (Apr 14, 2022)

Do you mean that the mount command in freebsd mounts the partitions in zfs, ufs, etc. by default?

Because once I booted freebsd live and tried to mount the root partition of my operating system (freebsd) but I got the following error again
no such file or directory


----------



## jbo (Apr 14, 2022)

Hello & Welcome to this FreeBSD community!

What SirDice is expressing is that the output you get from file(1) is indicating that /dev/ada0p1 is an ext4 partition. Therefore, you also have to mount it as such. zdb(8) is a ZFS command/utility. It won't help you here at all.

I never mounted an ext4 filesystem on FreeBSD so I can't tell you directly how it's done. However, there are several threads/topics on this forum regarding the subject.

If you're not intending to mount an existing ext4 partition but just want to use the drive/partition "natively" within FreeBSD, I'd recommend not formatting ext4 but using either ZFS or UFS instead as those are the first-class citizens within the world of FreeBSD. If you have no good reason to go for UFS I'd recommend going with ZFS.


----------



## SirDice (Apr 14, 2022)

ahmadreza said:


> Do you mean that the mount command in freebsd mounts the partitions in zfs, ufs, etc. by default?


The mount command defaults to UFS unless you tell it otherwise with the `-t` option:

```
-t [no]type[,type ...]
             The argument following the -t is used to indicate the file system
             type.  The type ufs is the default.  The -t option can be used to
             indicate that the actions should only be taken on file systems of
             the specified type.  More than one type may be specified in a
             comma separated list.  The list of file system types can be
             prefixed with no to specify the file system types for which
             action should not be taken.  For example, the mount command:

                   mount -a -t nonfs,nullfs

             mounts all file systems except those of type NFS and NULLFS.

             The default behavior of mount is to pass the -t option directly
             to the nmount(2) system call in the fstype option.

             However, for the following file system types: cd9660, mfs,
             msdosfs, nfs, nullfs, smbfs, udf, and unionfs mount will not call
             nmount(2) directly and will instead attempt to execute a program
             in /sbin/mount_type where type is replaced by the file system
             type name.  For example, nfs file systems are mounted by the
             program /sbin/mount_nfs.

             Most file systems will be dynamically loaded by the kernel if not
             already present, and if the kernel module is available.
```

Because file(1) indicates it's an ext4 partition, you should probably mount it with ext2fs(5).


```
EXAMPLES
     To	mount a	ext2fs volume located on /dev/ada1s1:

	   mount -t ext2fs /dev/ada1s1 /mnt
```


----------

