Changes between Version 57 and Version 58 of NanoBSD
- Timestamp:
- Jul 25, 2009, 9:49:35 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NanoBSD
v57 v58 10 10 Please note that you can find the supporting files in the subdirectory [source:nanobsd] 11 11 12 = Build environment=12 == A. Setup a FreeBSD host == 13 13 14 Get yourself a fresh freebsd host with ports and subversion installed 15 1. Run the basic CD installer of 7.2. 14 Get yourself a fresh freebsd host with ports and subversion installed as follows: 16 15 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. 18 17 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. 20 19 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 22 25 {{{ 23 26 $ csup -h cvsup.nl.freebsd.org /usr/share/examples/cvsup/standard-supfile 24 27 }}} 25 1.fetch ports28 A.3 fetch ports 26 29 {{{ 27 30 $ portsnap fetch extract 28 31 }}} 29 1. install subversion (set ftp to passive mode to ensure the firewall is not causing issues if one exists.30 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! 31 34 {{{ 32 35 $ setenv FTP_PASSIVE_MODE YES 33 36 $ cd /usr/ports/devel/subversion; make install clean BATCH=yes 34 37 }}} 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 ;-) 37 39 {{{ 38 40 $ (cd /usr/ports/editors/vim-lite; make install clean BATCH=yes) … … 41 43 }}} 42 44 43 = Introduction = 44 '''XXX: Make all paths into variables for easy reading''' 45 == B. Build environment == 45 46 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. 52 54 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. 54 65 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 56 71 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 {{{ 59 74 -b suppress builds (both kernel and world) 60 75 -k suppress buildkernel … … 62 77 -c specify config file 63 78 ... 64 }}}79 }}} 65 80 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 82 85 {{{ 83 86 $ /root/nanobsd/tools/config-image.sh 84 87 }}} 88 89 The script is connecting to the Wireless Leiden 'genesis' database. Pick your situation! 90 85 91 a. New image: Put full image on flash disk (minimum 1 GB) 86 92 {{{ … … 96 102 $ gzip -c /usr/obj/nanobsd.wleiden/_.disk.image | ssh root@192.168.4.100 'gzip | sh /tools/updatep2' 97 103 }}} 104 98 105 1. All done! Place the image in the new machine and boot it up, you should be good to go! 99 106 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)