Changes between Version 1 and Version 2 of Archive/FreeBSDOnEmbeddedDevice
- Timestamp:
- Nov 1, 2009, 4:07:02 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Archive/FreeBSDOnEmbeddedDevice
v1 v2 1 [[TOC]] 2 3 = Install Base system = 4 == Initial disk configuration == 1 5 {{{ 2 6 ## Hack to find memory card and have partion entries re-read … … 12 16 build# ls /dev/da? | xargs -I %%DA%% -n 1 dd if=/dev/zero of=%%DA%% count=0 13 17 14 Hack to _really_ all old partition information is detroyed 18 Hack to _really_ all old partition information is detroyed: 15 19 build# dd if=/dev/zero of=/dev/da4 bs=1m count=1 16 20 … … 20 24 build# mount /dev/da4s1a /mnt 21 25 26 == Disk population == 27 22 28 build# mkdir -p /usr/data/8.0-RC2 23 29 build# cd /usr/data/8.0-RC2 24 30 25 31 build# mkdir kernels base manpages 26 27 32 build# cd base; echo 'mget *' | ftp -i ftp://ftp.nl.freebsd.org/pub/FreeBSD/releases/i386/8.0-RC2/base/ 28 33 build# cd kernels; echo 'mget *' | ftp -i ftp://ftp.nl.freebsd.org/pub/FreeBSD/releases/i386/8.0-RC2/kernels/ 29 34 build# cd manpages; echo 'mget *' | ftp -i ftp://ftp.nl.freebsd.org/pub/FreeBSD/releases/i386/8.0-RC2/manpages/ 30 35 31 More sophisticated approach (rsync not in base) 36 More sophisticated approach (rsync not in base): 32 37 build# rsync -vaz ftp.nl.freebsd.org::FreeBSD/releases/i386/8.0-RC2/kernels . 33 34 38 35 39 … … 37 41 build# (cd base; sh install.sh) 38 42 39 To disable prompting build# (cd base; cat base.?? | tar --unlink -xpzf - -C $DESTDIR) 43 To disable prompting build# (cd base; cat base.?? | tar --unlink -xpzf - -C $DESTDIR) [[BR]] 40 44 build# (cd kernels; sh install.sh generic) 41 45 build# (cd manpages; sh install.sh) 42 46 43 Activate right kernel 47 Activate right kernel: 44 48 build# rm -r /mnt/boot/kernel/ ; mv /mnt/boot/GENERIC/ /mnt/boot/kernel 45 49 46 Need resolving power at later stage inside chroot 50 == Disk configuration == 51 52 Need resolving power at later stage inside chroot: 47 53 build# cp /etc/resolv.conf /mnt/etc/ 48 54 build# chroot /mnt … … 69 75 Enable serial console: 70 76 chroot# sed '/ttyu0/ s/off/on /' /etc/ttys > /etc/ttys.new && mv /etc/ttys.new /etc/ttys 77 71 78 Cosmetic: disable all vidconsoles as a soekris embedded device does not have any: 72 73 79 chroot# sed '/ttyv[0-7]/ s/on /off/g' /etc/ttys > /etc/ttys.new && mv /etc/ttys.new /etc/ttys 74 80 75 Accounting & access control 81 === Accounting & access control === 76 82 chroot# echo "sshd_enable=YES" >> /etc/rc.conf 77 83 chroot# passwd rootAdministive user (admin for example) … … 80 86 chroot# echo '%wheel ALL=(ALL) ALL' >> /usr/local/etc/sudoers 81 87 82 Networking 88 === Networking === 83 89 chroot# echo "hostname=riff.vanderzwet.net" >> /etc/rc.conf 84 90 … … 91 97 build# umount /mnt 92 98 99 = Initial boot = 93 100 Note: NOT READY YET: Insert card into embedded define and get yourself a prompt, using serial of ssh login. 94 101 95 Install the packages you like:96 node# pkg_add -r tinyproxy sudo vim-lite97 102 98 node# echo "update_motd=NO" >> /etc/rc.conf 103 === dnsmasq === 99 104 100 105 dnsmasq used for local network dns and dhcp: 106 node# pkg_add -r dnsmasq 101 107 node# echo "dnsmasq_enable=YES" >> /etc/rc.conf 102 108 … … 111 117 }}} 112 118 113 119 === ntp === 114 120 node# echo "ntpd_enable=YES" >> /etc/rc.conf 115 121 {{{ … … 123 129 }}} 124 130 131 === motd === 132 125 133 node# (sed '3,$ d' /etc/motd; echo "WWW: http://rickvanderzwet.nl" ) > /etc/motd.new; mv /etc/motd.new /etc/motd 126 134 127 135 === Flash disk protection == 136 node# echo "update_motd=NO" >> /etc/rc.conf 128 137 node# echo "tmpmfs=YES" >> /etc/rc.conf 129 138 Note: You could make /var completely read-only, but I hate the details like package management getting lost. Flash cards these days are cheap anyways … … 132 141 node# echo "varmfs=YES" >> /etc/rc.conf 133 142 node# sed '/1a/ s/rw/ro/' /etc/fstab > /etc/fstab.new; mv /etc/fstab.new /etc/fstab 143 144 === various === 145 node# pkg_add -r tinyproxy sudo vim-lite 146 = Into production = 147 node# reboot 148