1: Introduction
2: ============
3:
4: <table>
5: <tbody>
6: <tr class="odd">
7: <td align="left"><p>This document describes in depth how to prepare your Iomega StorCenter G2 for installing NetBSD/sandpoint. The three supported models are:</p>
8: <ul>
9: <li>StorCenter G2 Single Drive, 200MHz</li>
10: <li>StorCenter G2 Dual Drive, 200MHz</li>
11: <li>StorCenter G2 Quad Drive, 266MHz</li>
12: </ul>
13: <p>All models have 64 MB RAM and a PATA disk interface. Note that newer StorCenter models use an ARM CPU and are not supported.</p>
14: <p>To install NetBSD/sandpoint you will have to open the case for getting access to the serial console. This is shown here for the Single Drive model.</p></td>
15: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_portrait.jpg" alt="StorCenter Single Drive" /></td>
16: </tr>
17: </tbody>
18: </table>
19:
20: Accessing the serial interface
21: ==============================
22:
23: We need a serial console to get access to the firmware. That includes
24: soldering a cable to the board and building (or buying) a serial adapter
25: to convert from the StorCenter's TTL levels to RS232 levels.
26:
27: Disassemble the StorCenter Single Drive
28: ---------------------------------------
29:
30: <table>
31: <tbody>
32: <tr class="odd">
33: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_open1.jpg" alt="StorCenter disassembly step 1" /></td>
34: <td align="left"><p>The Single Drive model is somewhat tricky to open. Move the cover by applying some force into the direction away from the interface bezel. It will eventually snap open. Then remove the metal shielding. Again, there are no screws. It is held in place by some brackets. Just pull it upwards and you will see the hard disk.</p></td>
35: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_open2.jpg" alt="StorCenter disassembly step 2" /></td>
36: </tr>
37: </tbody>
38: </table>
39:
40: <table>
41: <tbody>
42: <tr class="odd">
43: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_open3.jpg" alt="StorCenter disassembly step 3" /></td>
44: <td align="left"><p>Do not try to access the screws, which are securing the disk drive, through the plastic vents. To be able to pull the metal case up we have to remove four screws at the bottom first, which are hidden behind a plastic plate. Pry open the plastic plate using a levering tool, like a screw driver. You will need some force to do that.</p></td>
45: </tr>
46: </tbody>
47: </table>
48:
49: <table>
50: <tbody>
51: <tr class="odd">
52: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_open4.jpg" alt="StorCenter disassembly step 4" /></td>
53: <td align="left"><p>Remove the four screws at the bottom. Now you can easily pull the metal case out.</p></td>
54: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_open5.jpg" alt="StorCenter disassembly step 5" /></td>
55: </tr>
56: </tbody>
57: </table>
58:
59: <table>
60: <tbody>
61: <tr class="odd">
62: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_open6.jpg" alt="StorCenter disassembly step 6" /></td>
63: <td align="left"><p>Remove the four screws which are securing the hard disk and unplug its connectors. Also remove the fan and the LED from the metal case. Now you can pull the mainboard out of the metal case, by moving it into the direction of the rear bezel.</p></td>
64: </tr>
65: </tbody>
66: </table>
67:
68: Locate the serial header
69: ------------------------
70:
71: Look out for an unpopulated 8-pin header, called `J11` (marked red on
72: the picture to the left). The leftmost four pins can be used for the
73: serial interface. The pin assignments are shown in the table.
74:
75: <table>
76: <tbody>
77: <tr class="odd">
78: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_board.jpg" alt="StorCenter mainboard" /></td>
79: <td align="left"><table>
80: <tbody>
81: <tr class="odd">
82: <td align="left"><strong>Pin number</strong></td>
83: <td align="left"><strong>Function</strong></td>
84: </tr>
85: <tr class="even">
86: <td align="left">1</td>
87: <td align="left">3.3V</td>
88: </tr>
89: <tr class="odd">
90: <td align="left">2</td>
91: <td align="left">TXD</td>
92: </tr>
93: <tr class="even">
94: <td align="left">3</td>
95: <td align="left">GND</td>
96: </tr>
97: <tr class="odd">
98: <td align="left">4</td>
99: <td align="left">RXD</td>
100: </tr>
101: </tbody>
102: </table></td>
103: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_ser_header.jpg" alt="Header pin assignments" /></td>
104: </tr>
105: </tbody>
106: </table>
107:
108: Attaching a serial cable
109: ------------------------
110:
111: <table>
112: <tbody>
113: <tr class="odd">
114: <td align="left"><p>It is not recommended to solder a header onto <code>J11</code>, because then you would no longer be able to close the case. Instead you should just solder a 4-wire ribbon cable, which is flat enough to hide under the disk drive. Also make sure to choose a small 4-pin plug, which you can connect to your external cable with the actual D-SUB 9 connector. Alternatively you can cut a hole into the case.</p></td>
115: <td align="left"><img src="http://www.netbsd.org/images/ports/sandpoint/iomega_ser_cable.jpg" alt="StorCenter serial cable attached" /></td>
116: </tr>
117: </tbody>
118: </table>
119:
120: Serial connection
121: -----------------
122:
123: The serial port on the StorCenter is using 3.3V TTL levels, which have
124: to be converted into regular RS232 levels by a level shifter circuit. If
125: you are not anxious using a soldering iron you find detailed
126: instructions how to build such a converter here:
127:
128: - [Serial adapter for 3.3V TTL](http://www.netbsd.org/ports/sandpoint/ttl2rs232.html)
129:
130: Make sure that the layout of the plug fits to the pinout of the
131: StorCenter's serial header, as shown above.
132:
133: Another option is to buy such a converter. There are solutions for a
134: standard RS232 interface and for an USB interface. Look out for:
135:
136: - RS232 level shifter / breakout board (MAX3232 based)
137: - USB to TLL serial level shifter / breakout board (FT232 based)
138:
139: First installation
140: ==================
141:
142: Accessing the Firmware
143: ----------------------
144:
145: Provided the serial converter is installed and working correctly you
146: should be able to connect to the firmware's serial console. Iomega is
147: using [U-Boot](http://www.denx.de/wiki/U-Boot/), the Universal Boot
148: Loader.
149:
150: Now you can connect with any terminal program to the StorCenter's serial
151: console. The easiest approach may be to use NetBSD's `tip(1)` command to
152: make a direct console connection at 115200bps.
153:
154: # tip -115200 console
155:
156: Note that when using a serial connection via USB you may have to make an
157: entry for `/dev/ttyU0` in `/etc/remote`.
158:
159: Immediately after switching your StorCenter on it will display the
160: following information (output is from a Single Drive model) and gives
161: you one second to stop autobooting.
162:
163: U-Boot 1.0.0 (Sep 2 2005 - 14:49:11)
164:
165: CPU: MPC8241 Revision 1.4 at 199.999 MHz: 16 kB I-Cache 16 kB D-Cache
166: Board: StorCenter
167: PICR1 is now 00141b98
168: PICR2 is now 00040605
169: AMBOR is now c1
170: DRAM: 64 MB
171: FLASH: 8 MB
172: In: serial
173: Out: serial
174: Err: serial
175: Net: PCI device RTL8169#0: unknown chip version, assuming RTL-8169
176: PCI device: TxConfig = 0x0
177: RTL8169#0
178: Hit any key to stop autoboot: 0
179:
180: altboot
181: -------
182:
183: The `altboot(8)` utility functions as a bridge between the Iomega
184: firmware and the NetBSD kernel startup environment. NAS firmware often
185: provides no means to boot a kernel from disk or from the network and
186: doesn't initialize all hardware correctly. We will also use it to pass a
187: bootinfo list to the kernel.
188:
189: The `altboot` boot loader has to be loaded and started using U-Boot.
190: Usually there are three ways to invoke it:
191:
192: - **loadb** to load a binary file via serial line in kermit mode
193: - **tftpboot** to load a binary file over the network with TFTP protocol
194: - start it from the flash memory
195:
196: The last option is prefered once the installation is completed, but
197: obviously it is not possible for the first time boot. Fortunately U-Boot
198: has set up the network interface, which we can use after configuring the
199: `ipaddr` and `serverip` environment variables:
200:
201: <pre>
202: IOMEGA=> <strong>setenv ipaddr 192.168.0.105</strong>
203: IOMEGA=> <strong>setenv serverip 192.168.0.5</strong>
204: IOMEGA=> <strong>saveenv</strong>
205: Saving Environment to Flash...
206: Un-Protected 1 sectors
207: Erasing Flash...
208: . done
209: Erased 1 sectors
210: Writing to Flash... done
211: Protected 1 sectors
212: </pre>
213:
214: Once you have set up TFTP and DHCP ([read below](#altboot_install)) you
215: can download `altboot` like this:
216:
217: <pre>
218: IOMEGA=> <strong>tftp 1000000 altboot.bin</strong>
219: TFTP from server 192.168.0.5; our IP address is 192.168.0.105
220: Filename 'altboot.bin'.
221: Load address: 0x1000000
222: Loading: ###############
223: done
224: Bytes transferred = 74732 (123ec hex)
225: </pre>
226:
227: Boot the INSTALL kernel with altboot
228: ------------------------------------
229:
230: Now you can use `altboot` to launch the `netbsd-INSTALL` kernel for
231: installing NetBSD. You may choose to load it with TFTP or from NFS. For TFTP
232: you have to enable `tftpd(8)` in `/etc/inetd.conf`, and for NFS there is
233: a documentation at [The Network File
234: System](http://www.&os;.org/docs/guide/en/chap-net-services.html#chap-net-services-nfs).
235: But in both cases you have to set up a DHCP server, which is explained
236: in the [DHCP Howto](http://www.&os;.org/docs/network/dhcp.html). An
237: appropriate `dhcpd.conf` entry could look like this:
238:
239: host storcenter {
240: hardware ethernet 00:d0:b8:xx:xx:xx;
241: fixed-address 192.168.0.105;
242: next-server 192.168.0.5;
243: option root-path "/export/storcenter/root";
244: }
245:
246: The `root-path` option is only needed when using NFS and should match
247: your exported NFS directory. Uncompress `netbsd-INSTALL.gz` from the
248: NetBSD/sandpoint distribution and copy it into the NFS or TFTP directory.
249: Then start the DHCP, NFS or TFTP server and boot the installation kernel
250: from the firmware either with
251:
252: <pre>
253: IOMEGA=> <strong>go 1000000 tftp:netbsd-INSTALL</strong>
254: </pre>
255:
256: or from NFS:
257:
258: <pre>
259: IOMEGA=> <strong>go 1000000 nfs:netbsd-INSTALL</strong>
260: </pre>
261:
262: Our bootloader configures the hardware, determines the IP address, loads
263: the kernel via network and launches it:
264:
265: ## Starting application at 0x01000000 ...
266:
267: >> NetBSD/sandpoint altboot, revision 1.8 (Wed Nov 23 21:51:40 CET 2011)
268: >> IOMEGA StorCenter G2, cpu 200 MHz, bus 100 MHz, 64MB SDRAM
269: channel 0 present
270: wd0: <ST3300822A> DMA LBA LBA48 286168 MB
271: wd0: no disklabel
272: MAC address 00:d0:b8:xx:xx:xx
273: 100Mbps-FDX
274: Hit any key to enter interactive mode: 0
275: loading "netbsd-INSTALL" 5222228+112540=0x516b78
276: entry=0x90000, ssym=0x5a66f0, esym=0x5a6b78
277: Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
278: 2006, 2007, 2008, 2009, 2010, 2011
279: The NetBSD Foundation, Inc. All rights reserved.
280: Copyright (c) 1982, 1986, 1989, 1991, 1993
281: The Regents of the University of California. All rights reserved.
282:
283: NetBSD 5.99.59 (INSTALL) #10: Fri Dec 30 18:53:09 CET 2011
284: frank@compaq.owl.de:/home/frank/netbsd/current/src/sys/arch/sandpoint/compile/obj/INSTALL
285: Model: iomega
286: total memory = 65536 KB
287: avail memory = 57904 KB
288: OpenPIC Version 1.2: Supports 1 CPUs and 26 interrupt sources.
289: mainbus0 (root)
290: cpu0 at mainbus0: 8245 (Revision 0.4), ID 0 (primary)
291: cpu0: HID0 0x90c000<DOZE,DPM,ICE,DCE>, powersave: 1
292: eumb0 at mainbus0
293: com0 at eumb0 unit 0: ns16550a, working fifo
294: com0: console
295: com0: interrupting at irq 40
296: ociic0 at eumb0
297: iic0 at ociic0: I2C bus
298: dsrtc0 at iic0 addr 0x68: DS1307 Real-time Clock/NVRAM
299: satmgr0 at eumb0 unit 1: button manager (iomega)
300: satmgr0: interrupting at irq 41
301: pci0 at mainbus0 bus 0
302: pchb0 at pci0 dev 0 function 0
303: pchb0: vendor 0x1057 product 0x0006 (rev. 0x14)
304: viaide0 at pci0 dev 13 function 0
305: viaide0: VIA Technologies VT6410 IDE controller
306: viaide0: using irq 17 for native-PCI interrupt
307: atabus0 at viaide0 channel 0
308: atabus1 at viaide0 channel 1
309: ohci0 at pci0 dev 14 function 0: vendor 0x1033 product 0x0035 (rev. 0x43)
310: ohci0: interrupting at irq 18
311: ohci0: OHCI version 1.0
312: usb0 at ohci0: USB revision 1.0
313: ohci1 at pci0 dev 14 function 1: vendor 0x1033 product 0x0035 (rev. 0x43)
314: ohci1: interrupting at irq 19
315: ohci1: OHCI version 1.0
316: usb1 at ohci1: USB revision 1.0
317: ehci0 at pci0 dev 14 function 2: vendor 0x1033 product 0x00e0 (rev. 0x04)
318: ehci0: interrupting at irq 20
319: ehci0: companion controllers, 3 ports each: ohci0 ohci1
320: usb2 at ehci0: USB revision 2.0
321: re0 at pci0 dev 15 function 0: RealTek 8169/8110 Gigabit Ethernet (rev. 0x10)
322: re0: interrupting at irq 16
323: re0: Ethernet address 00:d0:b8:xx:xx:xx
324: rgephy0 at re0 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 3
325: rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
326: biomask 1f000000 netmask 1f000000 ttymask 1f000000
327: uhub0 at usb0: vendor 0x1033 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
328: uhub1 at usb1: vendor 0x1033 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
329: uhub2 at usb2: vendor 0x1033 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
330: wd0 at atabus0 drive 0
331: wd0: <ST3300822A>
332: wd0: 279 GB, 581421 cyl, 16 head, 63 sec, 512 bytes/sect x 586072368 sectors
333: boot device: re0
334: root on md0a dumps on md0b
335: root file system type: ffs
336: WARNING: preposterous TOD clock time
337: WARNING: using filesystem time
338: WARNING: CHECK AND RESET THE DATE!
339: erase ^H, werase ^W, kill ^U, intr ^C, status ^T
340: Terminal type? [vt100]
341:
342: Just follow the usual procedure to install a NetBSD system.
343:
344: <img src="//www.netbsd.org/images/ports/sandpoint/install_window.jpg" alt="Sandpoint installation window" /></td>
345:
346: Post installation steps
347: =======================
348:
349: After a successful installation you want to make the system boot
350: standalone when switched on, without the need for a serial console. So
351: you have to modify the `bootcmd` in U-Boot's environment and write the
352: `altboot.bin` binary to the Flash ROM.
353:
354: To find a suitable place in the Flash ROM you can use the **flinfo**
355: command and look out for empty sectors `(E)`. On my StorCenter I have
356: chosen `0xffe80000`. Replace that in all the following commands if you
357: have chosen a different address.
358:
359: Load `altboot.bin` into memory at `0x1000000` again, as explained above.
360: Then execute the following commands to write it to Flash ROM:
361:
362: <pre>
363: IOMEGA=> <strong>protect off ffe80000 ffe9ffff</strong>
364: Un-Protected 2 sectors
365: IOMEGA=> <strong>erase ffe80000 ffe9ffff</strong>
366:
367: . done
368: Erased 2 sectors
369: IOMEGA=> <strong>cp.b 1000000 ffe80000 18000</strong>
370: Copy to Flash... done
371: IOMEGA=> <strong>protect on ffe80000 ffe9ffff</strong>
372: Protected 2 sectors
373: </pre>
374:
375: Finally adapt the `bootcmd` environment string to autoboot `altboot` and
376: start the `netbsd` kernel (which is the default name) from `wd0` on each
377: reboot:
378:
379: <pre>
380: IOMEGA=> <strong>setenv bootcmd cp.b ffe80000 1000000 18000\; go 1000000 wd0:</strong>
381: IOMEGA=> <strong>saveenv</strong>
382: Saving Environment to Flash...
383: Un-Protected 1 sectors
384: Erasing Flash...
385: . done
386: Erased 1 sectors
387: Writing to Flash... done
388: Protected 1 sectors
389: </pre>
390:
391: The `\` is important for **setenv** not to misinterpret the `;` as the end
392: of the command.
393:
394: Have fun with your mini NetBSD server!
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb