mkinitrd unification across distributions
 help / color / mirror / Atom feed
* Dracut generation modes
@ 2009-05-28 18:58 Warren Togami
       [not found] ` <4A1EDEBF.4080009-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Warren Togami @ 2009-05-28 18:58 UTC (permalink / raw)
  To: initramfs

So this might not have been clear earlier, but stating it on the list to 
be sure everyone is on the same page.

* Default Dracut
Dracut without any parameters should generate an initrd image capable of 
booting a generic machine.  This means it must not detect anything of 
the current running system to determine what to install in the image. 
This includes stuff in /proc, /sys, lsmod, /proc/mounts and possibly more.

By necessity, stuff in the filesystem are usable to dracut in 
determining what to install in the image.

* --hostonly mode
Host only mode is permitted to use runtime detection to generate an 
image capable of booting the current system.  What exactly does this 
mean?  Is this primarily for smaller sizes by avoiding irrelevant modules?

* (Some other generation mode)
Perhaps we need more generation modes for other purposes.  One likely 
case is where you need to generate a machine specific image for a 
non-local system.  A combination of command line options and/or .conf 
file would define the dracut image for a non-local system.  This might 
be necessary for cases like:

- netboot initrd needs to be as small as possible for resource 
constraint reasons
- embedded systems with resource constraints
- certificates or passwords for iscsi or kerberized nfs

How should this mode be specified from the command line?

Warren Togami
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Dracut generation modes
       [not found] ` <4A1EDEBF.4080009-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-05-29 12:12   ` Victor Lowther
  2009-05-29 14:21   ` Harald Hoyer
  2009-05-29 14:30   ` Seewer Philippe
  2 siblings, 0 replies; 4+ messages in thread
From: Victor Lowther @ 2009-05-29 12:12 UTC (permalink / raw)
  To: Warren Togami; +Cc: initramfs

On Thu, 2009-05-28 at 14:58 -0400, Warren Togami wrote:
> So this might not have been clear earlier, but stating it on the list to 
> be sure everyone is on the same page.
> 
> * Default Dracut
> Dracut without any parameters should generate an initrd image capable of 
> booting a generic machine.  This means it must not detect anything of 
> the current running system to determine what to install in the image. 
> This includes stuff in /proc, /sys, lsmod, /proc/mounts and possibly more.
> 
> By necessity, stuff in the filesystem are usable to dracut in 
> determining what to install in the image.

Should "default" dracut include networking modules, nfs/nbd/iscsi boot
code, etc?  My first instinct would be to say no -- the overwhelming
majority of systems will not need that code to boot.

Heck, I would say that --hostonly should be the default mode, and
generating a generic image should be a special option.

> * --hostonly mode
> Host only mode is permitted to use runtime detection to generate an 
> image capable of booting the current system.  What exactly does this 
> mean?  Is this primarily for smaller sizes by avoiding irrelevant modules?

Yes.  Larger initramfs'es take longer to load into memory, uncompress,
and boot, and there seems to be an odd emphasis on fast boots these
days.

> * (Some other generation mode)
> Perhaps we need more generation modes for other purposes.  One likely 
> case is where you need to generate a machine specific image for a 
> non-local system.  A combination of command line options and/or .conf 
> file would define the dracut image for a non-local system.  This might 
> be necessary for cases like:
> 
> - netboot initrd needs to be as small as possible for resource 
> constraint reasons
> - embedded systems with resource constraints
> - certificates or passwords for iscsi or kerberized nfs

Yes, these reasons are why dracut can source its .conf file from
multiple locations.

For especially tricky scenarios, the kernel can load more than one
initramfs and overlay later ones on top of earlier ones.  I considered
making dracut use that functionality more explicitly by having each
dracut module generate its own compressed cpio, but that would be too
great a departure from how virtually every bootloader handles things to
be worth it. Now you know why I added the -i feature. :)

> How should this mode be specified from the command line?

My idea is to have several dep-only modules in dracut now that we have
dep checking for dracut modules.

-d nfsroot would pull in all the modules needed to boot off nfs, 
-d iscsi would do the same sort of things for iscsi, and so on.

> Warren Togami
> wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
> --
> To unsubscribe from this list: send the line "unsubscribe initramfs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Victor Lowther
RHCE# 805008539634727
LPIC-2# LPI000140019

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Dracut generation modes
       [not found] ` <4A1EDEBF.4080009-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2009-05-29 12:12   ` Victor Lowther
@ 2009-05-29 14:21   ` Harald Hoyer
  2009-05-29 14:30   ` Seewer Philippe
  2 siblings, 0 replies; 4+ messages in thread
From: Harald Hoyer @ 2009-05-29 14:21 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

doh... sent it to warren only..

On 05/28/2009 08:58 PM, Warren Togami wrote:
> So this might not have been clear earlier, but stating it on the list to
> be sure everyone is on the same page.
>
> * Default Dracut
> Dracut without any parameters should generate an initrd image capable of
> booting a generic machine. This means it must not detect anything of the
> current running system to determine what to install in the image. This
> includes stuff in /proc, /sys, lsmod, /proc/mounts and possibly more.
>
> By necessity, stuff in the filesystem are usable to dracut in
> determining what to install in the image.

The default dracut image could be delivered as an rpm along with the kernel.
Configuration files could be injected via "gunzip|cpio -A|gzip", though 
modifying the md5 hash sum.

>
> * --hostonly mode
> Host only mode is permitted to use runtime detection to generate an
> image capable of booting the current system. What exactly does this
> mean? Is this primarily for smaller sizes by avoiding irrelevant modules?

yes

>
> * (Some other generation mode)
> Perhaps we need more generation modes for other purposes. One likely
> case is where you need to generate a machine specific image for a
> non-local system. A combination of command line options and/or .conf
> file would define the dracut image for a non-local system. This might be
> necessary for cases like:
>
> - netboot initrd needs to be as small as possible for resource
> constraint reasons
> - embedded systems with resource constraints

use dracutmodules=""

> - certificates or passwords for iscsi or kerberized nfs

inject configuration files in the standard "Default Dracut" image via 
"gunzip|cpio -A|gzip"

>
> How should this mode be specified from the command line?
>


--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Dracut generation modes
       [not found] ` <4A1EDEBF.4080009-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  2009-05-29 12:12   ` Victor Lowther
  2009-05-29 14:21   ` Harald Hoyer
