# How to mount freeBSD ufs  ?



## freeink (Mar 28, 2020)

I want mount freeBSD /dev/sda6/ ufs from Linux.

sudo mount -t ufs -o ro,ufstype=sunx86 /dev/sda6  /mnt/solaris

give me errors :  
mount: /mnt/solaris: wrong fs type, bad option, bad superblock on /dev/sda6, missing codepage or helper program, or other error.

device information  as below (dual efi boot)
sudo  fdisk /dev/sda -l


----------



## scottro (Mar 28, 2020)

First you need the ufs module, which I assume you have (though I may be remembering incorrectly as to the error message)
Then I believe it's `ufstype=ufs2,  (Unless this is a Solaris partition )`
https://www.cyberciti.biz/faq/howto-linux-mount-freebsd-ufs2-filesystem/

As T-Daemon pointed out, I had a typo, which I've fixed.


----------



## T-Daemon (Mar 28, 2020)

scottro said:


> ufstype=*usfs2*


You have a typo there.


freeink said:


> I want mount freeBSD /dev/sda6/ ufs from Linux.


Make sure the ufs module is loaded, run
`lsmod | grep ufs`
if it doesn't appear, run
`sudo modprobe ufs`, then
`sudo mount -t ufs -o ro,ufstype=ufs2 /dev/sda6  /mnt/solaris`


----------



## ShelLuser (Mar 28, 2020)

Still... why ask Linux questions in a FreeBSD forum?  This is probably best redirected to the forum for whatever distribution you're using, because there tends to be quite some difference between those.


----------



## zirias@ (Mar 28, 2020)

OTOH, I wouldn't expect too much knowledge concerning UFS on your typical Linux forum...

But it's definitely in the wrong category here


----------



## Zvoni (Mar 28, 2020)

What i don't understand: why does he want to mount the whole partition? As in: mounting the Root-Folder of his FreeBSD-System.
And if it's a Multi-boot-Environment, why does he has 2 EFI-Partitions?


----------



## Phishfry (Mar 28, 2020)

Zvoni said:


> And if it's a Multi-boot-Environment, why does he has 2 EFI-Partitions?


This is actually a valid way to use multi boot operating systems.
You see we have bootx64.efi in the EFI partition. Problem is some other operating systems use the exact same file name.
So a valid work-around is to have separate EFI partitions for multi-boot.
See example here:


			Laptops/Lenovo_Yoga_3_14/DualBoot - FreeBSD Wiki


----------



## ralphbsz (Mar 28, 2020)

Zvoni said:


> What i don't understand: why does he want to mount the whole partition? As in: mounting the Root-Folder of his FreeBSD-System.
> And if it's a Multi-boot-Environment, why does he has 2 EFI-Partitions?


Probably because you can't mount something smaller than a whole partition. Certainly, the root directories (like /etc and /bin and /usr/lib) will be pretty useless on Linux, but they don't hurt, other than perhaps causing confusion.


----------

