Smallest possible install? I have 1GB disk constraint.

It's actually 955MB. I couldn't even install Debian to it. I installed Alpine Linux instead. Interestingly, I had like 250-300MB spare with that too. But couldn't do FreeBSD. I couldn't do that in my experiments on KVM. I set up a 955MB disk to install, but still it can't install due to space.
 
You should be able to put the kernel, /lib, /usr/lib and /bin/sh into 1 GB.

You can't use the installer, you need to boot a full FreeBSD system and then make a filesystem on the 1 GB disk connected as a second disk.
 
You need to boot off one disk or a USB stick or something and the 1 GB disk needs to be connected as a second drive.
I don't understand fully but I think I get it slightly. This is a flash drive, it's soldered too. So, I need least amount of writes. Is UFS good for that?
 
UFS is good for it.

How do you boot an installer medium on that thing?
I installed alpine linux on KVM, then turned it into a writable image file. Then, I booted the device's BIOS. And selected another Linux SSD, booted from there and overwritten that image to the flash drive with dd. It was a long time ago.
 
Right. That should work for FreeBSD, too. But you need to make the filesystem by hand and copy into it what you need. You can't use FreeBSD's installer since that unpacks the whole base system as a minimum.
 
Poudriere Image is good for creating images this small.
Trick is knowing what is needed. It can't be done with base install as noted.
Everybodies needs are different.

I got my Image size down to 800MB with the help of BSDRP WITHOUT_'s and getting rid of LLVM DEDUG.
 
It's actually 955MB. [...] I installed Alpine Linux instead. Interestingly, I had like 250-300MB spare with that too. But couldn't do FreeBSD. I couldn't do that in my experiments on KVM. I set up a 955MB disk to install, but still it can't install due to space.
It's quite possible to fit a whole Root-on-ZFS (kernel.txz, base.txz) commpression=on on 1G, with ~ 350M to spare, when installed manually (not menu guided). If UEFI, keep the efi ESP small, no swap.

Rich (BB code):
 # gpart show ada0
=>     40  2097072  ada0  GPT  (1.0G)
       40    81920     1  efi  (40M)
    81960     1024     2  freebsd-boot  (512K)
    82984      984        - free -  (492K)
    83968  2011136     3  freebsd-zfs  (982M)
  2095104     2008        - free -  (1.0M)


 # zfs list -o space
NAME           AVAIL   USED  USEDSNAP  USEDDS  USEDREFRESERV  USEDCHILD
tank            348M   484M        0B    483M             0B       756K



This is a flash drive, it's soldered too. So, I need least amount of writes.
The whole file system can be set readonly=on if necessary (zfsprops(7)), with in-memory file systems attached, for temporary saved files, i.e. /var and /tmp. See tmpfs(5) and /etc/defaults/rc.conf "tmpfs", "varmfs",

Under /var are saved logs, mails, backups, etc., if these are important, then a "varmfs" is not suitable. I cannot tell if it makes a difference (if any) creating a separate "var" dataset with readonly=off
 
It's actually 955MB. I couldn't even install Debian to it. I installed Alpine Linux instead. Interestingly, I had like 250-300MB spare with that too. But couldn't do FreeBSD. I couldn't do that in my experiments on KVM. I set up a 955MB disk to install, but still it can't install due to space.

You could take a look at nanobsd: https://docs.freebsd.org/en/articles/nanobsd/. Like example I found this use case online https://ogris.de/nanobsd/ with 210 MB disk space.
 
Back
Top