bfs.txt 2.1 KB

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