Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OSR5 mkdev hd - I'm being thick ?

Status
Not open for further replies.

davidshields

Programmer
May 15, 2002
14
GB
Had an OSR5 system that died (couldn't boot, prolly trashed boot block). IDE disk.

Ghosted a clients OSR5 system on new HD, planning to mount my old disk as slave on primary IDE in order to recover some old data.

mkdev hd 1 0 reports disk params:
Cyl 13228
Hd 15
Wr Reduce 0
Wr Precomp 65535
Ecc 0
Control 8
LZone 13228
Sec/Trk 63.

(BIOS Agrees)

fdisk invoked next : reports on /dev/rdsk/1s0
Part 1 Active Unix 1 66576 66576

badtrk reports currently empty, alloc space for ? go with default 15.
Quit badtrk as I dot actually want to write to the disk - its got stuff on.

How the dickens do I mount the unix partition ? Do I need to see how it was originally divvied up ? Can I just run divvy on /dev/rdsk/1s0 to see what partitions were swap etc ?
And if I do, what devices do I need to create to mount ? All I really want to do is mount whatever was the old / filesystem on /mnt to grab some old data.

Please help - my knowledge of SCO filesystems internals is VERY out of date and wasnt that good in the first place.

Mant thanks for reading

David.
 
try the following
Code:
 create a directory "dev" in /tmp
 and execute the following code
 ----------------
 
 i=254
 while [ $i -gt 0 ]
 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.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Thanks for the suggestion, but tried it with no success.

mknod worked ok, and dtype reported following:

32 Unix 1k
40 Unix 1k

34 HTFS
42 HTFS

but mounting 32 showd it was EXACTLY the same as /stand on first HD,
and mounting 34 showed it was EXACTLY same as / on first hard disk, so they seem to be diferent pointers to first hard disk.
I need to look at contents of 2nd hard disk, slave on primary IDE.

40 and 42 would not mount, as busy, so I assume they were / and /stand.

David.
 
Perhaps I should be looking at this a different way.

1) Assume I have a dead sco system (or at least a no-booter) on a hard disk - call this hard disk x

2) Assume I have a working Sco system on a machine, with disk mounted Primary IDE. Call this disk a, machine a.

What steps should I take to attempt to see (and recover) data held on root of disk x.

Assume that there *may* have been further disks on machine a in the past so you cannot trust devices to be absent or present.
 
David,

the above would work with IDE if the divvy table is intact on the second disk.
I have done this many times.

Your second HD should be on 96 and 104 as unix 1K (e.g. the primary master + 64 as per following table.

Minors for IDE drives.
1st (primary/master) 0..63
2nd (primary/slave) 64..127
3rd (secondary/master) 128..191
4th (secondary/slave) 192..255


Let's try something else.

If you have any /dev/hd1* try the following.

divvy /dev/hd10
divvy /dev/hd11
divvy /dev/hd12
divvy /dev/hd13
divvy /dev/hd14
divvy /dev/hd1a

and see if any of them shows any info.

If you don't have any hd1* try

divvy /tmp/dev/96
divvy /tmp/dev/104

This assuming you still have the devices created by my script. If not run it again.

One thing that can be done is to add a second disk that is equal to the original (bad) one, use mkdev HD to create the partitions as they were on the other HD (if known) and then replace the HD with the old one.
Going this root I make sure not to mount the HD on boot, and then issue the command manually.





Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top