Changes between Version 28 and Version 29 of FreeBSDOnEmbeddedDevice


Ignore:
Timestamp:
02/02/12 12:08:20 (12 years ago)
Author:
Rick van der Zwet
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FreeBSDOnEmbeddedDevice

    v28 v29  
    99= Initial disk configuration =
    1010Please do mind I create a 6G image to be used at a 8G CF disk as making it exactly fit, causes issues if sectors are wearing out. I create 2 x 2G partitions for the OS (and backup OS) and 1 x 1G partition for various configuration files and other shared stuff.
    11 
    12 Hack to reload the usb card reader to reread partition tables:
    13 build# usbconfig -d `usbconfig | awk -F : '/Mass/ {print $1}'` reset
    1411
    1512build# truncate -s 6GB embedded.img
     
    9693chroot# echo hostname=`hostname` >> /etc/rc.conf
    9794
     95Warning: IPv4 and IPv6 is provided example only, provide your own local IP configuration
     96{{{
     97chroot# cat <<EOF > /etc/rtadvd.conf
     98bridge0:\
     99  :addrs#1:addr="2001:1af8:febe::":prefixlen#64:tc=ether:
     100EOF
     101}}}
     102
     103{{{
     104chroot# <<EOF >> /etc/rc.conf
     105cloned_interfaces="bridge0"
     106wlans_ath0="wlan0"
     107
     108# Internal wired and wireless
     109ifconfig_vr0="up"
     110create_args_wlan0="wlanmode hostap country NL mode 11g ssid home.vanderzwet.net up"
     111ifconfig_bridge0="addm wlan0 addm vr0 up"
     112ipv4_addrs_bridge0="192.168.42.1/24 192.168.1.2/24"
     113ipv6_ifconfig_bridge0="fe80::2 prefixlen 64"
     114ipv6_ifconfig_bridge0_alias0="2001:1af8:febe::1 prefixlen 64"
     115
     116# Wireless Leiden Connections
     117ifconfig_vr2="up"
     118ipv4_addrs_vr2="172.20.145.130/26"
     119
     120# Internet
     121ifconfig_vr1="DHCP"
     122
     123static_routes="wleiden"
     124route_wleiden="-net 172.16.0.0/12 172.20.145.129"
     125
     126ipv6_defaultrouter="2001:1af8:fe00:28e::1"
     127ipv6_network_interfaces="auto"
     128rtadvd_interfaces="bridge0"
     129rtadvd_enable="YES"
     130EOF
     131}}}
     132
     133{{{
     134chroot# cat <<EOF > /etc/hostapd.conf
     135interface=wlan0
     136driver=bsd
     137
     138logger_syslog=-1
     139logger_syslog_level=0
     140logger_stdout=-1
     141logger_stdout_level=2
     142dump_file=/tmp/hostapd.dump
     143ctrl_interface=/var/run/hostapd
     144ctrl_interface_group=0
     145
     146macaddr_acl=0
     147auth_algs=1
     148
     149wpa=1
     150wpa_passphrase=M3nW1r3l3ss!
     151wpa_key_mgmt=WPA-PSK
     152wpa_pairwise=CCMP TKIP
     153EOF
     154}}}
     155
    98156== Package install ==
    99157
     
    182240build# mdconfig -u $MD
    183241
     242Hack to reload the usb card reader to reread partition tables:
     243build# usbconfig -d `usbconfig | awk -F : '/Mass/ {print $1}'` reset
     244
     245Have a look to which card (da1 in mine case) you like to install it:
     246build# grep sectors /var/log/messages
     247> Feb  2 12:55:12 brahm kernel: da1: 7629MB (15625216 512 byte sectors: 255H 63S/T 972C)
     248
     249Tip: During this process you can press CTRL+T to send SIGINFO, this will tell you the current state of the code.
     250Important: The following action will DESTROY all the existing content on the configured device. USE AT OWN RISK.
     251
    184252Now clone your image onto your flashcard:
     253build# dd if=embedded.img of=/dev/da1 bs=64k
    185254
    186255