Diff for /wikisrc/ports/evbarm/install_using_sysinst.mdwn between versions 1.13 and 1.19

version 1.13, 2018/11/19 22:17:46 version 1.19, 2020/03/10 22:22:10
Line 1 Line 1
 [[!meta title="NetBSD/evbarm install via sysinst(8) on a SATA hard disk, USB stick or (u)SD card"]]  [[!meta title="NetBSD/evbarm 8.0 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  In this document we will see step by step how to install NetBSD/evbarm 8.0 on an
 external media (SATA hard disk, USB stick or (u)SD card) using  external media (SATA hard disk, USB stick or (u)SD card) using
 [[!template id=man name="sysinst" section="8"]].  [[!template id=man name="sysinst" section="8"]].
   
Line 37  $ gunzip armv7.img.gz Line 37  $ gunzip armv7.img.gz
 # dd if=/usr/pkg/share/u-boot/<boardname>/u-boot-sunxi-with-spl.bin of=/dev/rld0d bs=1k seek=8 conv=sync  # dd if=/usr/pkg/share/u-boot/<boardname>/u-boot-sunxi-with-spl.bin of=/dev/rld0d bs=1k seek=8 conv=sync
 """]]  """]]
   
   ## NetBSD/evbarm 8.0 (and older) u-boot adjustments
   
   [[!template id=note text="""
   Please note that the following adjustments will not be needed in
   NetBSD-current and 9.0.
   """]]
   
 NetBSD/evbarm 8.0 does not automatically boot on the BananaPI.  NetBSD/evbarm 8.0 does not automatically boot on the BananaPI.
 We can use the following commands to boot from the (u)SD cards in u-boot:  We can use the following commands to boot from the (u)SD cards in u-boot:
   
Line 81  The first menu is about the system type  Line 88  The first menu is about the system type 
 latter ("Other"):  latter ("Other"):
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
    
    
    
    
    
    
    
    
    
                     +-------------------------------------+                      +-------------------------------------+
                     | What kind of system do you have?    |                      | What kind of system do you have?    |
                     |                                     |                      |                                     |
                     | a: Raspberry PI                     |                      | a: Raspberry PI                     |
                     |>b: Other                            |                      |>b: Other                            |
                     +-------------------------------------+                      +-------------------------------------+
    
    
    
    
    
    
    
    
    
    
 """]]  """]]
   
 We want to install NetBSD/evbarm on the hard disk so let's select  We want to install NetBSD/evbarm on the hard disk so let's select
 "Install NetBSD to hard disk":  "Install NetBSD to hard disk":
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  NetBSD/evbarm 8.0   NetBSD/evbarm 8.0
    
  This menu-driven tool is designed to help you install NetBSD to a hard disk,   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.   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   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.   item, or type CTRL+N/CTRL+P to select the next/previous item.
  The arrow keys and Page-up/Page-down may also work.   The arrow keys and Page-up/Page-down may also work.
  Activate the current selection from the menu by typing the enter key.   Activate the current selection from the menu by typing the enter key.
    
  If you booted from a floppy, you may now remove the disk.   If you booted from a floppy, you may now remove the disk.
  Thank you for using NetBSD!   Thank you for using NetBSD!
                +-----------------------------------------------+                 +-----------------------------------------------+
Line 136  We want to install NetBSD/evbarm on the  Line 143  We want to install NetBSD/evbarm on the 
                | f: Config menu                                |                 | f: Config menu                                |
                | x: Exit Install System                        |                 | x: Exit Install System                        |
                +-----------------------------------------------+                 +-----------------------------------------------+
    
    
    
 """]]  """]]
   
 Before proceeding with the installation, if the hard disk had any important data  Before proceeding with the installation, if the hard disk had any important data
Line 146  it is better to stop and doing a backup  Line 153  it is better to stop and doing a backup 
 we can safetely remove its data we can proceed:  we can safetely remove its data we can proceed:
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  You have chosen to install NetBSD on your hard disk.  This will change   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   information on your hard disk.  You should have made a full backup before
  this procedure!  This procedure will do the following things:   this procedure!  This procedure will do the following things:
Line 154  we can safetely remove its data we can p Line 161  we can safetely remove its data we can p
          b) Create new BSD file systems           b) Create new BSD file systems
          c) Load and install distribution sets           c) Load and install distribution sets
          d) Some initial system configuration           d) Some initial system configuration
    
  (After you enter the partition information but before your disk is changed,   (After you enter the partition information but before your disk is changed,
  you will have the opportunity to quit this procedure.)   you will have the opportunity to quit this procedure.)
    
  Shall we continue?   Shall we continue?
                                +---------------+                                 +---------------+
                                | yes or no?    |                                 | yes or no?    |
