FreeBSD Network Backup Thing from Scrap: Difference between revisions
Jump to navigation
Jump to search
Line 12: | Line 12: | ||
xzcat FreeBSD-11.2-RELEASE-arm-armv6-RPI-B.img.xz | sudo dd bs=1M of=/dev/sdX status=progress | xzcat FreeBSD-11.2-RELEASE-arm-armv6-RPI-B.img.xz | sudo dd bs=1M of=/dev/sdX status=progress | ||
* Plug the 32MB sdcard and create a W95 FAT32 partition with <code>fdisk</code> or something (Hex code b) then format it: | * Plug the 32MB sdcard and create a W95 FAT32 partition with <code>fdisk</code> or something (Hex code b) then format it: | ||
sudo mkfs.vfat /dev/sdX1 | sudo mkfs.vfat /dev/sdY1 | ||
* Mount both the USB key's first partition and the SD card partition and copy the boot content from the USB key to the SD card: | |||
sudo mount /dev/sdX1 /media/usb-key | |||
sudo mount /dev/sdY1 /media/sd-card | |||
sudo cp /media/usb-key/* /media/sd-card/ | |||
umount /dev/sdX1 | |||
umount /dev/sdY1 |
Revision as of 11:13, 12 July 2018
This document shows how to setup a dedicated backup machine for LAN use, made from bit and pieces most people don't care about these days: a Raspberry Pi 1, a 32MB SD Card, and a 2GB USB key. For the software, we will use FreeBSD and BorgBackup.
Prepare the OS
Why waste a 8GB or 16GB fancy SD Card when you probably have some old SD and USB sticks lying around? Also reading performances on the RPi1 is much better on USB than with the crappy SD reader. Finally, FreeBSD on the RPi1 works great, and very light on resources which is a plus given the limitation of the RPi CPU and RAM.
What needs to be done in a nutshell is to have the mandatory MS-DOS /boot
partition on the 32MB SD card and have the rest of the filesystem on the USB stick.
- Get the FreeBSD RPi1 image (update to latest RPI-B image)
wget https://download.freebsd.org/ftp/releases/arm/armv6/ISO-IMAGES/11.2/FreeBSD-11.2-RELEASE-arm-armv6-RPI-B.img.xz
- Plug USB stick and copy the FreeBSD image to it (adjust
/dev/sdX
)
xzcat FreeBSD-11.2-RELEASE-arm-armv6-RPI-B.img.xz | sudo dd bs=1M of=/dev/sdX status=progress
- Plug the 32MB sdcard and create a W95 FAT32 partition with
fdisk
or something (Hex code b) then format it:
sudo mkfs.vfat /dev/sdY1
- Mount both the USB key's first partition and the SD card partition and copy the boot content from the USB key to the SD card:
sudo mount /dev/sdX1 /media/usb-key sudo mount /dev/sdY1 /media/sd-card sudo cp /media/usb-key/* /media/sd-card/ umount /dev/sdX1 umount /dev/sdY1