Re: Restore partition table
From: Bela Lubkin (belal_at_sco.com)
Date: 08/28/03
- Next message: Bela Lubkin: "Re: Restore partition table"
- Previous message: Dan Martin: "Re: Tape drive idiocy"
- In reply to: Frederico Fonseca: "Re: Restore partition table"
- Next in thread: Frederico Fonseca: "Re: Restore partition table"
- Reply: Frederico Fonseca: "Re: Restore partition table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Aug 2003 21:13:29 GMT To: scomsc@xenitec.ca
Frederico Fonseca wrote:
> 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.
Your `while true' loop won't ever stop. But aside from that, this would
only work if the divvy table wasn't destroyed. The device nodes you're
making refer to every division of every partition on all four possible
units of the "wd" driver. (Actually, 4 "wd" units of the "hd" driver,
in a system that is rooting from an IDE drive.) Each of those divisions
and partitions will only be correct if the division and partition tables
are intact.
>Bela<
- Next message: Bela Lubkin: "Re: Restore partition table"
- Previous message: Dan Martin: "Re: Tape drive idiocy"
- In reply to: Frederico Fonseca: "Re: Restore partition table"
- Next in thread: Frederico Fonseca: "Re: Restore partition table"
- Reply: Frederico Fonseca: "Re: Restore partition table"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|