bfs.rst 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ========================
  3. BFS Filesystem for Linux
  4. ========================
  5. The BFS filesystem is used by SCO UnixWare OS for the /stand slice, which
  6. usually contains the kernel image and a few other files required for the
  7. boot process.
  8. In order to access /stand partition under Linux you obviously need to
  9. know the partition number and the kernel must support UnixWare disk slices
  10. (CONFIG_UNIXWARE_DISKLABEL config option). However BFS support does not
  11. depend on having UnixWare disklabel support because one can also mount
  12. BFS filesystem via loopback::
  13. # losetup /dev/loop0 stand.img
  14. # mount -t bfs /dev/loop0 /mnt/stand
  15. where stand.img is a file containing the image of BFS filesystem.
  16. When you have finished using it and umounted you need to also deallocate
  17. /dev/loop0 device by::
  18. # losetup -d /dev/loop0
  19. You can simplify mounting by just typing::
  20. # mount -t bfs -o loop stand.img /mnt/stand
  21. this will allocate the first available loopback device (and load loop.o
  22. kernel module if necessary) automatically. If the loopback driver is not
  23. loaded automatically, make sure that you have compiled the module and
  24. that modprobe is functioning. Beware that umount will not deallocate
  25. /dev/loopN device if /etc/mtab file on your system is a symbolic link to
  26. /proc/mounts. You will need to do it manually using "-d" switch of
  27. losetup(8). Read losetup(8) manpage for more info.
  28. To create the BFS image under UnixWare you need to find out first which
  29. slice contains it. The command prtvtoc(1M) is your friend::
  30. # prtvtoc /dev/rdsk/c0b0t0d0s0
  31. (assuming your root disk is on target=0, lun=0, bus=0, controller=0). Then you
  32. look for the slice with tag "STAND", which is usually slice 10. With this
  33. information you can use dd(1) to create the BFS image::
  34. # umount /stand
  35. # dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512
  36. Just in case, you can verify that you have done the right thing by checking
  37. the magic number::
  38. # od -Ad -tx4 stand.img | more
  39. The first 4 bytes should be 0x1badface.
  40. If you have any patches, questions or suggestions regarding this BFS
  41. implementation please contact the author:
  42. Tigran Aivazian <aivazian.tigran@gmail.com>