Re: Advanced dracut use help or tips needed.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/20/2014 08:52 AM, olivier.lahaye1@xxxxxxx 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



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




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux