[[!meta title="NetBSD/evbarm install via sysinst(8) on a SATA hard disk, USB stick or (u)SD card"]] In this document we will see step by step how to install NetBSD/evbarm on an external media (SATA hard disk, USB stick or (u)SD card) using [[!template id=man name="sysinst" section="8"]]. # Populating (u)SD card with `armv7.img` *TODOleot*: (mostly) copy-paste instructions from allwinner.mdwn *TODOleot*: Adjust/provide u-boot incantantions to boot on a BPI # Installing via sysinst(8) *TODOleot*: Document all sysinst(8) "screenshot"! ```` # sysinst ```` ```` +-------------------------------------+ | What kind of system do you have? | | | | a: Raspberry PI | |>b: Other | +-------------------------------------+ ```` ```` NetBSD/evbarm 8.0 This menu-driven tool is designed to help you install NetBSD to a hard disk, or upgrade an existing NetBSD system, with a minimum of work. In the following menus type the reference letter (a, b, c, ...) to select an item, or type CTRL+N/CTRL+P to select the next/previous item. The arrow keys and Page-up/Page-down may also work. Activate the current selection from the menu by typing the enter key. If you booted from a floppy, you may now remove the disk. Thank you for using NetBSD! +-----------------------------------------------+ | NetBSD-8.0 Install System | | | |>a: Install NetBSD to hard disk | | b: Upgrade NetBSD on a hard disk | | c: Re-install sets or install additional sets | | d: Reboot the computer | | e: Utility menu | | f: Config menu | | x: Exit Install System | +-----------------------------------------------+ ```` ```` You have chosen to install NetBSD on your hard disk. This will change information on your hard disk. You should have made a full backup before this procedure! This procedure will do the following things: a) Partition your disk b) Create new BSD file systems c) Load and install distribution sets d) Some initial system configuration (After you enter the partition information but before your disk is changed, you will have the opportunity to quit this procedure.) Shall we continue? +---------------+ | yes or no? | | | | a: No | |>b: Yes | +---------------+ ```` ```` On which disk do you want to install NetBSD? +-----------------------------------+ | Available disks | | | |>a: wd0 (112G, SanDisk SDSSDA120G) | | b: Extended partitioning | | x: Exit | +-----------------------------------+ ```` ```` We are now going to install NetBSD on the disk wd0. NetBSD requires a single partition in the disk's MBR partition table, this is split further by the NetBSD disklabel. NetBSD can also access file systems in other MBR partitions. If you select 'Use the entire disk' then the previous contents of the disk will be overwritten and a single MBR partition used to cover the entire disk. If you want to install more than one operating system then edit the MBR partition table and create a partition for NetBSD. A few hundred MB is enough for a basic installation, but you should allow extra for additional software and user files. Allow at least 5GB if you want to build NetBSD itself. +---------------------------------+ | Which would you like to do? | | | |>a: Edit the MBR partition table | | b: Use the entire disk | +---------------------------------+ ```` ```` The Current MBR partition table is shown below. Flgs: a => Active partition, I => Install here. Select the partition you wish to change: Total disk size 114473 MB. +-----------------------------------------------------------+ Start( MB) |>a: type: unused | ---------- | b: start: 0 MB | a: | c: size: 0 MB | >b: | d: end: 0 MB | c: | e: active: No | d: +-----------------------------------+ | e: Change in| a: Don't change |linders/MB) | x: Partition| b: Delete partition | | |>c: NetBSD |-------------------------+ | d: Extended partition, LBA | | e: FreeBSD/386BSD | | f: OpenBSD | | g: Linux native | | h: Linux swap | | i: DOS FAT12 | | <: page up, >: page down | +-----------------------------------+ ```` ```` The Current MBR partition table is shown below. Flgs: a => Active partition, I => Install here. Select the partition you wish to change: Total disk size 114473 MB. +-----------------------------------------------------------+ Start( MB) | a: type: NetBSD | ---------- | b: start: 92 MB | a: | c: size: 114381 MB | >b: | d: end: 114473 MB | c: | e: active: Yes | d: | f: install: Yes | e: Change inpu| g: Change input units (sectors/cylinders/MB) | x: Partition t|>x: Partition OK | +-----------------------------------------------------------+ ```` ```` The Current MBR partition table is shown below. Flgs: a => Active partition, I => Install here. Select the partition you wish to change: Total disk size 114473 MB. +-----------------------------------------------------------+ Start( MB) | a: type: Windows FAT32 | ---------- | b: start: 1 MB | >a: | c: size: 91 MB | b: 92 | d: end: 92 MB | c: | e: active: Yes | d: | f: install: No | e: Change inpu| g: Change input units (sectors/cylinders/MB) | x: Partition t|>x: Partition OK | +-----------------------------------------------------------+ ```` ```` The Current MBR partition table is shown below. Flgs: a => Active partition, I => Install here. Select the partition you wish to change: Total disk size 114473 MB. Start( MB) Size( MB) Flg Kind ---------- ---------- --- ---------------- >a: 1 91 a Windows FAT32 b: 92 114381 I NetBSD c: unused d: unused e: Change input units (sectors/cylinders/MB) x: Partition table OK ```` ```` NetBSD uses a BSD disklabel to carve up the NetBSD portion of the disk into multiple BSD partitions. You must now set up your BSD disklabel. You can use a simple editor to set the sizes of the NetBSD partitions, or keep the existing partition sizes and contents. You will then be given the opportunity to change any of the disklabel fields. The NetBSD part of your disk is 114381 Megabytes. A full installation requires at least 288 Megabytes without X and at least 348 Megabytes if the X sets are included. +-----------------------------------+ | Choose your installation | | | |>a: Set sizes of NetBSD partitions | | b: Use existing partition sizes | +-----------------------------------+ ```` ```` You can now change the sizes for the system partitions. The default is to allocate all the space to the root file system. However, you may wish to have separate /usr (additional system files), /var (log files etc) or /home (users' home directories) file systems. Free space will be added to the partition marked with a '+'. MB Cylinders Sectors Filesystem a: 2208(110284) 4488 4523904 + / b: 4096 8323 8389584 swap c: 0 0 0 /tmp (mfs) d: 0 0 0 /usr e: 0 0 0 /var f: 0 0 0 /home g: Add a user defined partition h: Change input units (sectors/cylinders/MB) >x: Accept partition sizes. Free space 108076 MB, 13 free partitions. ```` ```` We now have your BSD disklabel partitions as: This is your last chance to change them. Start MB End MB Size MB FS type Newfs Mount Mount point --------- --------- --------- ---------- ----- ----- ----------- >a: 92 110375 110284 FFSv1 Yes Yes / b: 110376 114472 4096 swap c: 0 114472 114473 Whole disk d: 0 0 0 unused e: 1 91 91 Boot partition f: 0 0 0 unused g: Show all unused partitions h: Change input units (sectors/cylinders/MB) x: Partition sizes ok ```` ```` We now have your BSD disklabel partitions as: This is your last chance to change them. Start MB End MB Size MB FS type Newfs Mount Mount point --------- --------- --------- ---------- ----- ----- ----------- a: 92 110375 110284 FFSv2 Yes Yes / b: 110376 114472 4096 swap c: 0 114472 114473 Whole disk d: 0 0 0 unused e: 1 91 91 Boot partition /boot f: 0 0 0 unused g: Show all unused partitions h: Change input units (sectors/cylinders/MB) >x: Partition sizes ok ```` ```` The following are the http site, directory, user, and password that will be used. If "user" is "ftp", then the password is not needed. a: Host ftp.NetBSD.org b: Base directory pub/NetBSD/NetBSD-8.0 >c: Binary set directory /evbarm-earmv7hf/binary/sets d: Source set directory /source/sets e: User ftp f: Password g: Proxy h: Transfer directory /usr/INSTALL i: Delete after install No j: Configure network k: Exit x: Get Distribution ```` ```` # mount /dev/wd0e /mnt # cp -r /boot/* /mnt/ ```` *TODOleot*: add a reference to The NetBSD Guide for further steps of the installation. *TODOleot*: add information how to populate `/boot` and prepare `boot.cmd`, `boot.scr`. # References *TODOleot*: add a reference to the instructions shared via PR port-evbarm/50806.