Line 165  we can safetely remove its data we can p Line 172  we can safetely remove its data we can p
                                | a: No         |                                 | a: No         |
                                |>b: Yes        |                                 |>b: Yes        |
                                +---------------+                                 +---------------+
    
    
    
    
    
    
    
 """]]  """]]
   
 Now we can see all the available disks. The hard disk attached via SATA is a  Now we can see all the available disks. The hard disk attached via SATA is a
 120GB SSD recognized as `wd0`:  120GB SSD recognized as `wd0`:
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  On which disk do you want to install NetBSD?   On which disk do you want to install NetBSD?
    
    
                      +-----------------------------------+                       +-----------------------------------+
                      | Available disks                   |                       | Available disks                   |
                      |                                   |                       |                                   |
Line 189  Now we can see all the available disks.  Line 196  Now we can see all the available disks. 
                      | b: Extended partitioning          |                       | b: Extended partitioning          |
                      | x: Exit                           |                       | x: Exit                           |
                      +-----------------------------------+                       +-----------------------------------+
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
 """]]  """]]
   
 We now need to edit MBR partition table. We will create two MBR partitions: the  We now need to edit MBR partition table. We will create two MBR partitions: the
Line 211  first one a FAT32 for `/boot` and the ot Line 218  first one a FAT32 for `/boot` and the ot
 partition table":  partition table":
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  We are now going to install NetBSD on the disk wd0.   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   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   split further by the NetBSD disklabel.  NetBSD can also access file systems
  in other MBR partitions.   in other MBR partitions.
    
  If you select 'Use the entire disk' then the previous contents of the disk   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.   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   If you want to install more than one operating system then edit the MBR
  partition table and create a partition for NetBSD.   partition table and create a partition for NetBSD.
    
  A few hundred MB is enough for a basic installation, but you should allow   A few hundred MB is enough for a basic installation, but you should allow
  extra for additional software and user files.   extra for additional software and user files.
  Allow at least 5GB if you want to build NetBSD itself.   Allow at least 5GB if you want to build NetBSD itself.
Line 232  partition table": Line 239  partition table":
                       |>a: Edit the MBR partition table |                        |>a: Edit the MBR partition table |
                       | b: Use the entire disk          |                        | b: Use the entire disk          |
                       +---------------------------------+                        +---------------------------------+
    
    
    
    
    
 """]]  """]]
   
 First we select the second entry ("b"), set the "type:" to "NetBSD":  First we select the second entry ("b"), set the "type:" to "NetBSD":
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  The Current MBR partition table is shown below.   The Current MBR partition table is shown below.
  Flgs: a => Active partition, I => Install here.   Flgs: a => Active partition, I => Install here.
  Select the partition you wish to change:   Select the partition you wish to change:
    
     Total disk size 114473 MB.      Total disk size 114473 MB.
                +-----------------------------------------------------------+                 +-----------------------------------------------------------+
     Start( MB) |>a:       type: unused                                     |      Start( MB) |>a:       type: unused                                     |
Line 266  First we select the second entry ("b"),  Line 273  First we select the second entry ("b"), 
              | i: DOS FAT12                      |               | i: DOS FAT12                      |
              | <: page up, >: page down          |               | <: page up, >: page down          |
              +-----------------------------------+               +-----------------------------------+
    
    
 """]]  """]]
   
 We reserve for the NetBSD MBR partition all the end of the disk,  We reserve for the NetBSD MBR partition all the end of the disk,
Line 276  the FAT32), we also select to make it ac Line 283  the FAT32), we also select to make it ac
 we will use it to install NetBSD ("install: Yes"):  we will use it to install NetBSD ("install: Yes"):
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  The Current MBR partition table is shown below.   The Current MBR partition table is shown below.
  Flgs: a => Active partition, I => Install here.   Flgs: a => Active partition, I => Install here.
  Select the partition you wish to change:   Select the partition you wish to change:
    
     Total disk size 114473 MB.      Total disk size 114473 MB.
                +-----------------------------------------------------------+                 +-----------------------------------------------------------+
     Start( MB) | a:       type: NetBSD                                     |      Start( MB) | a:       type: NetBSD                                     |
Line 292  we will use it to install NetBSD ("insta Line 299  we will use it to install NetBSD ("insta
  e: Change inpu| g: Change input units (sectors/cylinders/MB)              |   e: Change inpu| g: Change input units (sectors/cylinders/MB)              |
  x: Partition t|>x: Partition OK                                           |   x: Partition t|>x: Partition OK                                           |
                +-----------------------------------------------------------+                 +-----------------------------------------------------------+
    
    
    
    
    
    
    
    
    
    
 """]]  """]]
   
 We now select the first partition ("a") and create a "Windows FAT32", starting  We now select the first partition ("a") and create a "Windows FAT32", starting
