View Single Post

   
  #4 (permalink)  
Old 02-15-2008, 10:26 AM
Frederico Fonseca
 
Posts: n/a
Default Re: Restore partition table

On Thu, 28 Aug 2003 09:15:29 +0200, Roberto Zini <r.zini@strhold.it>
wrote:

>gtori wrote:
> > On SCO Openserver 5.0.6, whit command badtrk -e .... i have cleaned the
> > partition table.
> >
> >
> > Thre's a tool for restore a correct table, or a tool for search the
> > first block by any file system on the hard disk ?
> >
> > excuse me for the language.
> >
> > thanks
> > --
> > Posted via http://dbforums.com

>
>I think a better explanation of what happened is in order.
>
>This guy got in touch with me this afternoon since he wanted to mount an
>existing SCO OS5 HD (taken from a previously working box) on a new SCO
>OS5 box as to copy some data from the old HD to the new one.
>
>He previously executed "mkdev hd" on the new server (the one where data
>had to be copied to) but, while doing so, he managed to corrupt the
>divvy table on the HD, probably because "mkdev hd" executed "badtrk -e"
>and allocated a new bad tracks table.
>
>Dunno about the answers given to "mkdev hd" prompts so I'm unable to
>describe what he did in detail.
>
>As a result, divvy is now unable to detect the previously installed
>filesystems (on the old HD) and thus he's unable to mount it and copy
>the data over the new one.
>
>Is there a method to recover the original divvy layout ?
>
>Best,
>Roberto

Doing the following MAY help if the HD is an IDE. Similar could
eventually be done for SCSI, but you would need to figure out the
minor/major values.


create a directory "dev" in /tmp
and execute the following code
----------------

i=254
while true
do
mknod dev/$i b 1 $i
i=`expr $i - 1`
done


for i in `ls dev`
do
echo $i>>dtype1
dtype dev/$i>>dtype1 2>>dtype1 1>>dtype1
done

------------
You will now have a directory with several special devices that can be
"mounted", and a file "dtype1" with a description of each valid file
system in each special file from /tmp/dev.

You can mount the valid entries as normal.
e.g. mount -r /tmp/dev/114 /mnt

and then copy whatever you need.

Note sure if it will work now because of the badtracing bit.




Frederico Fonseca
ema il: frederico_fonseca at syssoft-int.com
Reply With Quote