Problems loop mounting ufs filesystem on centos7
I am trying to mount a vmdk flat file which contains an ordinary msdos partition table with 2 ufs slices a 2GB root partition and a 200 MB swap partition. When mounted natively in FreeBSD the filesystem is shown to be ufs2.
file -sL /dev/ufsid/59b65b72848c9171
/dev/ufsid/59b65b72848c9171: Unix Fast File System [v2] (little endian) last mounted on / ...
The following commands are executed on the centos system.
modprobe ufs
kpartx -a -v UFS_fs.vmdk
add map loop0p1 (253:9): 0 4194225 linear /dev/loop0 63
mount -t ufs -o ro,ufstype=ufs2 /dev/mapper/loop0p1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/mapper/loop0p1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
dmesg | tail
...
[ 7137.735075] ufs_read_super: bad magic number
partprobe /dev/loop0
fdisk -l | tail
Disk /dev/mapper/loop0p1: 2147 MB, 2147443200 bytes, 4194225 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x90909090
Device Boot Start End Blocks Id System
/dev/mapper/loop0p1p4 * 0 49999 25000 a5 FreeBSD
mount -t ufs -o ro,ufstype=ufs2 /dev/mapper/loop0p1p4 /mnt
mount: special device /dev/mapper/loop0p1p4 does not exist
partx -l /dev/mapper/loop0p1
# 1: 63- 4194287 ( 4194225 sectors, 2147 MB)
mount -r -t ufs -o loop,offset=32768,ufstype=ufs2 /dev/mapper/loop0p1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
dmesg | tail
...
[ 7482.023299] ufs_read_super: bad magic number
[ 7490.939276] ufs_read_super: bad magic number
partx -l /dev/loop0
# 1: 63- 4194287 ( 4194225 sectors, 2147 MB)
# 5: 3784625- 4194224 ( 409600 sectors, 209 MB)
mount -r -t ufs -o ufstype=ufs2 /dev/loop0p1 /mnt
mount: /dev/loop0p1 is already mounted or /mnt busy
mount -r -t ufs -o loop,ufstype=ufs2 /dev/loop0p1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
mount -r -t ufs -o ufstype=ufs2 /dev/loop0 /mnt
mount: /dev/loop0 is already mounted or /mnt busy
mount -r -t ufs -o loop,ufstype=ufs2 /dev/loop0 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
I am especially confused as to why fdisk -l shows a FreeBSD partition but mount claims it doesn't exist. ls -l also fails to show it. Does fdisk use a different method of listing block devices? Any suggestions on what else I should try? I've tried everything I can think of at this point. It *should* work but doesn't.
|