mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: olivier.lahaye1-GANU6spQydw@public.gmane.org
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Advanced dracut use help or tips needed.
Date: Fri, 21 Feb 2014 16:39:09 +0100	[thread overview]
Message-ID: <5307731D.80403@redhat.com> (raw)
In-Reply-To: <557206706.564515170.1392882748561.JavaMail.root-NPLbsSYf/7dsFmKuirFwRhh1pbbyJDp15NbjCUgZEJk@public.gmane.org>

On 02/20/2014 08:52 AM, olivier.lahaye1-GANU6spQydw@public.gmane.org wrote:
> 
> Hi Harald,
> 
> Thanks for your answer, I know this doc; I've googled a lot, but I'm unable to find what I need.
> All those docs explain how to boot an OS. either local or networked.
> I mean, the initrd end with a swaproot and finish boot on the booted OS.
> 
> That's not what I want.
> 
> I'm looking for something that:
> 1/ detect all network and all hard drives

difficult to know, without specifying a timeout.
firmware and devices can take as long as they want to initialize

> 2/ start network

"rd.neednet=1 ip=dhcp" on the kernel command line

> 3/ run MY script

Hook a systemd service in

https://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html#dracutbootup7

Do not specify "root=..." on the kernel cmdline.

Your service should have

Before: basic.target
After: sysinit.target

Then in your service, you can wait as long as you want, while in the background
all drivers load.

you can do the same as dracut-initqueue.

> 4/ reboots or shutdown
> NO swaproot and NO os boot
> 
> In the doc, I've been unable to find the following infos:
> 1/ how do I tell to dracut to include ALL drivers including frimwares
>    do I really need to find /lib/modules |xargs to create a full list and give drivers one y one to the dracut command line options? Really no way to specify all drivers or at least all network drivers + all hdisk controler + all filesystems? (for example, the pxeboot image for fedora install has ALL drivers + all firmwares)

--no-hostonly for network + disk


> 2/ how to I tell to dracut that I don't want swaproot? (for example fedora pxeboot  image runs a secondstage loader, thus no swaproot)

do not specify "root="

> 3/ how do I tell dracut that instead I want to run /etc/rcS (or /bin/my_systemimager_scrit.sh)? (for example fedora pxeboot image runs a secondstage loader)

hook your service in the boot

> 
> Assuming that all my specific software is located in /usr/lib/systemimager/template_img/
> and knowing that I need to run /usr/bin/system_imager_client.sh
> and knowing that I need parted+buzybox+lvmtools+*mkfs*+rsync_client+ssh_client
> (and optionaly knowing that I need fr keyboard)
> 
> What would be a typical dracut command? (that would work the same on rhel-6 and on fedora-20 or debian-7)
> 
> My problems are:
> 1/ was unable to tell dracut no to swaproot
> 2/ was unable to tell to dracut to run my scrip instead
> 3/ was unable to tell "all drivers" (I can fallback to list them all but seems stupid)
> 4/ I'd like to use systemd when  possible



  parent reply	other threads:[~2014-02-21 15:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1729487458.368641100.1389443150192.JavaMail.root@spooler6-g27.priv.proxad.net>
     [not found] ` <1729487458.368641100.1389443150192.JavaMail.root-NPLbsSYf/7dsFmKuirFwRhh1pbbyJDp15NbjCUgZEJk@public.gmane.org>
2014-01-11 12:27   ` Advanced dracut use help or tips needed olivier.lahaye1-GANU6spQydw
     [not found]     ` <1726532839.368644133.1389443257576.JavaMail.root-NPLbsSYf/7dsFmKuirFwRhh1pbbyJDp15NbjCUgZEJk@public.gmane.org>
2014-01-13 10:02       ` Tim Mohlmann
2014-01-22 12:17       ` Harald Hoyer
     [not found]         ` <52DFB6D3.1090907-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-20  7:52           ` olivier.lahaye1-GANU6spQydw
     [not found]             ` <557206706.564515170.1392882748561.JavaMail.root-NPLbsSYf/7dsFmKuirFwRhh1pbbyJDp15NbjCUgZEJk@public.gmane.org>
2014-02-21 15:39               ` Harald Hoyer [this message]
     [not found]                 ` <5307731D.80403-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-22  8:46                   ` olivier.lahaye1-GANU6spQydw
     [not found]                     ` <1065426580.573286201.1393058780798.JavaMail.root-NPLbsSYf/7dsFmKuirFwRhh1pbbyJDp15NbjCUgZEJk@public.gmane.org>
2014-02-24  8:20                       ` Harald Hoyer
     [not found]                         ` <530B00C4.10309-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-02-24 13:52                           ` Olivier LAHAYE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5307731D.80403@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olivier.lahaye1-GANU6spQydw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox