Changes between Version 1 and Version 2 of Archive/FreeBSDOnEmbeddedDevice


Ignore:
Timestamp:
Nov 1, 2009, 4:07:02 PM (15 years ago)
Author:
Rick van der Zwet
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Archive/FreeBSDOnEmbeddedDevice

    v1 v2  
     1[[TOC]]
     2
     3= Install Base system =
     4== Initial disk configuration ==
    15{{{
    26## Hack to find memory card and have partion entries re-read
     
    1216build# ls /dev/da? | xargs -I %%DA%% -n 1 dd if=/dev/zero of=%%DA%% count=0
    1317
    14 Hack to _really_ all old partition information is detroyed
     18Hack to _really_ all old partition information is detroyed:
    1519build# dd if=/dev/zero of=/dev/da4 bs=1m count=1
    1620
     
    2024build# mount /dev/da4s1a /mnt
    2125
     26== Disk population ==
     27
    2228build# mkdir -p /usr/data/8.0-RC2
    2329build# cd /usr/data/8.0-RC2
    2430
    2531build# mkdir kernels base manpages
    26 
    2732build# cd base; echo 'mget *' | ftp -i ftp://ftp.nl.freebsd.org/pub/FreeBSD/releases/i386/8.0-RC2/base/
    2833build# cd kernels; echo 'mget *' | ftp -i ftp://ftp.nl.freebsd.org/pub/FreeBSD/releases/i386/8.0-RC2/kernels/
    2934build# cd manpages; echo 'mget *' | ftp -i ftp://ftp.nl.freebsd.org/pub/FreeBSD/releases/i386/8.0-RC2/manpages/
    3035
    31 More sophisticated approach (rsync not in base)
     36More sophisticated approach (rsync not in base):
    3237build# rsync -vaz ftp.nl.freebsd.org::FreeBSD/releases/i386/8.0-RC2/kernels .
    33 
    3438
    3539
     
    3741build# (cd base; sh install.sh)
    3842
    39 To disable prompting build# (cd base; cat base.?? | tar --unlink -xpzf - -C $DESTDIR)
     43To disable prompting build# (cd base; cat base.?? | tar --unlink -xpzf - -C $DESTDIR) [[BR]]
    4044build# (cd kernels; sh install.sh generic)
    4145build# (cd manpages; sh install.sh)
    4246
    43 Activate right kernel
     47Activate right kernel:
    4448build# rm -r /mnt/boot/kernel/ ; mv /mnt/boot/GENERIC/ /mnt/boot/kernel
    4549
    46 Need resolving power at later stage inside chroot
     50== Disk configuration ==
     51
     52Need resolving power at later stage inside chroot:
    4753build# cp /etc/resolv.conf /mnt/etc/
    4854build# chroot /mnt
     
    6975Enable serial console:
    7076chroot# sed '/ttyu0/ s/off/on /' /etc/ttys > /etc/ttys.new && mv /etc/ttys.new /etc/ttys
     77
    7178Cosmetic: disable all vidconsoles as a soekris embedded device does not have any:
    72 
    7379chroot# sed '/ttyv[0-7]/ s/on /off/g' /etc/ttys > /etc/ttys.new && mv /etc/ttys.new /etc/ttys
    7480
    75 Accounting & access control
     81=== Accounting & access control ===
    7682chroot# echo "sshd_enable=YES" >> /etc/rc.conf
    7783chroot# passwd rootAdministive user (admin for example)
     
    8086chroot# echo '%wheel ALL=(ALL) ALL' >> /usr/local/etc/sudoers
    8187
    82 Networking
     88=== Networking ===
    8389chroot# echo "hostname=riff.vanderzwet.net" >> /etc/rc.conf
    8490
     
    9197build# umount /mnt
    9298
     99= Initial boot =
    93100Note: NOT READY YET: Insert card into embedded define and get yourself a prompt, using serial of ssh login.
    94101
    95 Install the packages you like:
    96 node# pkg_add -r tinyproxy sudo vim-lite
    97102
    98 node# echo "update_motd=NO" >> /etc/rc.conf
     103=== dnsmasq ===
    99104
    100105dnsmasq used for local network dns and dhcp:
     106node# pkg_add -r dnsmasq
    101107node# echo "dnsmasq_enable=YES" >> /etc/rc.conf
    102108
     
    111117}}}
    112118
    113 
     119=== ntp ===
    114120node# echo "ntpd_enable=YES" >> /etc/rc.conf
    115121{{{
     
    123129}}}
    124130
     131=== motd ===
     132
    125133node# (sed '3,$ d' /etc/motd; echo "WWW: http://rickvanderzwet.nl" ) > /etc/motd.new; mv /etc/motd.new /etc/motd
    126134
    127 
     135=== Flash disk protection ==
     136node# echo "update_motd=NO" >> /etc/rc.conf
    128137node# echo "tmpmfs=YES" >> /etc/rc.conf
    129138Note: You could make /var completely read-only, but I hate the details like package management getting lost. Flash cards these days are cheap anyways
     
    132141node# echo "varmfs=YES" >> /etc/rc.conf
    133142node# sed '/1a/ s/rw/ro/' /etc/fstab > /etc/fstab.new; mv /etc/fstab.new /etc/fstab
     143
     144=== various ===
     145node# pkg_add -r tinyproxy sudo vim-lite
     146= Into production =
     147node# reboot
     148