VIA Artigo A2000 FreeBSD NAS build
From b0rken.org
Contents |
Hardware
- VIA C7-D 1.5GHz 32-bit CPU
- VIA Gigabit ethernet - vge(4)
- VIA Padlock crypto acceleration - padlock(4)
- Up to 2GB DDR2-667 RAM
- Two SATA-II channels
- One PATA compactflash slot
Added hardware
- 2GB RAM
- Two 500GB Seagate disks
- 4GB compactflash card
Installation process
- Boot from USB stick containing FreeBSD-9.0-RELEASE-i386-memstick.img. Select "Shell" from Welcome screen.
- SATA disks detected as ada0 and ada1. CompactFlash card detected as ada2.
- Create GPT partitioning scheme on CF card; create partition for second-stage bootcode; create partition for UFS root filesystem; write bootcode to MBR and bootcode partition:
# gpart create -s GPT ada2 # gpart add -t freebsd-boot -b 64k -s 64k ada2 # gpart add -t freebsd-ufs ada2 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada2
- Create UFS filesystem and mount:
# newfs /dev/ada2p2 # mount /dev/ada2p2 /mnt
- Extract minimal FreeBSD distribution to filesystem:
# cd /mnt # tar Jxpf /usr/freebsd-dist/base.txz # tar Jxpf /usr/freebsd-dist/kernel.txz
- Create /mnt/boot/loader.conf, containing:
padlock_load="YES" zfs_load="YES" vm.kmem_size_max="512M" vm.kmem_size="512M"
- Create /mnt/etc/rc.conf, containing:
hostname="artigo.home" ipv4_addrs_vge0="192.168.0.4/24" defaultrouter="192.168.0.1" keymap="uk.iso.kbd" keyrate="fast" sshd_enable="YES" sendmail_enable="NO" zfs_enable="YES"
- Create /mnt/etc/fstab, containing:
/dev/ada2p2 / ufs rw 0 0
It's now possible to reboot into the newly installed system.
Ensure that the compactflash device is listed first in the BIOS: Advanced BIOS Features -> Hard Disk Boot Priority.
Minimal post-install configuration
Set root password:
# passwd
Set up timezone:
# cp /usr/share/zoneinfo/Europe/London /etc/localtime
Create sendmail aliases database:
# newaliases
Create a non-root user:
# adduser
ZFS setup
- Create mirrored zpool from disk drives:
zpool create pool0 mirror ada0 ada1