Line 309  at 1MB and ending at 92MB before the "Ne Line 316  at 1MB and ending at 92MB before the "Ne
 ("active: Yes"):  ("active: Yes"):
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  The Current MBR partition table is shown below.   The Current MBR partition table is shown below.
  Flgs: a => Active partition, I => Install here.   Flgs: a => Active partition, I => Install here.
  Select the partition you wish to change:   Select the partition you wish to change:
    
     Total disk size 114473 MB.      Total disk size 114473 MB.
                +-----------------------------------------------------------+                 +-----------------------------------------------------------+
     Start( MB) | a:       type: Windows FAT32                              |      Start( MB) | a:       type: Windows FAT32                              |
Line 325  at 1MB and ending at 92MB before the "Ne Line 332  at 1MB and ending at 92MB before the "Ne
  e: Change inpu| g: Change input units (sectors/cylinders/MB)              |   e: Change inpu| g: Change input units (sectors/cylinders/MB)              |
  x: Partition t|>x: Partition OK                                           |   x: Partition t|>x: Partition OK                                           |
                +-----------------------------------------------------------+                 +-----------------------------------------------------------+
    
    
    
    
    
    
    
    
    
    
 """]]  """]]
   
 Here the final MBR partition table:  Here the final MBR partition table:
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  The Current MBR partition table is shown below.   The Current MBR partition table is shown below.
  Flgs: a => Active partition, I => Install here.   Flgs: a => Active partition, I => Install here.
  Select the partition you wish to change:   Select the partition you wish to change:
    
     Total disk size 114473 MB.      Total disk size 114473 MB.
    
     Start( MB)  Size( MB) Flg Kind      Start( MB)  Size( MB) Flg Kind
     ---------- ---------- --- ----------------      ---------- ---------- --- ----------------
 >a:          1         91 a   Windows FAT32  >a:          1         91 a   Windows FAT32
Line 355  Here the final MBR partition table: Line 362  Here the final MBR partition table:
  d:                           unused   d:                           unused
  e: Change input units (sectors/cylinders/MB)   e: Change input units (sectors/cylinders/MB)
  x: Partition table OK   x: Partition table OK
    
    
    
    
    
    
    
    
    
    
    
 """]]  """]]
   
 Now that the MBR partition table is written we can proceed to set  Now that the MBR partition table is written we can proceed to set
 sizes of NetBSD partitions:  sizes of NetBSD partitions:
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  NetBSD uses a BSD disklabel to carve up the NetBSD portion of the disk into   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.   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   You can use a simple editor to set the sizes of the NetBSD partitions, or
  keep the existing partition sizes and contents.   keep the existing partition sizes and contents.
    
  You will then be given the opportunity to change any of the disklabel fields.   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   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   requires at least 288 Megabytes without X and at least 348 Megabytes if the X
  sets are included.   sets are included.
Line 390  sizes of NetBSD partitions: Line 397  sizes of NetBSD partitions:
                      |>a: Set sizes of NetBSD partitions |                       |>a: Set sizes of NetBSD partitions |
                      | b: Use existing partition sizes   |                       | b: Use existing partition sizes   |
                      +-----------------------------------+                       +-----------------------------------+
    
    
    
    
    
    
    
    
 """]]  """]]
   
 We set the swap size to 4G and we reserve the rest of the space for "/":  We set the swap size to 4G and we reserve the rest of the space for "/":
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  You can now change the sizes for the system partitions.  The default is to   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   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   have separate /usr (additional system files), /var (log files etc) or /home
  (users' home directories) file systems.   (users' home directories) file systems.
    
  Free space will be added to the partition marked with a '+'.   Free space will be added to the partition marked with a '+'.
    
         MB         Cylinders   Sectors   Filesystem          MB         Cylinders   Sectors   Filesystem
     a:   2208(110284)      4488   4523904 + /      a:   2208(110284)      4488   4523904 + /
     b:   4096              8323   8389584   swap      b:   4096              8323   8389584   swap
Line 421  We set the swap size to 4G and we reserv Line 428  We set the swap size to 4G and we reserv
     g: Add a user defined partition      g: Add a user defined partition
     h: Change input units (sectors/cylinders/MB)      h: Change input units (sectors/cylinders/MB)
    >x: Accept partition sizes.  Free space 108076 MB, 13 free partitions.     >x: Accept partition sizes.  Free space 108076 MB, 13 free partitions.
    
    
    
    
    
    
    
    
 """]]  """]]
   
 The summary of the current BSD disklabel is:  The summary of the current BSD disklabel is:
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  We now have your BSD disklabel partitions as:   We now have your BSD disklabel partitions as:
  This is your last chance to change them.   This is your last chance to change them.
    
     Start  MB   End  MB  Size  MB FS type    Newfs Mount Mount point      Start  MB   End  MB  Size  MB FS type    Newfs Mount Mount point
     --------- --------- --------- ---------- ----- ----- -----------      --------- --------- --------- ---------- ----- ----- -----------
 >a:        92    110375    110284 FFSv1      Yes   Yes   /  >a:        92    110375    110284 FFSv1      Yes   Yes   /
