Root/
1 | BFS FILESYSTEM FOR LINUX |
2 | ======================== |
3 | |
4 | The BFS filesystem is used by SCO UnixWare OS for the /stand slice, which |
5 | usually contains the kernel image and a few other files required for the |
6 | boot process. |
7 | |
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 | |
14 | # losetup /dev/loop0 stand.img |
15 | # mount -t bfs /dev/loop0 /mnt/stand |
16 | |
17 | where stand.img is a file containing the image of BFS filesystem. |
18 | When you have finished using it and umounted you need to also deallocate |
19 | /dev/loop0 device by: |
20 | |
21 | # losetup -d /dev/loop0 |
22 | |
23 | You can simplify mounting by just typing: |
24 | |
25 | # mount -t bfs -o loop stand.img /mnt/stand |
26 | |
27 | this will allocate the first available loopback device (and load loop.o |
28 | kernel module if necessary) automatically. If the loopback driver is not |
29 | loaded automatically, make sure that you have compiled the module and |
30 | that modprobe is functioning. Beware that umount will not deallocate |
31 | /dev/loopN device if /etc/mtab file on your system is a symbolic link to |
32 | /proc/mounts. You will need to do it manually using "-d" switch of |
33 | losetup(8). Read losetup(8) manpage for more info. |
34 | |
35 | To create the BFS image under UnixWare you need to find out first which |
36 | slice contains it. The command prtvtoc(1M) is your friend: |
37 | |
38 | # prtvtoc /dev/rdsk/c0b0t0d0s0 |
39 | |
40 | (assuming your root disk is on target=0, lun=0, bus=0, controller=0). Then you |
41 | look for the slice with tag "STAND", which is usually slice 10. With this |
42 | information you can use dd(1) to create the BFS image: |
43 | |
44 | # umount /stand |
45 | # dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512 |
46 | |
47 | Just in case, you can verify that you have done the right thing by checking |
48 | the magic number: |
49 | |
50 | # od -Ad -tx4 stand.img | more |
51 | |
52 | The first 4 bytes should be 0x1badface. |
53 | |
54 | If you have any patches, questions or suggestions regarding this BFS |
55 | implementation please contact the author: |
56 | |
57 | Tigran Aivazian <tigran@aivazian.fsnet.co.uk> |
58 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9