Re: Intend of hostonly-cmdline?

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

 



В Wed, 07 May 2014 13:32:39 +0200
Harald Hoyer <harald@xxxxxxxxxx> пишет:

> On 07.05.2014 13:12, Thomas Renninger wrote:
> > Hi,
> > 
> > I wonder for what this one is exactly for?
> > 
> > commit ab9457efd78ff74c654b4123956cdbd131935066
> > Author: Harald Hoyer <harald@xxxxxxxxxx>
> > Date:   Tue Feb 25 12:35:32 2014 +0100
> > 
> >     Add flag to toggle hostonly cmdline storing in the initramfs
> >     
> >     --hostonly-cmdline:
> >         Store kernel command line arguments needed in the initramfs
> >     
> >     --no-hostonly-cmdline:
> >         Do not store kernel command line arguments needed in the initramfs
> > 
> > 
> > 
> > Wouldn't it be enough to simply add hostonly command line parameters
> > only in hostonly case like:
> > +    if [[ $hostonly == "yes" ]]; then
> > +        cmdline  >> "${initdir}/etc/cmdline.d/90mdraid.conf"
> > +        echo  >> "${initdir}/etc/cmdline.d/90mdraid.conf"
> > +    fi
> > 
> > why is a hostonly-cmdline extra parameter needed?
> > 
> > Thanks,
> > 
> >   Thomas
> > 
> 
> hostonly stores config files like mdadm.conf and only installs those kernel
> modules, which are specific to the machine.
> 
> hostonly-cmdline also stores dracut specific kernel cmdline parameters to boot
> the system in the initramfs, so that basically you could boot the system by
> only specifying "root=" on the kernel cmdline.
> 
> The advantage of hostonly-cmdline is that the kernel cmdline does not need
> complex rd.md.uuid=... or rd.luks.uuid=... parameters.
> 
> The disadvantage is that in case of uuid or disk changes, you cannot alter the
> parameters which are in the initramfs.
> 
> I suggest to use the output of:
> 
> # dracut --print-cmdline
> 
> and add it to the kernel command line.
> 
> hostonly-cmdline should only be used, when e.g. the maximum char limit of the
> kernel command line would be reached or when the user has a generic rescue
> image, to be used when the disk layout changed and the user has not generated a
> new initramfs with it.
> 
> Maybe we could let hostonly-cmdline be the default and add a parameter
> "rd.cmdline.conf=0", which turns of parsing $initrd/etc/cmdline.d/*.conf.
> 
> Thoughts?

Actually hostonly-cmdline is partially broken with systemd in
initramfs. For example systemd-cryptsetup-generator does not
read /etc/cmdline.d/*.conf files, so rd.luks* parameters must be
appended to kernel cmdline anyway.

-- 
Alexander Tsoy
--
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