On Wed, Mar 18, 2015 at 2:12 PM, Dale <[email protected]> wrote: > > I thought there was a tool that just lists the contents. Things is, I'm > not sure what I would be looking at.
An initramfs is just a root filesystem. init is /sbin/init unless the kernel is told otherwise. If you took your entire root filesystem, compressed it into a cpio archive, and put that in grub as your initramfs, then your entire distro would run from a ramdisk and you might not even notice the difference (well, assuming you had enough RAM). The only real "magic" with an initramfs is that it mounts your real root somewhere, then swaps it out for the real root: http://manpages.courier-mta.org/htmlman8/switch_root.8.html This is a bit like chroot, but the old root filesystem is deleted in the process (so that your initramfs does not consume any RAM once the system actually boots). I'm not sure exactly how dracut does it with systemd, since my understanding is that during shutdown systemd actually pivots back to the initramfs (which allows all filesystems to be cleanly unmounted instead of merely being mounted read-only). -- Rich

