fsdb_hfs.1m (2010 09)

f
fsdb_hfs(1M) fsdb_hfs(1M)
NAME
fsdb_hfs: fsdb - HFS file system debugger
SYNOPSIS
/usr/sbin/fsdb
[-F hfs][-V] special [
-b blocknum][-]
Remarks
Always execute the
fsck command (see fsck (1M)) after running
fsdb.
DESCRIPTION
The
fsdb command can be used to patch up a damaged file system after a crash.
Options and Arguments
fsdb recognizes the following options and arguments.
special The file name of the special file containing the file system.
- Initially disable the error-checking routines that are used to verify the inode and
fragment addresses. See the O symbol. If used, this option must follow special on
the command line.
-b blocknum Use blocknum as the superblock for the file system. If used, this option must follow
special on the command line.
-F hfs Specify the HFS file system type.
-V Echo the completed command line, but perform no other action. The command line
is generated by incorporating the user-specified options and other information
derived from the /etc/fstab file. This option allows the user to verify the com-
mand line.
Operation
fsdb normally uses the first superblock for the file system, located at the beginning of the disk section,
as the effective superblock. An alternate superblock can always be found at block
((SBSIZE+BBSIZE)/DEV_BSIZE)
, typically block 16. The -b option can be used to specify the
superblock location.
fsdb deals with the file system in terms of block fragments, which are the unit of addressing in the file
system and the minimum unit of space allocation. To avoid possible confusion, fragment is used to mean
that, and block is reserved for the larger true block. fsdb has conversions to translate fragment
numbers and i-numbers into their corresponding disk addresses. Also included are mnemonic offsets to
access different parts of an inode. These greatly simplify the process of correcting control block entries or
descending the file system tree.
fsdb contains several error-checking routines to verify inode and fragment addresses. These can be dis-
abled if necessary by invoking fsdb with the optional - argument, or by using the O symbol.
Numbers are considered decimal by default. Octal numbers must be prefixed with a zero. Hexadecimal
numbers must be prefixed with
0x. During any assignment operation, numbers are checked for a possi-
ble truncation error due to a size mismatch between source and destination.
fsdb reads a fragment at a time. A buffer management routine is used to retain commonly used frag-
ments of data in order to reduce the number of read system calls. All assignment operations result in an
immediate write-through of the corresponding fragment.
Symbols
The following symbols are recognized by
fsdb:
! Escape to shell
# Absolute address
+ Address arithmetic
- Address arithmetic
< Restore an address
> Save an address
= Numerical assignment
=+ Incremental assignment
=- Decremental assignment
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (4 pages)