1

Ok so I have a system running a RHEL 6 server and due to hardware restraints RHEL 6 is the newest I can use. Second I am trying to create a live network bootable initramfs for a pxe operation. In newer systems RHEL 7/8 I can just include the dmsquash-live-root and livenet dracut modules to give my initramfs files remote root and live boot capabilities. My RHEL 6 server does not have livenet, just dmsquash-live-root. So I copied the 90livenet directory from a new system and placed it in the /usr/share/dracut/modules.d/ directory as seen in image below.enter image description here

it then looks and contains same content as my RHEL 7 system. but when I run the following dracut command using the below conf file the dracut just skips over the modules like it does not exist. which is what is strange to me because if you specify a module that doesn't exist the dracut command will complain and usually fail but it this case it does not complain about including livenet but instead seems to simple just cruise over it.

dracut -v -f -c dracut.conf initramfs-3.10.0-693.72.1.rt56.672.el6rt.x86_64.img 3.10.0-693.72.1.rt56.672.el6rt.x86_64 > output.txt
                                             #Dracut.conf 
# Dracut modules to add to the default
add_dracutmodules+="nfs network dmsquash-live livenet"

# additional kernel modules to the default
add_drivers+="nfs nfs4"

omit_dracutmodules+="biosdevname"

Soo My question is, can anyone point out an error in my command or conf usage or can someone explain the extra steps I need to do other than include the modules directory and contents into the modules.d directory.(ps I did also try ./module-setup.sh just to see if that setup script has to be run prior to using dracut command - some modules have scripts called install so not sure if I need on but the setup scripts looks very similar to install scripts of other working modules)

I can grep everything else in that config file and it is there except the livenet module I injected.

1 Answer 1

0

As RHEL 6 was released in 2010, its version of dracut might not support module-setup.sh. It looks like this was introduced in version 008 released on 2011-02-02.

Try converting module-setup.sh into individual scripts. Each of the check, depends, install, installkernel functions should be its own script of the same name (no .sh suffix). Only the inside of the function (the text between { and }) should be copied. To be safe, make sure to include the shebang (#! /bin/bash) and make the script executable (chmod +x check depends install installkernel).

So for example if your /usr/lib/dracut/modules.d/90livenet/module-setup.sh looks like this:

#! /bin/bash

check () {
A
}

depends () {
B
}

install () {
C
}

installkernel () {
D
}

You should replace it with these files:

/usr/lib/dracut/modules.d/90livenet/check:

#! /bin/bash

A

/usr/lib/dracut/modules.d/90livenet/depends:

#! /bin/bash

B

/usr/lib/dracut/modules.d/90livenet/install:

#! /bin/bash

C

/usr/lib/dracut/modules.d/90livenet/installkernel:

#! /bin/bash

D

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .