Hello, I'm just messing around for learning purposes.
Basically what I tried is:
- remove initrd boot option
- add rootfstype=ext4
This seems to work. Kernel runs my /sbin/init file in statically linked busybox, the script mounts sysfs devtmpfs and proc and give user console.
My problem is whenever I try to run something dependent on glibc. I get "file not found" error, which as I found out in fact means "cannot find your shared libs".
Then I tried mounting /dev/hda1 (that's the device from which I boot, so I'm mounting the disk that's already mounted at /) to /mnt/a
Set LD_LIBRARY_PATH=/mnt/a and voila ldd runs.
So I conclude this has something to do with me running from rootfs. Apparently shared libs cannot be found on rootfs
And that's my question, why not? What is the difference between rootfs and an actual extfs in respect to dynamic loader?
If you think there is some code I need to see to understand, feel free to reference it, I'm proficient in C, but I haven't read much of the post Linux boot code yet.