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



## dp_pan (Mar 4, 2020)

Hi,guys:
   I got the problem. when I input: `mount  /dev/ada0p1 /u`, I got problem with mount: /dev/ada0p1: No such file or directory. Can anybody know this issue.  there is my base info.

```
root@dpt470p:/var/log # gpart list ada0
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 976773127
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
   Mediasize: 500107821056 (466G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 20480
   Mode: r0w0e0
   efimedia: HD(1,GPT,9698f108-8081-11e9-93ae-54e1ad773bfc,0x28,0x3a385fe0)
   rawuuid: 9698f108-8081-11e9-93ae-54e1ad773bfc
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
   label: (null)
   length: 500107821056
   offset: 20480
   type: freebsd-ufs
   index: 1
   end: 976773127
   start: 40
Consumers:
1. Name: ada0
   Mediasize: 500107862016 (466G)
   Sectorsize: 512
   Mode: r0w0e0

root@dpt470p:/var/log # gpart status ada0
  Name  Status  Components
ada0p1      OK  ada0

root@dpt470p:/var/log # lsblk ada0
DEVICE         MAJ:MIN SIZE TYPE                          LABEL MOUNT
ada0             0:101 466G GPT                               - -
  ada0p1         0:102 466G freebsd-ufs    gptid/9698f108-8081-11e9-93ae-54e1ad773bfc -
```

thx


----------



## SirDice (Mar 4, 2020)

What does `file -s /dev/ada0p1` show?


----------



## VladiBG (Mar 4, 2020)

Did you have "/u" folder which will act as mountpont.

Is your /dev/ada0p1 new partition? If it's new and you don't have any data on it you can create the file system (format) it with `newfs –U  –S 4096 /dev/ada0p1` (this will erase all the data and format it as UFS).


----------



## dp_pan (Mar 5, 2020)

SirDice said:


> What does `file -s /dev/ada0p1` show?


the show is :
root@dpdesktop:/home/david # file -s /dev/ada2p1 
/dev/ada2p1: data


----------



## dp_pan (Mar 5, 2020)

I


VladiBG said:


> Did you have "/u" folder which will act as mountpont.
> 
> Is your /dev/ada0p1 new partition? If it's new and you don't have any data on it you can create the file system (format) it with `newfs –U  –S 4096 /dev/ada0p1` (this will erase all the data and format it as UFS).


I have the u dir,and this disk is not new partition, there are data on the disk. I reinstall the bsd 12 on other disk , when I remount the disk, the problem is there.


----------



## dp_pan (Mar 5, 2020)

and another thing, in Gparted interface this disk shows ZFS partition.


----------



## VladiBG (Mar 5, 2020)

Strange the type of the partition reported by gpart is freebsd-ufs and the actual type is freebsd-zfs.
What is the output of `zdb -l /dev/ada0p1`

Is this disk previously used on FreeBSD with ZFS or you edited the partition manually in Gparted  ?


----------



## dp_pan (Mar 5, 2020)

VladiBG said:


> Strange the type of the partition reported by gpart is freebsd-ufs and the actual type is freebsd-zfs.
> What is the output of `zdb -l /dev/ada0p1`
> 
> Is this disk previously used on FreeBSD with ZFS or you edited the partition manually in Gparted  ?



root@dpdesktop:/home/david # zdb -l /dev/ada2p1 
------------------------------------
LABEL 0
------------------------------------
failed to unpack label 0
------------------------------------
LABEL 1
------------------------------------
failed to unpack label 1
------------------------------------
LABEL 2
------------------------------------
failed to unpack label 2
------------------------------------
LABEL 3
------------------------------------
failed to unpack label 3

this disk previously used on FreeBSD with UFS,and I do not edited the partition, The Gparted's version is 1.0


----------



## VladiBG (Mar 5, 2020)

ok so there's no zpool on /dev/ada2p1
Did you try to run `fsck` on that partition?


----------



## SirDice (Mar 5, 2020)

There's no UFS there either, file(1) says it's data. Something got seriously corrupted here. I'm not sure if this is recoverable. dp_pan was there anything important on the disk?


----------



## VladiBG (Mar 5, 2020)

I'm pretty sure that partition information was overwritten by some software or the disk has bad blocks. Can you tell us the whole story of this disk.

You can use sysutils/testdisk to scan and recovery the partition information. By default it should be with EFI GPT partition map with FreeBSD UFS - UFS 2 - Little Endian


----------



## dp_pan (Mar 5, 2020)

ok, guys, first, thanks anybody's help. 
and I tell you the whole thing about this disk.  Before I run FreeBSD 12.0 on my ssd, the boot partition is UFS, BSD, this disk save my data, the partition is UFS, GPT . One day, because some reason I need reinstall windows 10 on my ssd, I do not remove the data's disk physical, meanwhile I do not any operate. Later I reinstall FreeBSD 12.1 on my ssd, as you can see, the situation is like this. Before some operate, like reinstall the boot disk, remount the data's disk, these operate are often done. I don't understand.

I have been running fsck,
the show is:
root@dpdesktop:/home/david # fsck -y /dev/ada2p1 
Can't open /dev/ada2p1: No such file or directory


----------



## SirDice (Mar 5, 2020)

dp_pan said:


> Before I run FreeBSD 12.0 on my ssd, the boot partition is UFS, BSD, this disk save my data, the partition is UFS, GPT .


