You can fit anything in memory, as long as you have enough memory
I'm not sure how nanoBSD works, but in my own home-brew nanoBSD-like script I use this in
/boot/loader.rc:
Code:
set vfs.root.mountfrom="ufs:/dev/md0"
load /boot/kernel/kernel
echo Loading mfsroot
load -t mfs_root /mfsroot
set beastie_disable="YES"
autoboot
I boot this with syslinux:
Code:
label freebsd
MENU LABEL ^1 AndurilBSD
KERNEL /boot/syslinux/memdisk
APPEND initrd=/boot/freebsd.gz harddisk raw
This is actually not very efficient, since syslinux loads freebsd.gz in memory, and then FreeBSD then loads mfsroot in memory, but since the image is ~20M it's acceptable...
Is there something similar to NanoBSD in GNU/Linux?
Well, Linux is not an OS, it's a collection of different utilities: Linux kernel + GNU bintools + network tools + ...
So making a `small' Linux distro means not adding to many pluses after the `Linux kernel' part
This is a bit different from FreeBSD, where you have a comparatively large base system to start with, which needs to be `stripped down' in order to be very small.
If you want to make something very minimal, you can use
Linux from scratch, which is basically a guide to making your own Linux distribution.
If you view this as an educational experience: go for it. If you just want a minimal distribution: there are already of them out there, so you're probably reinventing the wheel (use an internet search engine to find them).