Re: Advanced dracut use help or tips needed.

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

 



Hi Harald,

Thanks you for your detailed response, I'll start to dig my case using your tips.
I still have few more questions though.

>> 1/ detect all network and all hard drives
I just want to do the same as a linux installation disk. (as SystemImager is a sort of OS install disk).
I mean, how do all OS install disk wait that needed drivers have finished to initialize?
I just need that udev scan hardware and load needed drivers, nothing more. isn't there an udev target for that?
I just need to run my script once network is up and once hard drives harve been detected.
Can't I set a systemd dependacy on network and or disks? does a target matches that kind of need?

- Systemd compatibility with non systemd distros.
I see that you answered my restion about running my script using systemd, but many distro are not using systemd by default. do you think that using dracut with systemd on those distros is stable enough for my purpose? (I think about ubuntu, debian, rhel6, ...) does it work at least on rhel6? If not, are there alternatives? (I need to support: rhel-6+ fedora-17+ debian-6+ ubuntu-1204+ SuSE-11+)

- Kernel boot option.
how does the "rd.neednet=1 ip=dhcp" work when used? first device found that can get an ip wins? is there an order? if I have 2 ethernet devices and I want to create a bond later (thus both connected) is eth0 chosen over eth1? (for example if a dhcp servers gives addr to both)
Isn't there a dracut module for network setup using dhcp and udev (to detect hardware) that would add a systemd target?

- Systemd targets required befor I run my script
Can I add "After: network.target" to make sure I have network initialized?

- Supported filesystems
Is there a way to add all supported filesystem to the initramfs.img or should I list them all updating the list when new ones are added?

- Firmwares for drivers (net)
You told me to use "--no-hostonly for network + disk", but isn't there an option for include all modules present in /lib/modules/<kernel>?
At least, does --no-hostonly includes drivers firmwares if present when needed?
Can rd.neednet=1 ip=dhcp work with a NIC that requires a firmware to be loaded?

- dractut default modules: how do I know?
How do I knwow which modules are used by default and which ones are not (thus requiring me to use the -m option). For example, I've installed dracut-network which contains many modules. is there a sort of depend in it? any doc on that (no man in the fedora package and insid the modules. Do I need to reverse engineer the file to understand their function and usage?)

- dracut redudant options?
What is the difference between using --filesystems btrfs and --add-drivers btrfs??
What is the difference between using --install /usr/sbin/fsck.ext3 and --fscks ext3

- including modules: are dependancies for modules handled?
Does --modules includes depending modules. I mean does --module snd includes snd_hwdep,snd_timer,snd_hda_codec_idt,snd_pcm,snd_seq,snd_hda_codec,snd_hda_intel,snd_seq_device as well?

Sorry to bother whith such questions, but I'm completely new in this early OS boot world. As I said before, google is of no help for me as 99.99% of answers are about creating a simple initrd for OS boot.
So if you could bootstrap my knowledge, that would greatly help me in fixing SystemImager faster.

Best regards,

Olivier.

----- Mail original -----
> De: "Harald Hoyer" <harald@xxxxxxxxxx>
> À: "olivier lahaye1" <olivier.lahaye1@xxxxxxx>
> Cc: initramfs@xxxxxxxxxxxxxxx
> Envoyé: Vendredi 21 Février 2014 16:39:09
> Objet: Re: Advanced dracut use help or tips needed.
> 
> 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