从 Debian 稳定版切换到 Debian 测试版后,我在系统上挂载 FreeBSD 根分区时遇到问题: Debian测试下如何挂载ufs文件系统?
我通过以下命令找出我的 Linux 内核支持哪些文件系统cat /proc/filesystems
:
nodev sysfs
nodev rootfs
nodev ramfs
nodev bdev
nodev proc
nodev cpuset
nodev cgroup
nodev cgroup2
nodev tmpfs
nodev devtmpfs
nodev debugfs
nodev tracefs
nodev securityfs
nodev sockfs
nodev bpf
nodev pipefs
nodev hugetlbfs
nodev devpts
nodev pstore
nodev mqueue
ext3
ext2
ext4
nodev autofs
btrfs
默认情况下,Linux 内核无法读取/写入FreeBSD-ufs
分区。
如何ufs
在 Linux 内核上启用 Unix 文件系统 ( ) 支持?
更新
的输出:
modprobe ufs
mount -t ufs -o ufstype=ufs2 /dev/sda4 /mnt/ufs_mount
是:
mount: /dev/sda4 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sda4,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
的输出dmesg | tail
:
[ 1136.965142] ufs: ufs_fill_super(): bad magic number
[ 1255.758946] ufs: ufs_fill_super(): bad magic number
[ 2098.945757] ufs: ufs was compiled with read-only support, can't be mounted as read-write
[ 2098.946045] ufs: You didn't specify the type of your ufs filesystem
mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
>>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is ufstype=old
[ 2098.967212] ufs: ufs_fill_super(): bad magic number
[ 2927.982112] perf: interrupt took too long (2504 > 2500), lowering kernel.perf_event_max_sample_rate to 79750
我的sources.list
:
deb http://httpredir.debian.org/debian/ stretch main
deb-src http://httpredir.debian.org/debian/ stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
和uname -a
:
Linux debian 4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux
答案1
使用标准 debian 内核?
尝试modprobe ufs
以 root 身份加载 UFS 文件系统支持。