Changes between Version 57 and Version 58 of NanoBSD


Ignore:
Timestamp:
Jul 25, 2009, 9:49:35 AM (15 years ago)
Author:
huub
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NanoBSD

    v57 v58  
    1010Please note that you can find the supporting files in the subdirectory [source:nanobsd]
    1111
    12 = Build environment =
     12==  A. Setup a FreeBSD host ==
    1313 
    14  Get yourself a fresh freebsd host with ports and subversion installed
    15  1. Run the basic CD installer of 7.2.
     14Get yourself a fresh freebsd host with ports and subversion installed as follows:
    1615
    17    The procedure below has been tested with 7.2-RELEASE (standard developer install, no ports, will fit our needs). Installing FreeBSD is outside the scope of this document, take a look into [http://www.freebsd.org/doc/en/books/handbook/install.html the FreeBSD handbook Chapter 2 Installing FreeBSD] if you do not know the details.
     16 A.1. Run the basic CD installer of 7.2.
    1817
    19 Please do mind that all commands below need to be executed as root, due to the many mounts and unmounts done in various phases.
     18 The procedure below has been tested with 7.2-RELEASE (standard developer install - no ports - will fit our needs). Installing FreeBSD is outside the scope of this document, take a look into [http://www.freebsd.org/doc/en/books/handbook/install.html the FreeBSD handbook Chapter 2 Installing FreeBSD] if you do not know the details.
    2019
    21  1. get latest sources
     20 Please do mind that all commands below need to be executed as root, due to the many mounts and unmounts done in various phases.
     21
     22 Internet connection is required.
     23
     24 A.2. get latest sources
    2225 {{{
    2326 $ csup  -h cvsup.nl.freebsd.org /usr/share/examples/cvsup/standard-supfile
    2427 }}}
    25  1. fetch ports
     28 A.3 fetch ports
    2629 {{{
    2730 $ portsnap fetch extract
    2831 }}}
    29  1. install subversion (set ftp to passive mode to ensure the firewall is not causing issues if one exists.
    30     NOTE: Install all packages via ports to prevent issues later on!
     32 A.4. install subversion (set ftp to passive mode to ensure the firewall is not causing issues if one exists.
     33 NOTE: Install all packages via ports to prevent issues later on!
    3134 {{{
    3235 $ setenv FTP_PASSIVE_MODE YES
    3336 $ cd /usr/ports/devel/subversion; make install clean BATCH=yes
    3437 }}}
    35  1. OPTIONAL, every developer has his own preferences, these are mine ;-)
    36    
     38 A.5. OPTIONAL, every developer has his own preferences, these are mine ;-)
    3739 {{{
    3840 $ (cd /usr/ports/editors/vim-lite; make install clean BATCH=yes)
     
    4143 }}}
    4244
    43 = Introduction =
    44 '''XXX: Make all paths into variables for easy reading'''
     45== B. Build environment ==
    4546
    46 First download the environment and run initial build
    47 {{{
    48 $ setenv R /root/nanobsd
    49 $ svn checkout http://svn.wirelessleiden.nl/svn/projects/iris/nanobsd $R
    50 $ cd $R
    51 }}}
     47 B.1 Download the environment from the Wireless Leiden svn repository
     48 {{{
     49 $ setenv R /root/nanobsd
     50 $ svn checkout http://svn.wirelessleiden.nl/svn/projects/iris/nanobsd $R
     51 $ cd $R
     52 }}}
     53 Note: if svn is not found: svn is in /usr/local/bin, alternatively log out and in, or use {{{rehash}}} in a {{{csh}}} shell to make it available.
    5254
    53 Note 1: compilation can take a long time, depending on your hardware.
     55 B.2. Compile all required packages using
     56 {{{
     57 $ /root/nanobsd/tools/package-build.sh
     58 }}}
     59 
     60 B.3. Set your favorite root password to be used in the image
     61 {{{
     62 $ setenv CFG_ROOT_PASSWORD `dd if=/dev/random bs=10k count=10 | & tr -cd '[a-zA-Z0-9]' | cut -c -15`; echo $CFG_ROOT_PASSWORD
     63 }}}
     64 If you like a simple password, substitute the {{{ `dd if=/dev/random bs=10k count=10 | & tr -cd '[a-zA-Z0-9]' | cut -c -15` }}} with your password.
    5465
    55 Note 2: if svn is not found: svn is in /usr/local/bin, alternatively log out and in or use {{{rehash}}} in a {{{csh}}} shell. To make it available.
     66 B.4. Build nanobsd (make sure to prepare some coffee;-) )
     67 {{{
     68 $ sh /usr/src/tools/tools/nanobsd/nanobsd.sh -c /root/nanobsd/cfg/nanobsd.wleiden
     69 }}}
     70 Note 1: Take a coffee of go for a hike, this normally takes 2 - 8 hours depending on the machine configuration
    5671
    57 Note 3: even this little script got flags, check the output of {{{sh /usr/src/tools/tools/nanobsd/nanobsd.sh -h}}}
    58 {{{
     72 Note 2: even this little script got flags, check the output of {{{sh /usr/src/tools/tools/nanobsd/nanobsd.sh -h}}}
     73 {{{
    5974-b suppress builds (both kernel and world)
    6075-k suppress buildkernel
     
    6277-c specify config file
    6378...
    64 }}}
     79 }}}
    6580
    66 Continue:
    67  1. Compile all required packages using
    68  {{{
    69  $ /root/nanobsd/tools/package-build.sh
    70  }}}
    71  1. Set your favorite root password to be used in the image
    72  {{{
    73  $ setenv CFG_ROOT_PASSWORD `dd if=/dev/random bs=10k count=10 | & tr -cd '[a-zA-Z0-9]' | cut -c -15`; echo $CFG_ROOT_PASSWORD
    74  }}}
    75  If you like a simple password, substitute the {{{ `dd if=/dev/random bs=10k count=10 | & tr -cd '[a-zA-Z0-9]' | cut -c -15` }}} with your password.
    76  1. Build nanobsd (make sure to prepare some coffee;-) )
    77  {{{
    78  $ sh /usr/src/tools/tools/nanobsd/nanobsd.sh -c /root/nanobsd/cfg/nanobsd.wleiden
    79  }}}
    80  Take a coffee, this normally takes 2 - 8 hours depending on the machine configuration
    81  1. Fetch configuration onto image (pick your situation)
     81
     82== C. Fetch node configuration onto image ==
     83
     84
    8285 {{{
    8386 $ /root/nanobsd/tools/config-image.sh
    8487 }}}
     88
     89The script is connecting to the Wireless Leiden 'genesis' database. Pick your situation!
     90
    8591    a. New image: Put full image on flash disk (minimum 1 GB)
    8692    {{{
     
    96102    $ gzip -c /usr/obj/nanobsd.wleiden/_.disk.image | ssh root@192.168.4.100 'gzip | sh /tools/updatep2'
    97103    }}}
     104
    98105 1. All done! Place the image in the new machine and boot it up, you should be good to go!
    99106 1. For next nodes you can skip the build if you are not going to use the same image again and go directly for step 4, or take a look at development if you have to rebuild the image after (small changes)