Subject: disk volume header editing
To: None <port-sgimips@netbsd.org>
From: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>
List: port-sgimips
Date: 10/06/2001 04:20:13
I poked around a bit, and came up with a utility to dump the disk volume
header. I can imagine it would be useful to extend the utility to retrieve
the files from the DVH, and install new files in there. Is this worth
working on, or is someone else already at this?

See below for some examples.  First example (sd0) is a Irix-only disk, the
second example (sd1) has NetBSD filesystems on it.


 - Hubert

indy# ./dvhutil /dev/rsd0d
magic:             0x0be5a941 (should be 0x0be5a941)
root:              00
swap:              01
bootfile:          /unix   

Device parameters:
   skew:             45
   gap1:             0
   gap1:             0
   spares_cyl:       0
   cyls:             4792
   shd0:             0
   trks0:            4
   ctq_depth:        0
   cylshi:           0
   unused:           0
   secs:             108
   secbytes:         512
   interleave:       1
   flags:            52
   datarate:         0
   nretries:         32
   mspw:             0
   xgap1:            0
   xsync:            0
   xrdly:            0
   xgap2:            0
   xrgate:           0
   xwcont:           0

Volume Header:
 # name     block   bytes
 0 sgilabel     2     512
 1 ide        278  283648
 2 sash       832  283648
 3             -1       0

SGI Partition table:
 #    type     size   offset
 0     efs  1985904     2592
 1     raw    81648  1988496
 2       -        0        0
 3       -        0        0
 4       -        0        0
 5       -        0        0
 6       -        0        0
 7       -        0        0
 8       -     2592        0
 9       -        0        0
10  volume  2070144        0
11       -        0        0
12       -        0        0
13       -        0        0
14       -        0        0
15       -        0        0
indy# ./dvhutil /dev/rsd1d
magic:             0x0be5a941 (should be 0x0be5a941)
root:              00
swap:              01
bootfile:          /unix   

Device parameters:
   skew:             54
   gap1:             0
   gap1:             0
   spares_cyl:       0
   cyls:             14342
   shd0:             0
   trks0:            3
   ctq_depth:        0
   cylshi:           0
   unused:           0
   secs:             417
   secbytes:         512
   interleave:       1
   flags:            52
   datarate:         0
   nretries:         11
   mspw:             0
   xgap1:            0
   xsync:            0
   xrdly:            0
   xgap2:            0
   xrgate:           0
   xwcont:           0

Volume Header:
 # name     block   bytes
 0              0       0
 1              0       0
 2              0       0
 3              0       0
 4              0       0
 5              0       0
 6              0       0
 7              0       0
 8              0       0
 9              0       0
10              0       0
11              0       0
12              0       0
13              0       0
14              0       0

SGI Partition table:
 #    type     size   offset
 0     xfs 17676630     3753
 1     raw   261459 17680383
 2       -        0        0
 3       -        0        0
 4       -        0        0
 5       -        0        0
 6       -        0        0
 7       -        0        0
 8       -     3753        0
 9       -        0        0
10  volume 17941842        0
11       -        0        0
12       -        0        0
13       -        0        0
14       -        0        0
15       -        0        0
indy# 

-- 
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup  -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html 
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/