I am trying to mount a raw disk image created by
dd command from whole one disk. My disk has a UFS file system on its drives.
mount command needs a special drive to mount. How can I do it?
My command trys to mount the image as read/write, however you should read this before using it: Mounting ufs partition with read/write permissions on ubuntu
First assign your image to a loop device:
$ sudo losetup -f $HOME/path/to/disk.img
You might want to use
-P option as suggested in comments too.
Find in which path your image has been assigned:
$ sudo losetup -j $HOME/path/to/disk.img /dev/loop0: [xxxx]: (/home/path/to/disk.img)
So it's on
Check and see if
ufs module is loaded:
$ lsmod | grep ufs
If it's not, load it using:
$ sudo modprobe ufs
Then mount your partitions like:
$ sudo mount -t ufs /dev/loop0p1 /mnt
You might need to mount it with
$ sudo mount -t ufs -o ufstype=ufs2 /dev/loop0p1 /mnt
The device is:
And partitions are:
/dev/loop0p1 /dev/loop0p2 ...