Short: Search lost PFS/SFS partitions on a harddisk Uploader: thomas-rapp@t-online.de (Thomas Rapp) Author: thomas-rapp@t-online.de (Thomas Rapp) Type: disk/salv Version: 0.4 WARNING: This program was only tested on my machine with my harddisks. There is no guarantee that it runs on others. I am not responsible for any damage. Use it on your own risk. Use RDBrecov if you lost the RDB (partitioning information) of your harddisk. RDBrecov searches an entire harddisk for partitions. It can handle PFS2, PFS3, AFS and SFS partitions. It also finds FFS partitions but cannot recognize the size and volume name. It lists the partitions found into the Shell window and optionaly into a log file. With this information you can use HDtoolbox (or another partitioning tool) to reconstruct your partitions. Harddisks larger than 4GB can be accessed, if the device driver is either NSD or TD64 compatible. SCSI-Direct is not supported. Installation ============ Copy the RDBrecov executable onto your Emergency Disk. If you have none, you can use the AmigaOS install disk. With OS3.5 there comes an option to create an Emergency Boot Disk. You should really use it. And make sure, your Emergency Disk works ! Note that you need a partitioning tool (e.g. HDToolBox) too ! As RDBrecov can only be started from Shell, be sure to have a Shell Icon on your Emergency Disk. (IIRR the AmigaOS install disk has none). Usage ===== Most important rule after a harddisk crash: DON'T FORMAT ANYTHING !!! Formatting will destroy data. Even if Quick-Format is used. Boot with your Emergency disk. First of all you have to verify some info about your Harddisk. You must know the device name of your harddisk driver. Amiga default is scsi.device. Other manufacturers use other names like cybscsi.device. Please start your favorite partitioning tool (e.g. HDToolBox). You should use the same tool that you used when the harddisk was first partitioned ! Maybe you have to adjust some tooltypes to use the right device driver. Now choose your harddrive from the list. It should be shown as unknown in the list. Remember its Address, this is the unit number needed by RDBrecov. Now enter the install dialog (e.g. click on Install Drive). Ignore requesters stating that this would destroy all data. Let HDToolBox read the configuration from disk (e.g. click on Read Configuration). Now write down the data from the fields Cylinders, Blocks per Cylinder and Bytes per Block. Click on Cancel and leave HDToolbox. You should now have the following information (Example): Device: scsi.device Unit: 0 Cylinders: 7752 Blocks per Cylinders: 1008 Bytes per Block: 512 Now open a Shell window and start RDBrecov. Enter RDBrecov s c cs Example: RDBrecov scsi.device 0 s 512 c 7752 cs 1008 You should get an output like that: Trying to open scsi.device unit 0 SectorSize = 512 (overridden by parameter: 512) Cylinders = 7814016 (overridden by parameter: 7752) CylSectors = 1 (overridden by parameter: 1008) PFS Bootblock found at cylinder 2: Size = 204 cyls DosType=50465301 Name="Workbench" PFS Bootblock found at cylinder 206: Size = 407 cyls DosType=50465301 Name="Prog" PFS Bootblock found at cylinder 613: Size = 417 cyls DosType=50465301 Name="Internet" PFS Bootblock found at cylinder 1030: Size = 894 cyls DosType=50465301 Name="Games" PFS Bootblock found at cylinder 1924: Size = 1016 cyls DosType=50465301 Name="Pictures" PFS Bootblock found at cylinder 2940: Size = 570 cyls DosType=50465301 Name="Graphic" PFS Bootblock found at cylinder 3510: Size = 976 cyls DosType=50465301 Name="Music" PFS Bootblock found at cylinder 4486: Size = 693 cyls DosType=50465301 Name="cache" PFS Bootblock found at cylinder 5179: Size = 1627 cyls DosType=50465301 Name="Work" PFS Bootblock found at cylinder 6806: Size = 611 cyls DosType=50465301 Name="Emulator" PFS Bootblock found at cylinder 7417: Size = 335 cyls DosType=50465301 Name="Temp" Reading cylinder 7752 Complete. Now reenter HDToolBox and install your harddisk. Then use the Partition Drive dialog to recreate your partitions. You can enter the values from "at cylinder" and "Size" directly into the gadgets "Start Cyl" and "Total Cyl". Be sure not to define overlapping partitions ! If you encounter overlappings, you'll have to decide which ranges are correct from your memory. If the "Size =" portion is 0, just subtract the "at cylinder" of this partition from that of the next one. (One trick is to start at the end of the list and only enter the "Start Cyl" value. The size then is calculated by HDToolBox. This assumes that you don't have unused space on the harddisk.) If you use PFS or SFS, first follow the instuctions in the corresponding manual in order to install your filesystem on the harddisk and determine which data has to be used for Mask, MaxTransfer, Block size and DosType. Use the DosType listed by RDBrecov only if the DosType from the manual does not work ! Now remove the emergency disk and reboot. Everything should magically be there again. If one ore more partitions don't work, verify if you have installed the right filesystem, DosType, partition borders etc. Again: DO NOT FORMAT ANYTHING ! You may also experiment with the values for cylinders and blocks per cylinder. Different releases of HDtoolBox show different values here. You have to use the same values that were used when the harddisk was first partitioned. HINT: the first partition almost always starts at cylinder 2. If you encounter problems or mystic error messages you can try to mail me for assistance. But there is no guarantee that I can or want to help you. Parameters ========== DEVICE/A The device driver of your harddisk (e.g. scsi.device) UNIT/A/N The unit of your harddisk (e.g. 0) INFO/S If specified, RDBrecov only shows infos about the harddisk and does not search partitions. FILE/K Filename of a log file. If specified RDBrecov also writes the partition data into this file. S=SECTORSIZE/N Override infos of TD_GEOMETRY. May be necessary if C=CYLINDERS/N TD_GEOMETRY supplies different infos than HDToolBox. CS=CYLSECTORS/N NODOS/S Don't list FFS Rootblocks. START=STARTCYL/N/K Start searching at this cylinder. Can be used if you interrupted the search with CRTL-C or if you have a very large partition and aproximately know where the next one starts. NSD/S Force using NSD style commands. TD64/S Force using TD64 style commands. Error messages ============== OpenDevice failed The specified device name / unit combination could not be opened. Verify these values. cannot create IORequest cannot create reply port Usualy too less memory. Reboot and retry. device does not support NSD or TD64 for harddisks >4GB Seems that you use a device driver that is not ready for Harddisks larger than 4GB but uses SCSI-Direct for them. As I don't know about SCSI-Direct this is not implemented (yet). TD_READ Error = (text) Read error on the disk. is the code returned by the DOS-device. If known, 'text' is a short description of the error. TD_GETGEOMETRY Error = (text) The device does not support the TD_GEOMETRY command. is the code returned by the device. If known, 'text' is a short description of the error. not enough memory for buffers RDBrecov needs memory for at least 3 disk blocks.