Line 449  The summary of the current BSD disklabel Line 456  The summary of the current BSD disklabel
  g: Show all unused partitions   g: Show all unused partitions
  h: Change input units (sectors/cylinders/MB)   h: Change input units (sectors/cylinders/MB)
  x: Partition sizes ok   x: Partition sizes ok
    
    
    
    
    
    
    
    
    
    
    
 """]]  """]]
   
 We can adjust the disklabel, for example we can use FFSv2 for "/"  We can adjust the disklabel, for example we can use FFSv2 for "/"
Line 468  that an `/etc/fstab` entry will be popul Line 475  that an `/etc/fstab` entry will be popul
 that "/boot" will not be automatically mounted by default):  that "/boot" will not be automatically mounted by default):
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  We now have your BSD disklabel partitions as:   We now have your BSD disklabel partitions as:
  This is your last chance to change them.   This is your last chance to change them.
    
     Start  MB   End  MB  Size  MB FS type    Newfs Mount Mount point      Start  MB   End  MB  Size  MB FS type    Newfs Mount Mount point
     --------- --------- --------- ---------- ----- ----- -----------      --------- --------- --------- ---------- ----- ----- -----------
  a:        92    110375    110284 FFSv2      Yes   Yes   /   a:        92    110375    110284 FFSv2      Yes   Yes   /
Line 483  that "/boot" will not be automatically m Line 490  that "/boot" will not be automatically m
  g: Show all unused partitions   g: Show all unused partitions
  h: Change input units (sectors/cylinders/MB)   h: Change input units (sectors/cylinders/MB)
 >x: Partition sizes ok  >x: Partition sizes ok
    
    
    
    
    
    
    
    
    
    
    
 """]]  """]]
   
 We have finally ready to proceed with  We have finally ready to proceed with
Line 504  note that the "Binary set directory" nee Line 511  note that the "Binary set directory" nee
 missing an `-earmv7hf' due different evbarm-s):  missing an `-earmv7hf' due different evbarm-s):
   
 [[!template id=programlisting text="""  [[!template id=programlisting text="""
    
  The following are the http site, directory, user, and password that will be   The following are the http site, directory, user, and password that will be
  used.  If "user" is "ftp", then the password is not needed.   used.  If "user" is "ftp", then the password is not needed.
    
  a: Host                      ftp.NetBSD.org   a: Host                      ftp.NetBSD.org
  b: Base directory            pub/NetBSD/NetBSD-8.0   b: Base directory            pub/NetBSD/NetBSD-8.0
 >c: Binary set directory      /evbarm-earmv7hf/binary/sets  >c: Binary set directory      /evbarm-earmv7hf/binary/sets
Line 520  missing an `-earmv7hf' due different evb Line 527  missing an `-earmv7hf' due different evb
  j: Configure network   j: Configure network
  k: Exit   k: Exit
  x: Get Distribution   x: Get Distribution
    
    
    
    
    
    
    
    
    
    
 """]]  """]]
   
 The installation will proceed as usual and for more information  The installation will proceed as usual and for more information
Line 546  files of the `/boot` partition of the (u Line 553  files of the `/boot` partition of the (u
 # umount /mnt  # umount /mnt
 """]]  """]]
   
   
   ## NetBSD/evbarm 8.0 u-boot adjustments to boot from hard disk
   
 Finally we can prepare a u-boot script (`boot.scr`) to load the kernel from the  Finally we can prepare a u-boot script (`boot.scr`) to load the kernel from the
 SATA hard disk and boot it:  SATA hard disk and boot it:
   
Line 567  $ mkubootimage -A arm -n armv7 -T script Line 577  $ mkubootimage -A arm -n armv7 -T script
   
 Please remember that in the early boot phase, u-boot and `boot.scr`  Please remember that in the early boot phase, u-boot and `boot.scr`
 are loaded from the (u)SD card and it loads the kernel present in  are loaded from the (u)SD card and it loads the kernel present in
 the `/boot` partition of the hard disk.  the `/boot` partition of the hard disk (in our case "wd0e").
   
   
 # References  # References

Removed from v.1.13  
changed lines
  Added in v.1.19


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb