Begin File:disk_raw.tgz Description:file recovery utility Keywords:disk_raw file recovery Version: Entered-date:Jan 21, 1996 Author: Ported-by: Original-site: Copying-policy: Supplemental: DISK_RAW USAGE 'disk_raw' may be used to recover accidently rm'd files. It was NOT intended to recover data lost due to disk corruption. It is best to run 'chkfsys' before using disk_raw. The successful recovery of data depends upon the activity of partition. The more the partition is written to, the less likely successful recovery will be. disk_raw will open the partition as READ ONLY so there is no way that it can cause corruption or data loss in any way -- even if mis-used! disk_raw will print a message whenever a bad signature is encountered so it is best to run disk_raw in the background. This will give a "feel" for how much of a file is valid, especially when doing recursive copies. NOTE: disk_raw does NOT check .bitmap and thus has no way to validate the first extent of each file. So even if a file was copied without any warning messages, it may not be valid data! disk_raw attaches a prefix (default /raw) and is used with cd, ls and cp utilities. For example, "ls /raw" will output something similar to "ls /" except that 'prefixes' will not be shown (example dev) and removed files/directories will be shown. If the -c option is used with disk_raw and the ls was run on a qnx terminal, the erased files will show up in color (red on white). NOTE: if color is displayed, the output columns may not be aligned properly. NOTE: erased files will NOT be highlighted if their names exceed 9 characters. When cp'ing files, it is best for the destination to be located on a different file system than the source. For example, floppy disk, ram disk, a second partition (even a DOS partition), or across the network. It is possible to cp files to the same file system, however this will greatly reduce the success of recovery and is not recommended. EXAMPLE: 1) Prepare a floppy in drive /dev/fd0. The floppy should be formated, dinit'd, and contain some data files. 2) Run "rm -r /fd0" where /fd0 is the mount point of /dev/fd0. 3) Run "disk_raw -d /dev/fd0 &". 4) Run "ls -r /raw". All files that were just removed will be displayed. 5) Run "cp -r /raw some_dir" where some_dir is a directory located anywhere but NOT on the floppy. All files have just been restored!! disk_raw has a -s option which can be used to scan a partition for the QNX directory signature. This can be useful if the root block has become corrupted. If the -s option is specified, disk_raw will catch SIGINT and scan for the next sequential directory signature every time it is hit with the SIGINT signal. When a directory signature is found, disk_raw will change its "root" to that new directory (no way to go back :-( so that an 'ls /raw' will display the contents of the newly found directory. NOTE: because the directory was scanned for via signature, there is no information about the directory itself regarding size, xblocks etc. Therefore, disk_raw ALWAYS assumes that the directory is maximum 32 entries (if there is more, there is no way to find it ((yet!)). Although very limited, the -s option can be used to partially recover some data when the root block is corrupt! NOTE: generating the SIGINT signal can be done using the kill or slay utilities but the easiest way is to NOT run disk_raw in the background and use ^C. archive contents: drwxrwxr-x 0 briane support Jan 22 13:20 disk_raw/ -rwxrwxr-x 0 briane support 51055 Jun 13 15:20 disk_raw/disk_raw -rw-rw-r-- 0 briane support 3285 Jul 19 10:21 disk_raw/USAGE.disk_raw End