# Mounting a FreeBSD UFS hard drive on Debian/Ubuntu



## FreeDomBSD (Oct 18, 2013)

My storage woes continue! Because this is not FreeBSD stuff, but Debian I have thought I'd put it in OT, please move it where it should be if I am mistaken.



There is a 2TB UFS-formated hard drive in a modular non-RAID external USB enclosure.

I get this popup error when I plug the drive in and Ubuntu tries to automount:



```
Unable to access â€œ2.0 TB Volumeâ€

Error mounting /dev/sdd1 at /media/a4090/disk: Command-line `mount -t "ufs" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdd1" "/media/a4090/disk"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
```



At this point I entered commands to mount UFS manually (using this as a reference http://askubuntu.com/questions/85154/mount-ufs-filesystem )
This is the output from the CLI:


```
a4090@x785:~$ sudo modprobe ufs
[sudo] password for aaa:
a4090@x785:~$ mkdir ~/ufs_mount
a4090@x785:~$ sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdd1 /home/aaa/ufs_mount
a4090@x785:~$
```

After these manipulations I go to the file manager that now sees the volume in question as mounted, but when I click on it I get the following popup error:


```
This location could not be displayed.

You do not have the permissions necessary to view the contents of â€œufs_mountâ€.
```




In the file manager, when I navigate to /home/aaa/ufs_mount (with a mouse, of course) I am able to open the folder with no errors, but there are no visible files within it.


(Same simptoms in both Ubuntu and Debian)


----------



## trh411 (Oct 19, 2013)

```
$ sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdd1 /home/aaa/ufs_mount
```

What does `mount` show after you issued the above command?


----------



## FreeDomBSD (Oct 19, 2013)

After restarting I've issued the command:

(note the sdd1 changed to sdb1)



```
aaa@x785:~$ sudo mount -r -t ufs -o ufstype=ufs2 /dev/sdb1 /home/aaa/ufs_mount
[sudo] password for aaa: 
aaa@x785:~$ mount
/dev/mapper/ubuntu--vg-root on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
/dev/sda1 on /boot type ext2 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/home/aaa/.Private on /home/aaa type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=e4746c58bcdbef0a,ecryptfs_fnek_sig=4263f0e1218fc377)
gvfsd-fuse on /run/user/aaa/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=aaa)
/dev/sdc1 on /media/aaa/TwoTB1 type ext2 (rw,nosuid,nodev,uhelper=udisks2)
/dev/sdb1 on /home/aaa/ufs_mount type ufs (ro,ufstype=ufs2)
aaa@x785:~$
```


----------



## FreeDomBSD (Oct 19, 2013)

```
a4090@x785:~$ dmesg | tail
[   76.367956] wlan0: authenticated
[   76.369870] wlan0: associate with ------------- (try 1/3)
[   76.373577] wlan0: RX AssocResp from ------------- (capab=0x411 status=0 aid=1)
[   76.382190] wlan0: associated
[   76.382222] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   84.018300] ufs was compiled with read-only support, can't be mounted as read-write
[   84.071809] EXT2-fs (sdc1): warning: mounting unchecked fs, running e2fsck is recommended
[  164.503701] systemd-hostnamed[2904]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[  167.096124] ufs was compiled with read-only support, can't be mounted as read-write
[  691.603894] systemd-hostnamed[2993]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
a4090@x785:~$
```


----------



## h3z (Oct 19, 2013)

Login as root. Then quiry the mount directory from the console. You can use sudo also. I mean, if you haven't already tried this.


----------



## FreeDomBSD (Oct 19, 2013)

Which commands are you talking about specifically?


----------



## sossego (Oct 19, 2013)

`$ su
:
# ls -la $PATH_TO_UFS2_MOUNT <</home/aaa/ufsmount in your case>>
$OUTPUT`
Those commands.


----------

