On Fri, Dec 21, 2012 at 8:51 AM, Ian Stakenvicius <a...@gentoo.org> wrote:
> On 21/12/12 03:10 AM, J. Roeleveld wrote:
>
>> An init* needs to be kept in sync with the rest of the system as
>> well.
>
> Just to be clear, by "init*" you mean {initrd,initramfs} , correct?

Seems likely.

However, for the most part it really only needs to be kept in sync
with the kernel.  Smarter ones like dracut that might do things like
keep a copy of mdadm.conf internally might need to be updated when
your disks change, and so on.  In general, however, they only need
changes when either your kernel changes, or the path to the root
filesystem changes (by path I mean mdadm/lvm/nfs/etc).

Everything inside the initramfs is self-contained and does not have
dependencies on anything outside.  Sure, it might not have the latest
version of udev inside or whatever, but unless you need the latest
version of udev to mount root it isn't a problem.  The contents of the
initramfs are generally discarded once root and /usr are mounted.

However, I can vouch that an initramfs can make things interesting if
you do move your root filesystem.  I just moved mine to lvm and forgot
to update fstab.sys.  Dracut does pay attention to your root
filesystem in fstab and fstab.sys - it uses the kernel line to find
root, but once it is mounted fstab gets read and used to remount it.
Oh, and if fstab and fstab.sys have differing root lines both get
sort-of-mounted (it mounts what is in fstab, and then mounts fstab.sys
over it as far as I can tell - running mount and finding that you have
/sysroot mounted on a mountpoint that you can't even get to is fun).

But, I wouldn't be running root on lvm but for the initramfs, so it
was worth the trouble.  Anybody who moves around root without a boot
CD handy is asking for trouble anyway.

Rich

Reply via email to