Topic review - How to read UFS filesystem super block information in FreeBSD
Author
Message
mandrei99
Post subject: How to read UFS filesystem super block information in FreeBSD | Posted: Mon Jul 22, 2013 9:52 am
How to read UFS filesystem super block information in FreeBSD
Use the dumpfs utility (by default in FreeBSD). Quote from man:
Quote:
# man dumpfs DUMPFS(8) FreeBSD System Manager's Manual DUMPFS(8)
NAME dumpfs -- dump UFS file system information
SYNOPSIS dumpfs [-f] [-l] [-m] filesys | device
DESCRIPTION The dumpfs utility prints out the UFS super block and cylinder group information for the file system or special device specified, unless the -f, -l or -m flag is specified. The listing is very long and detailed. This command is useful mostly for finding out certain file system infor- mation such as the file system block size and minimum free space percent- age.
If -f is specified, a sorted list of all free fragments and free fragment ranges, as represented in cylinder group block free lists, is printed. If the flag is specified twice, contiguous free fragments are not col- lapsed into ranges and instead printed in a simple list. Fragment num- bers may be converted to raw byte offsets by multiplying by the fragment size, which may be useful when recovering deleted data.
If -l is specified, the pathname to the file system's container derived from its unique identifier is printed.
If -m is specified, a newfs(8) command is printed that can be used to generate a new file system with equivalent settings.
SEE ALSO disktab(5), fs(5), disklabel(8), fsck(8), newfs(8), tunefs(8)
HISTORY The dumpfs utility appeared in 4.2BSD.
FreeBSD 9.1 Jul 14, 2011 FreeBSD 9.1
Reading /var filesystem superblock information with dumpfs:
Rest of the output is ommited to keep the post short.
[b]How to read UFS filesystem super block information in FreeBSD[/b]
Use the [b]dumpfs[/b] utility (by default in FreeBSD). Quote from man: [quote]# man dumpfs DUMPFS(8) FreeBSD System Manager's Manual DUMPFS(8)
NAME dumpfs -- dump UFS file system information
SYNOPSIS dumpfs [-f] [-l] [-m] filesys | device
DESCRIPTION The dumpfs utility prints out the UFS super block and cylinder group information for the file system or special device specified, unless the -f, -l or -m flag is specified. The listing is very long and detailed. This command is useful mostly for finding out certain file system infor- mation such as the file system block size and minimum free space percent- age.
If -f is specified, a sorted list of all free fragments and free fragment ranges, as represented in cylinder group block free lists, is printed. If the flag is specified twice, contiguous free fragments are not col- lapsed into ranges and instead printed in a simple list. Fragment num- bers may be converted to raw byte offsets by multiplying by the fragment size, which may be useful when recovering deleted data.
If -l is specified, the pathname to the file system's container derived from its unique identifier is printed.
If -m is specified, a newfs(8) command is printed that can be used to generate a new file system with equivalent settings.
SEE ALSO disktab(5), fs(5), disklabel(8), fsck(8), newfs(8), tunefs(8)