5

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.

8
  • 1
    The /proc /dev /sys directories are pseudo directories and take up no physical space. You could certainly combine /bin and /sbin... For networking capabilities, I'd check the output of ifconfig -a ...that doesn't tell you if the env supports networking but rather if it contains any network hardware (which implies networking support)
    – Mei
    Commented Sep 8, 2015 at 13:27
  • Unfortunately I am unable to interface with the OS at a place where it's supposed to be run - there is simply no input device/port to connect to. All I can is remove the CF card on which this OS resides and connect it to a normal PC and boot from there, which outputs a screen I'm going to post in a minute Commented Sep 8, 2015 at 13:36
  • However, the motherboard that the CF card is attached to does have a NIC connected to it Commented Sep 8, 2015 at 13:37
  • If you are trying to examine a black box, I'd look to see if there was a connection you could use... whether it is serial or something else. I'd also connect it in a secure network environment and use a network traffic sniffer to see what network traffic is being generated. I'd also use nmap to determine what network services are available.
    – Mei
    Commented Sep 8, 2015 at 13:48
  • 2
    To get down to 9MB, I think you'll have to get something based on an embedded C library (Bionic, dietlibc, uClibc, …) and BusyBox, rather than GNU libc and GNU utilities. Commented Sep 8, 2015 at 21:02

1 Answer 1

1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .