Is it possible to just patch the kernel so there's no need to do a swap? This can save some time. If the 'embed' bootcode skips it, wouldn't some binaries using that system still mess up (e.g. df)?
I think you mixed the terms there, by swap-ability I meant the ability for data not recently accessed in the tmpfs to go to swap, leaving more free ram.
Yes, with an "embed" boot the root fs will not show in df. But it's a tradeoff between that and some boot speed, so it's left to the user's discretion.
Yeah, I did misunderstand apparently.
I ended up adding the switch_root code to my own project (as shown below) so that binaries such as df would work properly. After looking at the output, I realized something must be wrong. This is what my information looks like:
Output from df:
FS Size Used Avail Use Mounted
tmpfs 2769380 0 2769380 0% /mnt/switch_root
mdev 1538544 0 1538544 0% /dev/shm
Output from mount
rootfs on / type rootfs (...)
tmpfs on /mnt/switch_root type tmpfs (...)
mdev on /dev type tmpfs (...)
...
Then I booted into TC to see what there's was showing and this is what the result is:
Output from df:
FS Size Used Avail Use Mounted
tmpfs 2.6G 16.9M 2.6G 1% /
tmpfs 1.5G 0 1.5G 0% /dev/shm
Output from mount
rootfs on / type rootfs (...)
tmpfs on / type tmpfs (...)
proc on /proc type proc (...)
...
Couple of questions....
1) Why does the rootfs still show in both OS's? Once you switch_root, shouldn't the initial ramdisk be destroyed?
2) Why does mine read as /mnt/switch_root (which is the directory everything should be moved into using the switch_root call as found in the TC /init script) instead of just / ?
3) Why are all of the mounts not shown in the df output?
Dave
UPDATE:
Apparently I wasn't using switch_root right and as a result the filesystem created to switch_root to wasn't being switch_root'ed to so it just showed up as an additional mounted filesystem. I've since corrected the issue and now my "output from mount" shows the same as TC. But my question still remains... shouldn't that have gone away once the switch_root took place?