Changes between Version 19 and Version 20 of WikiStart


Ignore:
Timestamp:
Jan 24, 2010, 9:56:22 PM (15 years ago)
Author:
huub
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v19 v20  
    125125 }}}
    126126
     127 B.3. Set your favorite root password to be used in the image
     128
     129 Note: you can skip this step if you are satisfied with the default password set in step A.4 above.
     130
     131 {{{
     132 $ setenv CFG_ROOT_PASSWORD `dd if=/dev/random bs=10k count=10 | & tr -cd '[a-zA-Z0-9]' | cut -c -15`
     133 $ echo $CFG_ROOT_PASSWORD
     134 }}}
     135 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.
     136
     137 B.4 Apply kernel patch for USB-LAN adapter
     138
     139 For use of a Davicom DM9601 USB network controler you have to patch usbdevs and the if_udav driver:
     140 {{{
     141 cd /usr/src/sys/dev/usb/
     142 patch < /root/nanobsd/misc/patches/usbdevs.patch
     143 patch < /root/nanobsd/misc/patches/if_udav.c.patch
     144 }}}
     145
     146 B.5. Build nanobsd (make sure to prepare some coffee;-) )
     147 {{{
     148 $ sh /usr/src/tools/tools/nanobsd/nanobsd.sh -c /root/nanobsd/cfg/nanobsd.wleiden
     149 }}}
     150 Note 1: Take a coffee of go for a hike, this normally takes 2 - 8 hours depending on the machine configuration
     151
     152 Note 2: even this little script got flags, check the output of {{{sh /usr/src/tools/tools/nanobsd/nanobsd.sh -h}}}
     153 {{{
     154-b suppress builds (both kernel and world)
     155-k suppress buildkernel
     156-w suppress buildworld
     157-c specify config file
     158...
     159 }}}
     160
     161
     162== C. Fetch proxy configuration onto image, write to CF disk or remotely update ==
     163
     164C.1. Fetch configuration
     165
     166 {{{
     167 $ /root/nanobsd/tools/config-image.sh
     168 }}}
     169
     170The script is connecting to the [http://svn.wirelessleiden.nl/svn/node-config/genesis/nodes/ Wireless Leiden 'genesis' database]. Pick your situation!
     171
     172You can inspect the image bij mounting as memory disk:
     173{{{
     174mdconfig -a -t vnode -f /usr/obj/nanobsd.wleiden/_.disk.full
     175mount /dev/md0s1a /mnt
     176ls /mnt
     177umount /mnt
     178mount /dev/md0s3 /mnt
     179ls /mnt
     180umount /mnt
     181mdconfig -d -u 0
     182}}}
     183
     184
     185C.2. Write the correct image to CF
     186----
     187    ''NOTE:'' '''''_.disk.full''''' is required for '''new CF cards''' as it contains two base systems and one configuration. [[BR]]
     188              '''''_.disk.image''''' on the other hand can be used to update an '''existing CF card'''
     189----
     190
     191    a. '''New image''': Put full image on compact flash disk (attach a card reader/writer with a CF disk of minimum 1 GB)
     192    {{{
     193    $ dd bs=64k if=/usr/obj/nanobsd.wleiden/_.disk.full of=/dev/da0
     194    }}}
     195    (assuming {{{/dev/da0}}} is your compact flash entry; this takes about 15 minutes; you may wish to check afterwards with fdisk whether there
     196    are three partitions on the disk, you can also mount /dev/da0s1a and /dev/da0s3 and check the configuration)
     197
     198    a. '''Existing image''': Put partial image on slice (slice 2) (attach a card reader/writer with the CF disk containing the existing image)
     199    {{{
     200    $ dd bs=64k if=/usr/obj/nanobsd.wleiden/_.disk.image of=/dev/da0s2
     201    }}}
     202
     203    a. '''Existing image remote update''' (slice 2) (network connection to machine 172.x.y.z required)
     204
     205    For remotely updating an existing configuration use:
     206    {{{
     207    dd if=/usr/obj/nanobsd.wleiden/_.disk.image bs=10k | ssh root@172.x.y.z /tools/updatep2
     208    }}}
     209 
     210   You may adjust the block size to make the transfer more efficient (additionally ssh -C is possible) and you can use Ctrl-T to check progress.
     211 
     212== D. Check the cf card and apply last minute changes ==
     213
     214While the cf card is still in your flash card reader you can check whether the image has been written correctly. Check whether you can mount the partitions, e.g.
     215{{{
     216mount /dev/da0s1a /mnt
     217ls /mnt
     218umount /mnt
     219}}}
     220and the configuration partition:
     221{{{
     222mount /dev/da0s3 /mnt
     223ls /mnt
     224}}}
     225
     226If you can not mount the partitions, take a fresh cf card and start again with writing the image.
     227
     228
     229 == E. All done! Load the machine ==
     230 Place the new CF disk in the machine and boot it up (existing nodes: just reboot), you should be good to go! Especially first time booting can take a long time, depending also on hardware. In a Soekris4521 this takes about ten minutes. You can follow the boot process using e.g. minicom or tip, via a serial connection (communication parameters: 9600 8N1).
     231
     232  Note 1. For subsequent nodes you can skip the build and go directly for step C, or take a look at development if you have to rebuild the image (after small changes).
     233
     234  Note 2. Check your bios version in case of booting problems (note: default communication setting for alix is 38400 8N1, bios should be 0.99h)
     235 
     236== F. Applying Updates ==
     237 For small changes there is a shortcut in the build (to save you some coffee ;-)). Pick the situation applicable
     238 1. First lets pump it's source to the latest version
     239 {{{
     240 $ svn up /root/nanobsd
     241 }}}
     242 2. Set your favorite root password to be used in the image
     243 {{{
     244 $ 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
     245 }}}
     246 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.
     247 3. Next step depends on the kind of changes:
     248    a. Only changes in kernel options - `kernel.wleiden` altered - ETA 0:45
     249    {{{
     250    $ sh /usr/src/tools/tools/nanobsd/nanobsd.sh -w -c /root/nanobsd/cfg/nanobsd.wleiden
     251    }}}
     252    a. Only changes in world options - `CONF_{BUILD,COMMON,INSTALL}` in  `nanobsd.wleiden` altered - ETA 2:00 - 6:00
     253    {{{
     254    $ sh /usr/src/tools/tools/nanobsd/nanobsd.sh -k -c /root/nanobsd/cfg/nanobsd.wleiden
     255    }}}
     256    a. _NO_ changes in build options - any other file altered - ETA 0:10
     257    {{{
     258    $ sh /usr/src/tools/tools/nanobsd/nanobsd.sh -b -c /root/nanobsd/cfg/nanobsd.wleiden
     259    }}}
     260
     261= G, Development =
     262
     263== Handy tools ==
     264Some handy tools are available in the /tools directory, such as
     265 * /tools/wl-version : to get information on the configuration that is running
     266 * /tools/image-build.sh for building images (replaces long command lines and prevents unintentional, time-consuming rebuilds; do not forget to '''setenv the root password'''!)
    127267
    128268