Annotation of wikisrc/ports/evbarm/install_using_sysinst.mdwn, revision 1.6
1.1 leot 1: [[!meta title="NetBSD/evbarm install via sysinst(8) on a SATA hard disk, USB stick or (u)SD card"]]
2:
3: In this document we will see step by step how to install NetBSD/evbarm on an
4: external media (SATA hard disk, USB stick or (u)SD card) using
5: [[!template id=man name="sysinst" section="8"]].
6:
7:
8: # Populating (u)SD card with `armv7.img`
9:
1.6 ! leot 10: - Download or build `armv7.img`, e.g.:
! 11: ````
! 12: $ ftp http://cdn.NetBSD.org/pub/NetBSD/NetBSD-8.0/evbarm-earmv7hf/binary/gzimg/armv7.img.gz
! 13: $ gunzip armv7.img.gz
! 14: ````
! 15: - Write the image to (u)SD card:
! 16: ````
! 17: $ dd if=armv7.img of=/dev/rsd0d bs=1m conv=sync
! 18: ````
! 19: - Write u-boot to (u)SD card. `u-boot` images are provided by
! 20: `sysutils/u-boot-<boardname>` packages, for example for Allwinner SoC:
! 21: ````
! 22: $ dd if=/usr/pkg/share/u-boot/<boardname>/u-boot-sunxi-with-spl.bin of=/dev/rld0d bs=1k seek=8 conv=sync
! 23: ````
1.1 leot 24:
25: *TODOleot*: Adjust/provide u-boot incantantions to boot on a BPI
26:
27:
28: # Installing via sysinst(8)
29:
1.2 leot 30: *TODOleot*: Document all sysinst(8) "screenshot"!
31:
1.3 leot 32: Now that the SD card is populated with `armv7.img` we can login as `root` (by
33: default the password is empty) and run `sysinst`:
1.2 leot 34:
1.4 leot 35: [[!template id=programlisting text="""
1.2 leot 36: # sysinst
1.4 leot 37: """]]
1.2 leot 38:
1.3 leot 39: The first menu is about the system type (Respberry PI or Other), we select the
40: latter ("Other"):
41:
1.4 leot 42: [[!template id=programlisting text="""
1.2 leot 43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53: +-------------------------------------+
54: | What kind of system do you have? |
55: | |
56: | a: Raspberry PI |
57: |>b: Other |
58: +-------------------------------------+
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
1.4 leot 69: """]]
1.2 leot 70:
1.3 leot 71: We want to install NetBSD/evbarm on the hard disk so let's select
72: "Install NetBSD to hard disk":
73:
1.4 leot 74: [[!template id=programlisting text="""
1.2 leot 75:
76: NetBSD/evbarm 8.0
77:
78: This menu-driven tool is designed to help you install NetBSD to a hard disk,
79: or upgrade an existing NetBSD system, with a minimum of work.
80: In the following menus type the reference letter (a, b, c, ...) to select an
81: item, or type CTRL+N/CTRL+P to select the next/previous item.
82: The arrow keys and Page-up/Page-down may also work.
83: Activate the current selection from the menu by typing the enter key.
84:
85: If you booted from a floppy, you may now remove the disk.
86: Thank you for using NetBSD!
87: +-----------------------------------------------+
88: | NetBSD-8.0 Install System |
89: | |
90: |>a: Install NetBSD to hard disk |
91: | b: Upgrade NetBSD on a hard disk |
92: | c: Re-install sets or install additional sets |
93: | d: Reboot the computer |
94: | e: Utility menu |
95: | f: Config menu |
96: | x: Exit Install System |
97: +-----------------------------------------------+
98:
99:
100:
1.4 leot 101: """]]
1.2 leot 102:
1.3 leot 103: Before proceeding with the installation, if the hard disk had any important data
104: it is better to stop and doing a backup before proceeding. If it is empty and/or
105: we can safetely remove its data we can proceed:
106:
1.4 leot 107: [[!template id=programlisting text="""
1.2 leot 108:
109: You have chosen to install NetBSD on your hard disk. This will change
110: information on your hard disk. You should have made a full backup before
111: this procedure! This procedure will do the following things:
112: a) Partition your disk
113: b) Create new BSD file systems
114: c) Load and install distribution sets
115: d) Some initial system configuration
116:
117: (After you enter the partition information but before your disk is changed,
118: you will have the opportunity to quit this procedure.)
119:
120: Shall we continue?
121: +---------------+
122: | yes or no? |
123: | |
124: | a: No |
125: |>b: Yes |
126: +---------------+
127:
128:
129:
130:
131:
132:
133:
1.4 leot 134: """]]
1.2 leot 135:
1.3 leot 136: Now we can see all the available disks. The hard disk attached via SATA is a
137: 120GB SSD recognized as `wd0`:
138:
1.4 leot 139: [[!template id=programlisting text="""
1.2 leot 140:
141: On which disk do you want to install NetBSD?
142:
143:
144: +-----------------------------------+
145: | Available disks |
146: | |
147: |>a: wd0 (112G, SanDisk SDSSDA120G) |
148: | b: Extended partitioning |
149: | x: Exit |
150: +-----------------------------------+
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
1.4 leot 166: """]]
1.2 leot 167:
1.3 leot 168: We now need to edit MBR partition table. We will create two MBR partitions: the
169: first one a FAT32 for `/boot` and the other for NetBSD. We select "Edit the MBR
170: partition table":
171:
1.4 leot 172: [[!template id=programlisting text="""
1.2 leot 173:
174: We are now going to install NetBSD on the disk wd0.
175:
176: NetBSD requires a single partition in the disk's MBR partition table, this is
177: split further by the NetBSD disklabel. NetBSD can also access file systems
178: in other MBR partitions.
179:
180: If you select 'Use the entire disk' then the previous contents of the disk
181: will be overwritten and a single MBR partition used to cover the entire disk.
182: If you want to install more than one operating system then edit the MBR
183: partition table and create a partition for NetBSD.
184:
185: A few hundred MB is enough for a basic installation, but you should allow
186: extra for additional software and user files.
187: Allow at least 5GB if you want to build NetBSD itself.
188: +---------------------------------+
189: | Which would you like to do? |
190: | |
191: |>a: Edit the MBR partition table |
192: | b: Use the entire disk |
193: +---------------------------------+
194:
195:
196:
197:
198:
1.4 leot 199: """]]
1.2 leot 200:
1.3 leot 201: First we select the second entry ("b"), set the "type:" to "NetBSD":
202:
1.4 leot 203: [[!template id=programlisting text="""
1.2 leot 204:
205: The Current MBR partition table is shown below.
206: Flgs: a => Active partition, I => Install here.
207: Select the partition you wish to change:
208:
209: Total disk size 114473 MB.
210: +-----------------------------------------------------------+
211: Start( MB) |>a: type: unused |
212: ---------- | b: start: 0 MB |
213: a: | c: size: 0 MB |
214: >b: | d: end: 0 MB |
215: c: | e: active: No |
216: d: +-----------------------------------+ |
217: e: Change in| a: Don't change |linders/MB) |
218: x: Partition| b: Delete partition | |
219: |>c: NetBSD |-------------------------+
220: | d: Extended partition, LBA |
221: | e: FreeBSD/386BSD |
222: | f: OpenBSD |
223: | g: Linux native |
224: | h: Linux swap |
225: | i: DOS FAT12 |
1.5 leot 226: | <: page up, >: page down |
1.2 leot 227: +-----------------------------------+
228:
229:
1.4 leot 230: """]]
1.2 leot 231:
1.3 leot 232: We reserve for the NetBSD MBR partition all the end of the disk,
233: starting at 92MB (1MB that will be empty and 91MB that will be for
234: the FAT32), we also select to make it active ("active: Yes") and
235: we will use it to install NetBSD ("install: Yes"):
236:
1.4 leot 237: [[!template id=programlisting text="""
1.2 leot 238:
239: The Current MBR partition table is shown below.
240: Flgs: a => Active partition, I => Install here.
241: Select the partition you wish to change:
242:
243: Total disk size 114473 MB.
244: +-----------------------------------------------------------+
245: Start( MB) | a: type: NetBSD |
246: ---------- | b: start: 92 MB |
247: a: | c: size: 114381 MB |
248: >b: | d: end: 114473 MB |
249: c: | e: active: Yes |
250: d: | f: install: Yes |
251: e: Change inpu| g: Change input units (sectors/cylinders/MB) |
252: x: Partition t|>x: Partition OK |
253: +-----------------------------------------------------------+
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
1.4 leot 264: """]]
1.2 leot 265:
1.3 leot 266: We now select the first partition ("a") and create a "Windows FAT32", starting
267: at 1MB and ending at 92MB before the "NetBSD" partition. We also make it active
268: ("active: Yes"):
269:
1.4 leot 270: [[!template id=programlisting text="""
1.2 leot 271:
272: The Current MBR partition table is shown below.
273: Flgs: a => Active partition, I => Install here.
274: Select the partition you wish to change:
275:
276: Total disk size 114473 MB.
277: +-----------------------------------------------------------+
278: Start( MB) | a: type: Windows FAT32 |
279: ---------- | b: start: 1 MB |
280: >a: | c: size: 91 MB |
281: b: 92 | d: end: 92 MB |
282: c: | e: active: Yes |
283: d: | f: install: No |
284: e: Change inpu| g: Change input units (sectors/cylinders/MB) |
285: x: Partition t|>x: Partition OK |
286: +-----------------------------------------------------------+
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
1.4 leot 297: """]]
1.2 leot 298:
1.3 leot 299: Here the final MBR partition table:
300:
1.4 leot 301: [[!template id=programlisting text="""
1.2 leot 302:
303: The Current MBR partition table is shown below.
304: Flgs: a => Active partition, I => Install here.
305: Select the partition you wish to change:
306:
307: Total disk size 114473 MB.
308:
309: Start( MB) Size( MB) Flg Kind
310: ---------- ---------- --- ----------------
311: >a: 1 91 a Windows FAT32
312: b: 92 114381 I NetBSD
313: c: unused
314: d: unused
315: e: Change input units (sectors/cylinders/MB)
316: x: Partition table OK
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
1.4 leot 328: """]]
1.2 leot 329:
1.3 leot 330: Now that the MBR partition table is written we can proceed to set
331: sizes of NetBSD partitions:
332:
1.4 leot 333: [[!template id=programlisting text="""
1.2 leot 334:
335: NetBSD uses a BSD disklabel to carve up the NetBSD portion of the disk into
336: multiple BSD partitions. You must now set up your BSD disklabel.
337:
338: You can use a simple editor to set the sizes of the NetBSD partitions, or
339: keep the existing partition sizes and contents.
340:
341: You will then be given the opportunity to change any of the disklabel fields.
342:
343: The NetBSD part of your disk is 114381 Megabytes. A full installation
344: requires at least 288 Megabytes without X and at least 348 Megabytes if the X
345: sets are included.
346: +-----------------------------------+
347: | Choose your installation |
348: | |
349: |>a: Set sizes of NetBSD partitions |
350: | b: Use existing partition sizes |
351: +-----------------------------------+
352:
353:
354:
355:
356:
357:
358:
359:
1.4 leot 360: """]]
1.2 leot 361:
1.3 leot 362: We set the swap size to 4G and we reserve the rest of the space for "/":
363:
1.4 leot 364: [[!template id=programlisting text="""
1.2 leot 365:
366: You can now change the sizes for the system partitions. The default is to
367: allocate all the space to the root file system. However, you may wish to
368: have separate /usr (additional system files), /var (log files etc) or /home
369: (users' home directories) file systems.
370:
371: Free space will be added to the partition marked with a '+'.
372:
373: MB Cylinders Sectors Filesystem
374: a: 2208(110284) 4488 4523904 + /
375: b: 4096 8323 8389584 swap
376: c: 0 0 0 /tmp (mfs)
377: d: 0 0 0 /usr
378: e: 0 0 0 /var
379: f: 0 0 0 /home
380: g: Add a user defined partition
381: h: Change input units (sectors/cylinders/MB)
382: >x: Accept partition sizes. Free space 108076 MB, 13 free partitions.
383:
384:
385:
386:
387:
388:
389:
390:
1.4 leot 391: """]]
1.2 leot 392:
1.3 leot 393: The summary of the current BSD disklabel is:
394:
1.4 leot 395: [[!template id=programlisting text="""
1.2 leot 396:
397: We now have your BSD disklabel partitions as:
398: This is your last chance to change them.
399:
400: Start MB End MB Size MB FS type Newfs Mount Mount point
401: --------- --------- --------- ---------- ----- ----- -----------
402: >a: 92 110375 110284 FFSv1 Yes Yes /
403: b: 110376 114472 4096 swap
404: c: 0 114472 114473 Whole disk
405: d: 0 0 0 unused
406: e: 1 91 91 Boot partition
407: f: 0 0 0 unused
408: g: Show all unused partitions
409: h: Change input units (sectors/cylinders/MB)
410: x: Partition sizes ok
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
1.4 leot 422: """]]
1.2 leot 423:
1.3 leot 424: We can adjust the disklabel, for example we can use FFSv2 for "/"
425: and for the disklabel "e" set its mount point to "/boot" in order
426: that an `/etc/fstab` entry will be populated (please note
427: that "/boot" will not be automatically mounted by default):
428:
1.4 leot 429: [[!template id=programlisting text="""
1.2 leot 430:
431: We now have your BSD disklabel partitions as:
432: This is your last chance to change them.
433:
434: Start MB End MB Size MB FS type Newfs Mount Mount point
435: --------- --------- --------- ---------- ----- ----- -----------
436: a: 92 110375 110284 FFSv2 Yes Yes /
437: b: 110376 114472 4096 swap
438: c: 0 114472 114473 Whole disk
439: d: 0 0 0 unused
440: e: 1 91 91 Boot partition /boot
441: f: 0 0 0 unused
442: g: Show all unused partitions
443: h: Change input units (sectors/cylinders/MB)
444: >x: Partition sizes ok
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
1.4 leot 456: """]]
1.2 leot 457:
1.3 leot 458: We have finally ready to proceed with
459: [[!template id=man name="sysinst" section="8"]] as usual and install
460: the installation sets. If you choose to install via FTP/HTTP please
461: note that the "Binary set directory" needs to be adjusted from
462: `/evbarm/binary/sets` to `/evbarm-earmv7hf/binary/sets` (it's
463: missing an `-earmv7hf' due different evbarm-s):
464:
1.4 leot 465: [[!template id=programlisting text="""
1.2 leot 466:
467: The following are the http site, directory, user, and password that will be
468: used. If "user" is "ftp", then the password is not needed.
469:
470: a: Host ftp.NetBSD.org
471: b: Base directory pub/NetBSD/NetBSD-8.0
472: >c: Binary set directory /evbarm-earmv7hf/binary/sets
473: d: Source set directory /source/sets
474: e: User ftp
475: f: Password
476: g: Proxy
477: h: Transfer directory /usr/INSTALL
478: i: Delete after install No
479: j: Configure network
480: k: Exit
481: x: Get Distribution
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
1.4 leot 492: """]]
1.2 leot 493:
1.3 leot 494: The installation will proceed as usual and for more information
495: please give a look to
496: [The NetBSD Guide](https://www.netbsd.org/docs/guide/en/chap-exinst.html#exinst-choose-media).
497:
498: *TODOleot*: add information how to populate `/boot` and prepare `boot.cmd`,
499: `boot.scr`.
500:
1.4 leot 501: [[!template id=programlisting text="""
1.2 leot 502: # mount /dev/wd0e /mnt
503: # cp -r /boot/* /mnt/
1.4 leot 504: """]]
1.1 leot 505:
506:
507: # References
508:
509: *TODOleot*: add a reference to the instructions shared via PR port-evbarm/50806.
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb