InitrdModules 23 - copy "vital" modules to 'local-initrd.gz'.

Under development: PCMCIA, wireless, etc.

Moderator: Forum moderators

Post Reply
gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

InitrdModules 23 - copy "vital" modules to 'local-initrd.gz'.

Post by gyrog »

Now at v23 viewtopic.php?p=46158#p46158.

----------------------------Original message-----------------------
An alternate to 'initmodules'.

I have uploaded 'initrdmodules_21.sfs' to https://www.mediafire.com/folder/0f33m6 ... trdmodules.

The original topic can be found at https://oldforum.puppylinux.com/viewtop ... 7&t=118416,
it contains more info on how to use "initrdmodules".

One of the disadvantages of the previous version is that it "taints" the 'initrd.gz' file with stuff that is local to the current kernel on the currrent computer,
i.e. the modules added for the current computer might not be relevant to another computer, or even a different kernel on the same computer.

This version takes advantage of grub2's ability to process a list of 'initrd' files, rather than a single 'initrd.gz'.
Instead of adding the modules to 'initrd.gz' it adds them to 'local-initrd.gz'.
So a "tainted" frugal install can easily be returned to an "untainted" state by removing 'local-initrd.gz'.

The patched 'init' script to support "initrdmodules" is also made available as 'local-initrd.gz',
use the 'local-initrd.gz' from https://www.mediafire.com/folder/hkwe9y ... /init-wait.
See viewtopic.php?p=32752#p32752 on how to use it.

To try:
1. Download extra sfs 'initrdmodules_21.sfs' and 'local-initrd.gz' into the install directory of a working, recent, frugal Puppy install, preferably not a production install.
2. Edit the grub2 'grub.cfg' for this install, as per the instructions at viewtopic.php?p=32752#p32752.
3. reboot into this Puppy.
4. Load 'initrdmodules_21.sfs' as an extra sfs.
5. In a console run:

Code: Select all

initrdmodules -h

to ensure that the utility will run.

Like 'initmodules' this utility is a workaround to overcome the kernel <-> modules gap that exists during the execution of the Puppy 'init' script.
But whereas 'initmodules' provides a list of modules to 'init' that get loaded as soon as the 'zdrv...sfs' is available,
'initrdmodules' ensures that the modules are available as soon as the 'init' script starts running.

This means that keyboards that require a 'kernel/drivers/hid/' module or a 'kernel/drivers/usb/host/' module, will work after 'init' fatal errors.
It also means that 'init' can immediately display it's first message on a screen that needs a 'kernel/drivers/hid/' module.

Note:
If you do a simple edit of 'grub.cfg' with an unconditional reference to 'local-initrd.gz', you need to remove it if you remove 'local-initrd.gz' from the Puppy install directory.
But if you edit 'grub.cfg' with a conditional indirect reference, it doesn't matter if it remains after 'local-initrd.gz' is removed from the Puppy install directory.

Last edited by gyrog on Sun Jan 02, 2022 5:42 am, edited 2 times in total.
gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: InitrdModules 21 - copy "vital" modules to 'local-initrd.gz'.

Post by gyrog »

A new version of 'local-initrd.gz' has been uploaded to https://www.mediafire.com/folder/hkwe9y ... /init-wait.
The patched 'init' script to support "initrdmodules" in 'local-initrd.gz', has been further patched to fix a bug with "humongous-initrd" support.

gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: InitrdModules 21 - copy "vital" modules to 'local-initrd.gz'.

Post by gyrog »

I have uploaded 'InitrdModules_AppDir-22.tar.gz' to https://www.mediafire.com/folder/0f33m6 ... trdmodules.

This is the 'initrdmodules' utility as an AppDir, a portable application.

gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: InitrdModules 21 - copy "vital" modules to 'local-initrd.gz'.

Post by gyrog »

Info on AppDir, viewtopic.php?t=4789

gyrog
Posts: 594
Joined: Thu Oct 01, 2020 8:17 am
Location: Australia
Has thanked: 14 times
Been thanked: 180 times
Contact:

Re: InitrdModules 23 - copy "vital" modules to 'local-initrd.gz'.

Post by gyrog »

I have uploaded 'InitrdModules_AppDir-23.tar.gz' to https://www.mediafire.com/folder/0f33m6 ... trdmodules.

This is the 'initrdmodules' utility as an AppDir, a portable application.

This AppDir follows my method for CLI only utilities viewtopic.php?p=46155#p46155, it is nolonger recognised by ROX as an AppDir.
It can be "avtivated" with the 'PortableActivate' utility viewtopic.php?p=45091#p45091,
or
you can issue a command like the following, in a terminal:

Code: Select all

ln -sf /path/to/InitrdModules/LAUNCH /root/my-applications/bin/initrdmodules
Post Reply

Return to “Cutting Edge”