prep revision 1.1
1NOTE:  These instructions are explicitly for installing NetBSD
2from an HP-UX system, version 7 or later.  It has not been
3tested with HP-UX versions earlier than 7, and has also not
4been tested with HP-UX 8, although it is presumed to work.
5For the creative, similar steps may be taken from a system such
6as Utah's 4.3BSD release for the hp300, although bootstrapping
7from such a system has not been tested.
8
9Bootstrapping the hp300 is a complicated process, but it's a lot
10easier than it used to be.  For this process you need the
11following items from the install/ directory:
12
13	boot		NetBSD/hp300 boot block for
14			HP-IB and SCSI disks
15
16	rootimage.gz	bootstrap root filesystem
17			image
18
19	label		prototype disk label
20
21	makedisk	a program for HP-UX that will
22			write a NetBSD disk label,
23			boot block, and root filesystem
24			image to the target disk
25			(NOTE:  This is an HP-UX 7.x binary.
26			while it will work under HP-UX 9.x,
27			you may want to compile this yourself.
28			The source may be found in makedisk.tar.gz)
29
30VERY IMPORTANT NOTE: This procedure will destroy all data on the
31target disk.  Because NetBSD uses a different filesystem format than
32HP-UX, your old data will be useless.  If you wish to save anything,
33use tar(1) instead of dump(1M), again because of filesystem differences.
34
35First of all, you must have a second disk on which to install NetBSD.
36If possible, this disk should first be prepared with mediainit(1M).
37Once this disk is spotless, you should generate a disk label for it.
38Using the prototype label provided, fill in all of the necessary
39information.  Remember, if you derive geometry information from an
40HP-UX disktab, your partition size will be off.  This is because HP-UX
41uses a 1024-byte sector size, while NetBSD uses a 512-byte sector size.
42To avoid the problem, you may simply double the number of cylinders.
43(That's what I do...works great.  -- JRT)
44
45IMPORTANT:  Partition 'a' must be offset one cylinder.  Since
46partition information is expressed in sectors, the offset of
47partition 'a' must be the value of `sectors/cylinder'.  This is
48to leave room for the boot block.
49
50When you create your disklabel, be sure to specify whether or not
51the disk is HP-IB or SCSI in the `type:' field.
52
53Below is an example of what a disk label should look like.  This
54is an example only!  Do not attempt this at home!
55
56
57
58# Sample disklabel for example only.  This is a comment.
59type: HP-IB
60disk: 
61label: INSTALL-1_0
62flags:
63bytes/sector: 512
64sectors/track: 36
65tracks/cylinder: 7
66sectors/cylinder: 252
67cylinders: 1013
68rpm: 3600
69interleave: 1
70trackskew: 0
71cylinderskew: 0
72headswitch: 0		# milliseconds
73track-to-track seek: 0	# milliseconds
74drivedata: 0 
75
767 partitions:
77#        size   offset    fstype   [fsize bsize   cpg]
78  a:    30744      252    4.2BSD     1024  8192    16 	# (Cyl.    1 - 122)
79  b:    32760    30996      swap                    	# (Cyl.  123 - 252)
80  c:   255276        0      boot                    	# (Cyl.    0 - 1012)
81  e:    20412    63756    4.2BSD     1024  4096    16 	# (Cyl.  253 - 333)
82  f:    40824    84168    4.2BSD     1024  8192    16 	# (Cyl.  334 - 495)
83  g:   130284   124992    4.2BSD     1024  8192    16 	# (Cyl.  496 - 1012)
84
85NOTE:  Due to the nature of the bootstrapping procedure, your 'a'
86partition must be at least 30744 sectors long.  Increase the size of
87your 'a' partition just enough to make it end on a cylinder boundary.
88If you make it any larger, you will just be wasting space, as the
89filesystem ends after 30744 sectors.
90
91Remember to write down the names of the partitions and what you
92will be using them for (i.e. 'a - root, b - swap, e - /usr, etc.')
93as you will need this information later on in the installation
94process.
95
96Once you are satisfied with your disklabel, you can write the
97root filesystem image to the target disk.  Use the `makedisk'
98program for this.  So, under HP-UX, do:
99
100	./makedisk /dev/rdsk/c7d0s0 mylabel boot rootimage.gz
101
102where:
103	/dev/rdsk/c7d0s0	raw flavor of target disk device
104
105	mylabel			disk label you just wrote
106
107	boot			supplied boot block
108
109	rootimage.gz		gzipped root filesystem image
110				NOTE: This requires that gzip be
111				installed on your HP-UX system.
112				If it is not, a gzip binary is
113				provided in the install/ directory.
114				Source for gzip may be found in the
115				gsrc10 distribution set.  Again, this
116				gzip is an HP-UX 7.x binary.
117
118If you wish to label any additional disks, you will have to do this
119from NetBSD, although you will not have an editor at your disposal.
120To do this, simply generate the labels now, and then grab them at
121the same time and by the same method you use to grab the distrubtion
122sets.
123
124Once this is done, you should be ready to boot NetBSD from the target
125disk.
126