@ 2009-05-29 14:30   ` Seewer Philippe
  2 siblings, 0 replies; 4+ messages in thread
From: Seewer Philippe @ 2009-05-29 14:30 UTC (permalink / raw)
  To: Warren Togami; +Cc: initramfs

Warren Togami wrote:
> So this might not have been clear earlier, but stating it on the list to 
> be sure everyone is on the same page.
> 
> * Default Dracut
> Dracut without any parameters should generate an initrd image capable of 
> booting a generic machine.  This means it must not detect anything of 
> the current running system to determine what to install in the image. 
> This includes stuff in /proc, /sys, lsmod, /proc/mounts and possibly more.

Yes

> 
> By necessity, stuff in the filesystem are usable to dracut in 
> determining what to install in the image.

...Dracut has to get it's tools from somewhere...

> 
> * --hostonly mode
> Host only mode is permitted to use runtime detection to generate an 
> image capable of booting the current system.  What exactly does this 
> mean?  Is this primarily for smaller sizes by avoiding irrelevant modules?

Yes. And possibly more optimization. I'm thinking "apt-get update 
linux-image" which automatically rebuilds the initrd...

> * (Some other generation mode)
> Perhaps we need more generation modes for other purposes.  One likely 
> case is where you need to generate a machine specific image for a 
> non-local system.  A combination of command line options and/or .conf 
> file would define the dracut image for a non-local system.  This might 
> be necessary for cases like:
> 
> - netboot initrd needs to be as small as possible for resource 
> constraint reasons
> - embedded systems with resource constraints

That's what dracutmodules in the configfile is for.

> - certificates or passwords for iscsi or kerberized nfs

I'd say either via injection or a site-specific add-on module.

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-29 14:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-28 18:58 Dracut generation modes Warren Togami
     [not found] ` <4A1EDEBF.4080009-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-29 12:12   ` Victor Lowther
2009-05-29 14:21   ` Harald Hoyer
2009-05-29 14:30   ` Seewer Philippe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox