This is the only option dracut really needs to boot from your root partition. Because your root partition can live in various environments, there are a lot of formats for the root= option. The most basic one is root=<path to device node>:
root=/dev/sda2
Because device node names can change, dependent on the drive ordering, you are encouraged to use the filesystem identifier (UUID) or filesystem label (LABEL) to specify your root partition:
root=UUID=19e9dda3-5a38-484d-a9b0-fa6b067d0331
or
root=LABEL=myrootpartitionlabel
To see all UUIDs or LABELs on your system, do:
# ls -l /dev/disk/by-uuid
or
# ls -l /dev/disk/by-label
Speeding up the Boot Process
If you want to speed up the boot process, you can specify as much information for dracut on the kernel command as possible. For example, you can tell dracut, that you root partition is not on a LVM volume or not on a raid partition, or that it lives inside a specific crypto LUKS encrypted volume. By default, dracut searches everywhere. A typical dracut kernel command line for a plain primary or logical partition would contain:
rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0
This turns off every automatic assembly of LVM, MD raids, DM raids and crypto LUKS.
Of course, you could also omit the dracut modules in the initramfs creation process, but then you would lose the possibility to turn it on on demand.
I do have a SWAP File which is configured to allow for Suspend then Hibernate.
Question:
If you are using GRUB to boot, how do I enable these two configuratoin options?
Thought I would give you a little ping. I have been going through the various System Boot threads with Dracut configuration. So better safe then sorry and talk to you and not break my system
Not to worry. You are right I am using GRUB. I have been reading and learning (best thing about being part of the community with supportive people like you).
So I found two other references which I think might work … but ofcourse second set of eyes always helps.
dracut is capable of embedding the kernel parameters in the initramfs, thus allowing to omit them from the boot loader configuration. See dracut#Kernel command line options
Kernel command line options can be placed in a .conf file in /etc/dracut.conf.d/, and set via the kernel_cmdline= flag. Dracut will automatically source this file and create a 01-default.conf file and place it inside the initramfs directory /etc/cmdline.d/. For example, your kernel command line options file could look like:
If I am reading the references above correctly it looks like I can move the following lines out of the /etc/default/grub and use the following solution:
Create cmdline.conf file in the dracut directory.
sudo touch /etc/dracut.conf.d/cmdline.conf
Edit the /etc/dracut.conf.d/cmdline.conf
sudo nano /etc/dracut.conf.d/cmdline.conf
Get Root Partition configuration configuration information and put into the “kernel_cmdline” of the “/etc/dracut.conf.d/cmdline.conf” file.
The below configuration line assumes your root partition is:
Not on a LVM volume.
Not on a raid partition
Does not lives inside a specific crypto LUKS encrypted volume.
Tried moving the “resume=UUID=715c2972-1a51-4d73-89a0-86ea7bb5aa7f resume_offset=36151296…” line out of GRUB to the /etc/dracut.conf.d/cmdline.conf.
I noticed that the hibernation functionality was not able to find the hibernation file when I moved the configuration to the /etc/dracut.conf.d/cmdline.conf file. So I had to keep this in the GRUB configuration file.
Use kernel_cmdline=“rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0” to try to speed up the boot.
From using the “systemd-analyze” command I notice under 2 second faster boot. So it is possible that on a single drive laptop with docking station the dracut method already tunes for this condition.
Cold Boot:
❯ systemd-analyze
Startup finished in 13.820s (firmware) + 1.763s (loader) + 812ms (kernel) + 979ms (initrd) + 3.812s (userspace) = 21.188s
graphical.target reached after 3.811s in userspace.
Reboot:
❯ systemd-analyze
Startup finished in 7.137s (firmware) + 3.814s (loader) + 855ms (kernel) + 1.533s (initrd) + 3.523s (userspace) = 16.864s
graphical.target reached after 3.522s in userspace.
So in my case I am not implementing this configuration change. Maybe if I get more complicated hardware I can try again. Thank you for your guidance.