Maybe I'm misunderstanding you but you cannot have a bsdlabel(8) partition with the GPT partitioning scheme. It's either MBR with slices and partitions (the "old school" way) OR GPT and partitions. Or are we talking about _two_ different disks?


----------



## VladiBG (Mar 5, 2020)

Actually you can have GPT partition scheme with freebsd-ufs partition and inside this freebsd-ufs partition you can have MBR with slices. It's sounds odd and it's not correct to have this but it's possible.
dp_pan install testdisk and then use it to scan the partitions on the disk. IF it found the partitions as Solaris then select the partition and change the type using "t" to FreeBSD UFS and then select UFS2 Little-Endian. Keep in mind that this will write to the disk and will overwrite the current partition information which may lead to data lost. So if you have another free disk where you can make a disk image with dd will be good.


----------



## dp_pan (Mar 5, 2020)

SirDice said:


> Maybe I'm misunderstanding you but you cannot have a bsdlabel(8) partition with the GPT partitioning scheme. It's either MBR with slices and partitions (the "old school" way) OR GPT and partitions. Or are we talking about _two_ different disks?


Sorry, it is my mistake, my boot disk is UFS2, GPT


----------



## dp_pan (Mar 5, 2020)

VladiBG said:


> Actually you can have GPT partition scheme with freebsd-ufs partition and inside this freebsd-ufs partition you can have MBR with slices. It's sounds odd and it's not correct to have this but it's possible.
> dp_pan install testdisk and then use it to scan the partitions on the disk. IF it found the partitions as Solaris then select the partition and change the type using "t" to FreeBSD UFS and then select UFS2 Little-Endian. Keep in mind that this will write to the disk and will overwrite the current partition information which may lead to data lost. So if you have another free disk where you can make a disk image with dd will be good.


Very thank you  about your suggest, I will follow your advise, I will try this way


----------



## lapagalia (Oct 12, 2021)

Hello
I have the same problem.
On my computer I have installed Linux Manjaro and also GhostBSD. What I want is to mount on GhostBSD the Linux and access its data.
Linux is on the device /dev/nvd0 (nvd0p1, nvd0p2). I have created a directory in /home/user/Manjaro and tried to mount it on it, but I get error: "No such file or directory".
The command file -s /dev/nvd0p2 gives the following output:

`/dev/nvd0p2: Linux rev 1.0 ext4 filesystem data, UUID=c65de41f-446c-491b-a0df-82d6409b6774 (extents) (64bit) (large files) (huge files)`.

Can anyone help me?
Thanks.


----------



## VladiBG (Oct 12, 2021)

GhostBSD is not supported on this forum.









						GhostBSD, pfSense, TrueNAS, and all other FreeBSD Derivatives
					

Questions about 'derivative FreeBSDs', like  GhostBSD DesktopBSD TrueNAS XigmaNAS OPNsense pfSense PacBSD BSD Router Project NomadBSD helloSystem  should be asked on the forums and/or mailing lists for these specific products. See below for links.  If you still think your questions should be...




					forums.freebsd.org


----------



## lapagalia (Oct 12, 2021)

I apologize, but I think the problem has the same solution in GhostBSD as in FreeBDS, or am I wrong? I would appreciate some help.
(By the way, I have tried several times to install FreeBSD and failed every time. I have not been able to boot the GUI in any case).


----------



## VladiBG (Oct 12, 2021)

mount(8) doesn't recognize the type of the filesystem. You can use read-only ext4 implementation for FUSE sysutils/fusefs-ext4fuse or for read/write sysutils/fusefs-ext2


----------



## grahamperrin@ (Oct 13, 2021)

lapagalia said:


> not been able to boot the GUI



Please open a separate topic for this. Thanks.


----------



## bsduck (Oct 13, 2021)

VladiBG said:


> You can use read-only ext4 implementation for FUSE sysutils/fusefs-ext4fuse or for read/write sysutils/fusefs-ext2


... or just use ext2fs(5) which comes with the base system:

`kldload ext2fs` to load the module first, then you can use `mount -t ext2fs`


----------



## First_Law_of_Unix (Nov 16, 2022)

lapagalia said:


> Hello
> I have the same problem.
> On my computer I have installed Linux Manjaro and also GhostBSD. What I want is to mount on GhostBSD the Linux and access its data.
> Linux is on the device /dev/nvd0 (nvd0p1, nvd0p2). I have created a directory in /home/user/Manjaro and tried to mount it on it, but I get error: "No such file or directory".
> ...



I have the exact same issue as well when using the "file -s" command...

When mounting I get this error:
`mount -t ext2fs /dev/da0p1 /mnt/volume2`


```
mount: /dev/da0p1: Input/output error
```

However I created an ext4 file system on FreeBSD using gpart and mke2fs for a USB SSD thumb drive.


----------



## First_Law_of_Unix (Nov 16, 2022)

VladiBG said:


> mount(8) doesn't recognize the type of the filesystem. You can use read-only ext4 implementation for FUSE sysutils/fusefs-ext4fuse or for read/write sysutils/fusefs-ext2


How do you mount after installing sysutils/fusefs-ext2?

Thanks.

EDIT:

`fuse-ext2 /dev/da0p1 /mnt/volume3 -o rw+`

This doesn't do anything, the file path at "/mnt/volume3" disappears on KDE... 

But it does show up on terminal using "ls".


----------

