Chinese translated version of Documentation\filesystems\bfs
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Chinese maintainer: 金丽丽 819153113@qq.com
---------------------------------------------------------------------
Documentation\filesystems\bfs 的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者: 金丽丽 819153113@qq.com
中文版翻译者: 金丽丽 819153113@qq.com
中文版校译者: 赵晶 anana53@qq.com
以下为正文
---------------------------------------------------------------------
BFS FILESYSTEM FOR LINUX
LINUX中的BFS文件系统
========================
The BFS filesystem is used by SCO UnixWare OS for the /stand slice, which
usually contains the kernel image and a few other files required for the
boot process.
BFS文件系统用于/stand slice中的SCO UnixWare操作系统。SCO UnixWare操作系统包含了内核镜像和其他一些用于引导过程的文件。
In order to access /stand partition under Linux you obviously need to
know the partition number and the kernel must support UnixWare disk slices(CONFIG_UNIXWARE_DISKLABEL config option).
为了在Linux下访问分区,用户显然会需要知道分区号,并且要确保内核支持UnixWare磁盘片(CONFIG_UNIXWARE_DISKLABEL配置选项)。
However BFS support does not
depend on having UnixWare disklabel support because one can also mount
BFS filesystem via loopback:
# losetup /dev/loop0 stand.img
# mount -t bfs /dev/loop0 /mnt/stand
然而, BFS支持不依赖于UnixWare支持的磁盘标签。这是因为不依赖于UnixWare支持的磁盘标签通过回送可以挂载到BFS文件系统:
# losetup /dev/loop0 stand.img
# mount -t bfs /dev/loop0 /mnt/stand
where stand.img is a file containing the image of BFS filesystem.
其中,stand.img是一个含有BFS文件系统镜像的文件。
When you have finished using it and umounted you need to also deallocate
/dev/loop0 device by:# losetup -d /dev/loop0
当用户使用完毕并且卸载后,用户仍需要释放 /dev/loop0 设备:# losetup -d /dev/loop0
You can simplify mounting by just typing:
# mount -t bfs -o loop stand.img /mnt/stand
用户也可以通过输入
# mount -t bfs -o loop stand.img /mnt/stand 来简化安装。
this will allocate the first available loopback device (and load loop.o
kernel module if necessary) automatically.
这将为第一个可用的回送设备自动分配资源(必要时也可以为其加载loop.o内核模式)。
If the loopback driver is not
loaded automatically, make sure that you have compiled the module and
that modprobe is functioning.
如果回送设备没有自动加载,则用户需要确认模块是否已编译以及自动处理可载入模块是否有效。
Beware that umount will not deallocate
/dev/loopN device if /etc/mtab file on your system is a symbolic link to
/proc/mounts.
需要注意的是,如果系统中的/etc/mtab 文件只是转到
/proc/mounts 的符号链接,那么卸载操作是不会释放
/dev/loopN 设备的。
You will need to do it manually using "-d" switch of
losetup(8).
用户需要利用命令 "-d"来手动释放
/dev/loopN 设备。
Read losetup(8) manpage for more info.
阅读losetup(8)手册页获取更多信息。
To create the BFS image under UnixWare you need to find out first which
slice contains it.
为了在UnixWare下创建BFS文件,用户首先需要找出那些片包含它。
The command prtvtoc(1M) is your friend:
# prtvtoc /dev/rdsk/c0b0t0d0s0
(assuming your root disk is on target=0, lun=0, bus=0, controller=0).
prtvtoc(1M)可以对此提供帮助:
# prtvtoc /dev/rdsk/c0b0t0d0s0 (假设用户的根磁盘为:target=0, lun=0, bus=0, controller=0)
Then you
look for the slice with tag "STAND", which is usually slice 10.
然后用户需要寻找带有"STAND"标签的片——通常为片10
With this
information you can use dd(1) to create the BFS image:
# umount /stand
# dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512
根据这些信息,用户可以利用dd(1)来创建BFS镜像:# umount /stand
# dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512
Just in case, you can verify that you have done the right thing by checking the magic number:# od -Ad -tx4 stand.img | more
在这种情况下,用户可以通过检验数字来确定操作是否准确:# od -Ad -tx4 stand.img | more
The first 4 bytes should be 0x1badface.
前4个字节应该为0x1badface。
If you have any patches, questions or suggestions regarding this BFS implementation please contact the author:Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
如果您有任何的关于实现BFS文件创建的补充、疑问或者建议,请联系作者:Tigran Aivazian <tigran@aivazian.fsnet.co.uk>