On Friday, December 21, 2012 09:38:36 AM Rich Freeman wrote:
> 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).

And with the "move to /usr", also when that changes.
Granted, on most systems it won't actually move often once it's installed.

> 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.

True, but what if a system has been updated and the structure of the system 
has been changed. This makes the init* (what is the preferred way of naming 
this?) no longer able to boot properly.

> 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).

Why are there 2 fstab-files? That, to me, looks like a likely cause for 
problems.
I haven't tried dracut yet, but have tried " genkernel " to generate the init* 
and it does work. However it does increase the complexity and adds a layer 
that is not easily debugged.
I am looking forward to when eudev is released and supports my environment so 
I can get rid of it.

The creation of init*-files is not clearly documented and the tools available 
want to put user-space tools inside it.

> 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.

Agreed, I would do that move from inside a rescue-environment myself, not on a 
live system :)

--
Joost

Reply via email to