Diff for /wikisrc/tutorials/how_to_install_netbsd_from_an_usb_memory_stick.mdwn between versions 1.12 and 1.13

version 1.12, 2017/06/21 10:25:20 version 1.13, 2021/10/21 00:12:13
Line 1 Line 1
 This describes how to install NetBSD (i386/amd64) using a Memory Stick instead  This describes how to install NetBSD (i386/amd64) using a USB memory stick instead
 of a CD-ROM Drive.  of a CD-ROM Drive.
   
 **Contents**  **Contents**
Line 7  of a CD-ROM Drive. Line 7  of a CD-ROM Drive.
   
   
 # With an downloaded image  # With an downloaded image
 From NetBSD 5.1.2 on for the i386 and amd64 ports it is possible to download a   From NetBSD 5.1.2 on for the i386 and amd64 ports it is possible to download a USB
 memory stick image for installing instead of downloading and transforming a CD image.  memory stick image for installing instead of downloading and transforming a CD image.
   
 This section describes in detail how to use this method. If you want to create   This section describes in detail how to use this method. If you want to create 
Line 18  Installation images are available on the Line 18  Installation images are available on the
 mirrors](http://www.netbsd.org/mirrors/) under the images/ directory, their  mirrors](http://www.netbsd.org/mirrors/) under the images/ directory, their
 filenames match the *install.img.gz pattern.  filenames match the *install.img.gz pattern.
   
 For example if we want to download NetBSD 7.0 for amd64:  For example if we want to download NetBSD 9.2 for amd64:
   
     # ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-7.0/images/NetBSD-7.0-amd64-install.img.gz      # ftp ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-9.2/images/NetBSD-9.2-amd64-install.img.gz
   
 ## Copying the installation image to the memory stick  ## Copying the installation image to the memory stick
 To prepare the memory stick under a Unix system you can just use  To prepare the memory stick under a Unix system you can just use
Line 31  media a bit (e.g. 1m). Line 31  media a bit (e.g. 1m).
 For example if the memory stick is recognized as `sd0` (**Warning: this will  For example if the memory stick is recognized as `sd0` (**Warning: this will
 overwrite all the contents on your memory stick**):  overwrite all the contents on your memory stick**):
   
     # gunzip NetBSD-7.0-amd64-install.img.gz      # gunzip NetBSD-9.2-amd64-install.img.gz
     # dd if=NetBSD-7.0-amd64-install.img of=/dev/rsd0d bs=1m      # dd if=NetBSD-9.2-amd64-install.img of=/dev/rsd0d bs=1m
   
 In the previous command we have used `rsd0d` in order to refer to the *whole*  In the previous command we have used `rsd0d` in order to refer to the *whole*
 `sd0` disk.  `sd0` disk.
Line 41  On Linux the command is similar although Line 41  On Linux the command is similar although
 memory stick is recognized as `sdb` (**Warning: this will overwrite all the  memory stick is recognized as `sdb` (**Warning: this will overwrite all the
 contents on your memory stick**):  contents on your memory stick**):
   
     # gunzip NetBSD-7.0-amd64-install.img.gz      # gunzip NetBSD-9.2-amd64-install.img.gz
     # dd if=NetBSD-7.0-amd64-install.img of=/dev/sdb bs=1M      # dd if=NetBSD-9.2-amd64-install.img of=/dev/sdb bs=1M
   
 On Windows you can use [rawrite32](//www.netbsd.org/~martin/rawrite32/) to copy  On Windows you can use [rawrite32](//www.netbsd.org/~martin/rawrite32/) to copy
 the image to the stick.  the image to the stick.
Line 68  Carry on with [the instructions after do Line 68  Carry on with [the instructions after do
   
 # Manual method  # Manual method
   
 ## Make the Memory Stick bootable  ## Make the memory stick bootable
   
 First, install the Master Boot Record (MBR):  First, install the Master Boot Record (MBR):
   
Line 120  Then, create an fdisk partition for NetB Line 120  Then, create an fdisk partition for NetB
   
   
   
 After that, set the NetBSD partition active (it's partition Number 0):  After that, set the NetBSD partition active (it's partition number 0):
   
     # fdisk -a /dev/rsd0d      # fdisk -a /dev/rsd0d
     Disk: /dev/rsd0d      Disk: /dev/rsd0d
Line 172  Now, make the partition sd0a bootable: Line 172  Now, make the partition sd0a bootable:
     # installboot -v -o timeout=1 /dev/rsd0a /usr/mdec/bootxx_ffsv1      # installboot -v -o timeout=1 /dev/rsd0a /usr/mdec/bootxx_ffsv1
   
   
 ## Copy the installation sets to the Memory Stick  ## Copy the installation sets to the memory stick
   
 For the installation you need an installation kernel and the installation sets. To get them, fetch for example a NetBSD CD-image file from a local FTP-Mirror [1](http://www.netbsd.org/mirrors/#ftp):  For the installation you need an installation kernel and the installation sets. To get them, fetch for example a NetBSD CD-image file from a local FTP-Mirror [1](http://www.netbsd.org/mirrors/#ftp):
   
Line 186  Now mount the CD-image file: Line 186  Now mount the CD-image file:
     # vnconfig -c vnd0 /home/mark/i386cd-4.0.1.iso      # vnconfig -c vnd0 /home/mark/i386cd-4.0.1.iso
     # mount_cd9660 /dev/vnd0d /image      # mount_cd9660 /dev/vnd0d /image
   
 And then, mount the Memory Stick and copy the **Install kernel** and **sets**:  And then, mount the memory stick and copy the **install kernel** and **sets**:
   
     # mount /dev/sd0a /stick      # mount /dev/sd0a /stick
     # cp /image/i386/binary/kernel/netbsd-INSTALL.gz /stick/netbsd.gz      # cp /image/i386/binary/kernel/netbsd-INSTALL.gz /stick/netbsd.gz
Line 200  Now you can unmount the CD-image: Line 200  Now you can unmount the CD-image:
     # vnconfig -u vnd0      # vnconfig -u vnd0
     # rmdir /image      # rmdir /image
   
 The Memory Stick is now ready to boot the NetBSD-Install system. Just reboot and change your BIOS to boot the USB Memory Stick.  The memory stick is now ready to boot the NetBSD-Install system. Just reboot and change your BIOS to boot the USB memory stick.
   
 ## The installation process  ## The installation process
   
 If the Memory Stick boots fine, proceed with the Installation as usual, but the selection of the Install-sets is not quite intuitive:  If the memory stick boots fine, proceed with the installation as usual, but the selection of the install sets is not quite intuitive:
   
     "Your disk is now ready for installing the kernel and the distributions sets [...]"      "Your disk is now ready for installing the kernel and the distributions sets [...]"
     [...]      [...]
Line 222  Choose the following options: Line 222  Choose the following options:
     c: Base directory             c: Base directory       
     d: Set directory      /sets      d: Set directory      /sets
   
 Yes, "c: Base directory" is left empty, because we had copied the distribution .tgz files to the /sets directory on the Memory Stick (9.)  Yes, "c: Base directory" is left empty, because we had copied the distribution .tgz files to the /sets directory on the memory stick (9.)
   
 Now continue with the installation as usual. Good luck!  Now continue with the installation as usual. Good luck!
   
   
 ## Alternative Method  ## Alternative Method
   
 An alternative setup method saves space on the Stick at the expense of sysinst automation and is therefore more advanced. This method skips the sysinst tool by copying the sets and the **normal** GENERIC Kernel instead of the install-Kernel.  An alternative setup method saves space on the stick at the expense of sysinst automation and is therefore more advanced. This method skips the sysinst tool by copying the sets and the **normal** GENERIC kernel instead of the install kernel.
   
 Extract the sets from the harddisk directly on to the Memory stick (/mnt):  Extract the sets from the hard disk directly on to the memory stick (/mnt):
   
     # tar xvfzp sets.tgz -C /mnt       # tar xvfzp sets.tgz -C /mnt 
   
 Extract the Kernel to the target root:  Extract the kernel to the target root:
   
     # tar xvfzp GENERIC-kernel.tgz -C /mnt      # tar xvfzp GENERIC-kernel.tgz -C /mnt
   
 All you need to do is now to create a valid /etc/fstab and modify /etc/rc.conf to RC_CONFIGURED=yes on the target root (/mnt) and reboot. All fine tuning can be done, when you're logged in.   All you need to do is now to create a valid /etc/fstab and modify /etc/rc.conf to RC_CONFIGURED=yes on the target root (/mnt) and reboot. All fine tuning can be done when you're logged in. 

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


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