Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

kfs(4) [plan9 man page]

KFS(4)							     Kernel Interfaces Manual							    KFS(4)

NAME
kfs - disk file system SYNOPSIS
disk/kfs [ -rc ] [ -b n ] [ -f file ] [ -n name ] [ -s ] DESCRIPTION
Kfs is a local user-level file server for a Plan 9 terminal with a disk. It maintains a hierarchical Plan 9 file system on the disk and offers 9P (see intro(5)) access to it. Kfs begins by checking the file system for consistency, rebuilding the free list, and placing a file descriptor in /srv/name, where name is the service name (default kfs). If the file system is inconsistent, the user is asked for per- mission to ream (q.v.) the disk. The file system is not checked if it is reamed. The options are b n If the file system is reamed, use n byte blocks. Larger blocks make the file system faster and less space efficient. 1024 and 4096 are good choices. N must be a multiple of 512. c Do not check the file system. f file Use file as the disk. The default is /dev/sd0fs. n name Use kfs.name as the name of the service. r Ream the file system, erasing all of the old data and adding all blocks to the free list. s Post file descriptor zero in /srv/service and read and write protocol messages on file descriptor one. EXAMPLES
Create a file system with service name kfs.local and mount it on /n/kfs. % kfs -rb4096 -nlocal % mount -c /srv/kfs.local /n/kfs FILES
/dev/sd0fs Default file holding blocks. SOURCE
/sys/src/cmd/disk/kfs SEE ALSO
kfscmd(8), mkfs(8), prep(8), wren(3) KFS(4)

Check Out this Related Man Page

PREP(8) 						      System Manager's Manual							   PREP(8)

NAME
prep, format - prepare hard and floppy diskettes SYNOPSIS
disk/prep [ -ra ] special [ type ] disk/format [ -t type ] [ -f ] [ -d ] [ -b bfile ] [ -c csize ] [ -l label ] drive [ files ... ] DESCRIPTION
A partition table is stored on a hard disk to specify the division of the physical disk into a set of logical units. On Plan 9 the parti- tion table is a list of triples: name, starting sector, and ending sector. The kernel fabricates the first two partitions, disk and parti- tion; the disk partition records the starting and ending sectors for the whole disk, and the partition partition, typically the last sector on the disk, holds the partition table itself. Special is the maximal prefix of names of the logical units on the disk, for example #w/hd0. Prep reads and prints the associated parti- tion table and then enters a simple interactive mode to control editing the table. The options are: -r (read only) prohibits writing the table on disk. -a automatically create default partitions if no partition table already exists. These include partitions for DOS, a boot kernel, an NVRAM substitute, a kfs(4) file system, and, if room remains, a swap partition. Format prepares for use the floppy diskette in the disk file named drive, for example /dev/fd0disk. The options are: -f Do not physically format the disc. Used to install an MS-DOS filesystem on a previously formatted disc. With this option, drive can be a plain file. -t specify a density and type of disk to be prepared. The possible types are: 31/2DD 31/2" double density, 737280 bytes 31/2HD 31/2" high density, 1474560 bytes 51/4DD 51/4" double density, 368640 bytes 51/4HD 51/4" high density, 1146880 bytes The default is the highest possible on the device, unless -f is used, in which case the default is 31/2HD. -d add MS-DOS parameter block, file access table (FAT), and root directory to the start of the floppy. The remaining options have effect only when -d is specified: -b use the contents of bfile as the bootstrap block installed in sector 0. -c use a DOS cluster size of csize sectors when creating the DOS FAT. -l add a label when creating the DOS parameter block. Again under -d, any files listed are added, in order, to the root directory of the MS-DOS filesytem. The files are contiguously allocated and created with the READONLY attribute set. The file /sys/src/boot/pc/bb is an example of a suitable bfile to make the disk a boot disk. It gets loaded by the BIOS at 0x7C00, reads the root directory into address 0x7E00, and looks at the first root directory entry. If that file is called B.COM, it uses single sector reads to load the file into address 0x10000 and then jumps to the loaded file image. EXAMPLE
Create a Plan 9 boot floppy on a previously formatted diskette: disk/format -f -b bb -d /dev/fd0disk /386/b.com SOURCE
/sys/src/cmd/disk/prep.c /sys/src/cmd/disk/format.c /sys/src/boot/pc/bb.s SEE ALSO
floppy(3), wren(3), b.com(8) PREP(8)
Man Page