On Wed, Aug 08, 2007 at 10:05:24AM +0100, Darren J Moffat wrote:
> Scott Rotondo wrote:
> > The idea for a long-term solution (having the boot loader read multiple 
> > files into memory instead of a single archive) sounds like a good one.
> 
> I'm not sure that is the best solution in the network boot case. 
> Consider that one of the reasons we designed wanboot with a downloadable 
> archive was to *reduce* the number of files transferred over the network 
> and to reduce the number of files we had to verify with an hmac.  This 
> is important not just for wanboot (which should get ported to x86) and 
> also the netboot for NFS and iSCSI root cases as well.

In the boot-from-local-media case the boot loader knows how to read from
that media, and teaching it about the filesystem on that media isn't all
that difficult (compared to writing realmode device drivers, I imagine).

In the network boot case the stack is much larger, particularly when
IPsec or RPCSEC_GSS are thrown into the picture.  Expecting the boot
loader to be able to read files from the real root in this case seems
like asking a lot.

Now, the good news is that in the network boot case we can rely on the
archive being up to date: the boot server can see to it.  Though it
means teaching the boot server how to read from the client's real root
FS; if the boot server is Linux and the client's root is on ZFS then
this might be a problem (FUSE to the rescue!).

So I think we might just want to do something like:

 - if / is on local media then the archive contains no editable files,
   with the kernel accessing them through the boot loader until / is
   mounted

 - if / is remote then the server SHOULD/MUST update the boot archive
   and the client SHALL depend on it, and the archive will contain
   editable files

IOW, from the kernel's p.o.v. it just looks first in the archive, then
if ENOENT it asks the boot loader.  From the boot loader's p.o.v. the
boot loader must know how to access root filesystems on local media, but
not how to access remote filesystems.

This is Jan's proposal, as I read it, with the extra req that the boot
server keep the boot archive updated.

> The root cause here seems to be that there are multiple copies of a 
> file, one in the root filesystem and one in the archive filesystem.  It 
> isn't that the boot system loads an archive.   If instead we could fix 
> the problem so that there is never the possibility of the root 
> filesystem being out of sync with the archive that would help.  There 
> are possible ways to do this - I shared some of my thoughts privately 
> with Jan yesterday and he had already looked a similar way of solving it 
> but it is too complex for now.

The above (Jan's) proposal does just that.

> I just don't want the outcome of this fast-track to imply that the 
> future *better* solution requires the boot loader to be reading multiple 
> files.

I don't think it does.

Nico
-- 

Reply via email to