요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
========================
BFS Filesystem for Linux
========================
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.
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). 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
where stand.img is a file containing the image of BFS filesystem.
When you have finished using it and umounted you need to also deallocate
/dev/loop0 device by::
# losetup -d /dev/loop0
You can simplify mounting by just typing::
# 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. 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. You will need to do it manually using "-d" switch of
losetup(8). Read losetup(8) manpage for more info.
To create the BFS image under UnixWare you need to find out first which
slice contains it. 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). Then you
look for the slice with tag "STAND", which is usually slice 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
Just in case, you can verify that you have done the right thing by checking
the magic number::
# od -Ad -tx4 stand.img | more
The first 4 bytes should be 0x1badface.
If you have any patches, questions or suggestions regarding this BFS
implementation please contact the author:
Tigran Aivazian <aivazian.tigran@gmail.com>
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
UnixWare `/stand`와 loop 마운트
1-25BFS 파일시스템은 SCO UnixWare 운영체제의 `/stand` slice에 사용됩니다. 이 slice에는 보통 커널 이미지와 부팅 과정에 필요한 몇몇 파일이 들어 있습니다.
Linux에서 `/stand` 파티션에 접근하려면 파티션 번호를 알아야 하고, 커널이 `CONFIG_UNIXWARE_DISKLABEL` 구성 옵션으로 UnixWare disk slice를 지원해야 합니다. 다만 BFS 지원 자체는 UnixWare disklabel 지원에 의존하지 않습니다. BFS 이미지 파일을 loopback으로 마운트할 수도 있기 때문입니다.
`stand.img`가 BFS 파일시스템 이미지라면 `losetup /dev/loop0 stand.img`로 연결한 뒤 `mount -t bfs /dev/loop0 /mnt/stand`로 마운트합니다. 사용을 마치고 언마운트한 다음에는 `losetup -d /dev/loop0`으로 loop 장치도 해제해야 합니다.
이미지 연결부터 정리까지의 명령 순서입니다.
.. SPDX-License-Identifier: GPL-2.0
========================
BFS Filesystem for Linux
========================
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.
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). 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
where stand.img is a file containing the image of BFS filesystem.
When you have finished using it and umounted you need to also deallocate
/dev/loop0 device by::
# losetup -d /dev/loop0
`-o loop` 간편 마운트
26-37`mount -t bfs -o loop stand.img /mnt/stand`처럼 입력하면 첫 번째로 사용 가능한 loopback 장치를 자동으로 할당하고, 필요하면 `loop.o` 커널 모듈도 불러옵니다.
loopback 드라이버가 자동으로 로드되지 않으면 모듈을 빌드했는지와 `modprobe`가 작동하는지 확인하십시오.
시스템의 `/etc/mtab`이 `/proc/mounts`를 가리키는 심볼릭 링크이면 `umount`가 `/dev/loopN` 장치를 해제하지 않습니다. 이 경우 `losetup(8)`의 `-d` 옵션으로 직접 해제해야 합니다. 자세한 내용은 `losetup(8)` 매뉴얼 페이지를 참고하십시오.
자동 할당 뒤 장치가 남을 수 있는 경우입니다.
You can simplify mounting by just typing::
# 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. 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. You will need to do it manually using "-d" switch of
losetup(8). Read losetup(8) manpage for more info.
UnixWare에서 BFS 이미지 만들기
38-56UnixWare에서 BFS 이미지를 만들려면 먼저 어느 slice에 BFS가 있는지 확인해야 합니다. `prtvtoc(1M)` 명령을 사용하며, 예시는 루트 디스크의 target, lun, bus, controller가 모두 0이라고 가정한 `prtvtoc /dev/rdsk/c0b0t0d0s0`입니다.
출력에서 태그가 `STAND`인 slice를 찾습니다. 보통 slice 10입니다. 그 정보를 이용해 `/stand`를 언마운트하고 `dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512`로 BFS 이미지를 만듭니다.
이미지가 올바른지 확인하려면 `od -Ad -tx4 stand.img | more`로 magic number를 검사합니다. 첫 4바이트는 `0x1badface`여야 합니다.
UnixWare의 STAND slice를 파일로 복사하는 절차입니다.
To create the BFS image under UnixWare you need to find out first which
slice contains it. 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). Then you
look for the slice with tag "STAND", which is usually slice 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
Just in case, you can verify that you have done the right thing by checking
the magic number::
# od -Ad -tx4 stand.img | more
The first 4 bytes should be 0x1badface.
연락처
57-60이 BFS 구현에 관한 패치, 질문 또는 제안은 저자 Tigran Aivazian `<aivazian.tigran@gmail.com>`에게 보내도록 문서에 기록되어 있습니다.
원문에 명시된 저자 정보입니다.
If you have any patches, questions or suggestions regarding this BFS
implementation please contact the author:
Tigran Aivazian <aivazian.tigran@gmail.com>
요약·해설
bfs.rst:1-60BFS는 SCO UnixWare의 부팅용 `/stand` slice에 쓰이는 파일시스템입니다. Linux에서는 실제 slice 또는 이미지 파일을 loop 장치로 마운트할 수 있고, UnixWare에서는 `prtvtoc`와 `dd`로 이미지를 추출한 뒤 magic `0x1badface`로 검증합니다.
UnixWare의 STAND slice를 Linux에서 읽는 경로입니다.