Linux – 9 Mb Slackware distro – possible

linuxslackwaresmall-distribution

Is it possible for a slackware distro to be 9 Mb in size, have /bin /dev /var /proc /sys directories completely empty, and have only following content in the rest of the directories:

/proc
/sbin
/sys
/usr
/var
/exciter_drv.ko
/nvram_drv.ko
/bin
/boot
/dev
/etc
/lib
/lost+found
/sbin/init
/sbin/tcsd
/usr/local
/usr/local/var
/usr/local/var/lib
/usr/local/var/lib/tpm
/boot/bzImage
/boot/grub
/boot/grub/stage1
/boot/grub/menu.lst
/boot/grub/stage2
/boot/grub/default
/boot/grub/checkfile
/etc/rc.S
/etc/fstab.save
/etc/aumixrc
/etc/HOSTNAME
/etc/nsswitch.conf
/etc/passwd
/etc/rc.inet
/etc/rc.6
/etc/lilo.conf
/etc/rc.udev
/etc/mtab
/etc/inittab
/etc/rc.0
/etc/profile
/etc/random-seed
/etc/asound.state
/etc/rc.messagebus
/etc/hosts
/etc/rc.M
/etc/group
/etc/rc.init
/etc/fstab
/etc/rc.alsa
/etc/host.conf
/etc/ld.so.conf
/etc/rc.acpid
/etc/rc.K
/lib/libtspi.so
/lib/libz.so.1
/lib/libnss_files.so.2
/lib/libpthread.so.0
/lib/libgcc_s.so.1
/lib/ld-linux.so.2
/lib/libnsl.so.1
/lib/libc.so.6
/lib/libnss_compat.so.2
/lib/libdl.so.2
/lib/libcrypto.so.0

Note: an executable file /sbin/init (which executes automatically with GRUB) when executed accesses an EEPROM chip that exists on a motherboard that the OS is supposed to be run on, is it possible that this file is downloading the rest of the OS once executed?

How would one determine if such OS has any networking capabilities? (Ethernet mainly)

Additional info:

The OS resides on a CF card which is connected to a customized motherboard with no input port/device available to connect to. Therefore I am unable to supply commands through the console. I have removed the CF card and tried booting it from a normal PC which outputs the following screen and then halts:

enter image description here

I have also tried mounting the CF card in Ubuntu 14.04 to execute the /sbin/init (the only executable that seems this OS is meant to run) which outputs various errors about not being able to contact EEPROM and access various directories on it like: /data/eeprom.c, which drew me into conclusion that the OS needs additional files before its Filesystem can be mounted (referring to the error on the image above)

My goal, if possible, is to add libraries necessary for SSH support, create a user with administrative privileges and connect to the OS remotely. But then again, I am unsure whether these libraries (and many other things) already exist just not on the CF card but on the EEPROM chip and are somehow merged(?)/downloaded once the OS starts executing.

Apologies for my incompetence, still studying Linux.

Best Answer

Lately (with x86_64 etc.) I believe the answer would be "no", especially the initramfs/kernel might be bigger than that :( , but you could still try, especially when you custom compile the kernel and throw out anything not absolutely needed :)

The error you see, are related to settings in the initramfs or grub/etc. that doesn't have the right root partition setup, or not formatted correctly for it to be mounted, not the "sparseness" of the filesystem.

NEtwork booting is something done "easily", but I'll advise you to consider first checking how it's done from UEFI etc. where things go through the ARP/DHCP -> TFTP -> NFS/iSCSI mount cycles to understand how those works before trying to do a custom method yourself.

Related Question