(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 04 Dec 2020, 01:34
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
InitrdModules 6 - copy "vital" modules to 'initrd.gz'.
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
gyro

Joined: 28 Oct 2008
Posts: 1799
Location: Brisbane, Australia

PostPosted: Fri 27 Mar 2020, 01:33    Post subject:  InitrdModules 6 - copy "vital" modules to 'initrd.gz'.
Subject description: An alternate to 'initmodules'.
 

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' actually copies the modules into the current 'initrd.gz'.
So 'init' can 'insmod' these modules before it attempts fo acesss any disks and before it writes any messages.
Because 'insomd' is used to load the modules, dependencies as defined in 'modules.dep' are also copied.

This means that 'init' can run a Puppy installed on an "mmc" drive that needs a 'kernel/drivers/mmc/host/' module for access,
and it can immediately display it's first message on a screen that needs a 'kernel/drivers/hid/' module.
It also means that keyboards that require a 'kernel/drivers/hid/' module or a 'kernel/drivers/usb/host/' module, will work after 'init' fatal errors.

This project was prompted by this "http://www.murga-linux.com/puppy/viewtopic.php?p=1049199#1049199".

To try:

Download extra sfs 'initrdmodules_6.sfs' from http://www.mediafire.com/folder/0f33m6adukdgf/initrdmodules (1,3 MiB).

This is a test sfs, so it contains an 'initrd.gz' with a patched 'init',
and a test script, 'mods-initrd-this', to install this 'initrd.gz' as the current 'initrd.gz' with the current DISTRO_SPECS.

1. Load 'initrdmodules_6.sfs' as an extra sfs.
2. In a console run:
Code:
initrdmodules -h
to ensure that the utility will run.
3. Run
Code:
initrdmodules -l
to see if there are any appropriate modules for your hardware and kernel.
If there are no modules listed, then installing the included 'initrd.gz' should not make any difference.
4. If there are some modules listed, then run
Code:
mods-initrd-this
to install the 'initrd.gz' with the patched 'init'.
Your current 'initrd.gz' will be moved to something like 'initrd_9999.gz'.
5. Run
Code:
initrdmodules -c
to copy modules to 'initrd.gz'.
6. Reboot.

Note1: If the patched 'init' actually loads any modules, it will not run the 'initmodules' code.
This is because any modules that would have been loaded via 'initmodules' should have already been loaded.

Note2: The included 'initrd.gz' has been extracted from 'ScPup-20.01+2-T.iso', but it should boot most woof-ce Puppies.
It worked Ok for me with xenialpup, xenialpup64, bionicpup32, bionicpup64 and ScPup64.
The only thing that changes is the DISTRO_SPECS file.

I have attached the patch file for the 'init' script as 'mods.diff'.

gyro
mods.diff.gz
Description  gunzip to produce 'mods.diff' file.
gz

 Download 
Filename  mods.diff.gz 
Filesize  1.12 KB 
Downloaded  155 Time(s) 

Last edited by gyro on Sat 28 Mar 2020, 00:14; edited 1 time in total
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2626

PostPosted: Fri 27 Mar 2020, 01:39    Post subject:  

Sounds pretty cool Smile

Any plans to include this in woof-CE?

_________________
Find me on minds and on pearltrees.
Back to top
View user's profile Send private message Visit poster's website 
mistfire

Joined: 04 Nov 2008
Posts: 1424
Location: PH

PostPosted: Fri 27 Mar 2020, 03:19    Post subject:  

Pros: Smaller kernel file size. Additional hardware support on boot

Cons: When upgrading kernel. It requires updating the initrd like other major distros does. Instead of just copy-paste the vmlinuz and zdrv sfs modules
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1799
Location: Brisbane, Australia

PostPosted: Sat 28 Mar 2020, 00:12    Post subject:  

s243a wrote:
Any plans to include this in woof-CE?
This is currently a "test" sfs.
If this progressed to "production", it's a fairly simple patch to 'init', that could easily be applied to woof-ce.
A production sfs would contain only the 'initrdmodules' and 'initrdfiles' utilities.
'initrdmodules_20.sfs' could remain as an "extra-sfs" .

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1799
Location: Brisbane, Australia

PostPosted: Sat 28 Mar 2020, 00:29    Post subject:  

mistfire wrote:
Cons: When upgrading kernel. It requires updating the initrd like other major distros does. Instead of just copy-paste the vmlinuz and zdrv sfs modules
Well not quite.

1.The modules in "initrd.gz" are stored in a directory whose name is the name of the kernel, (uname -r).
So if you boot with a different kernel, 'init' will not 'insmod' the old ones.

2. 'initrdmodules' has a service in '/etc/init.d' called 'initrdmods' that works only during boot.
It checks the date/time stamp on the 'vmlinuz' in the install directory,
if the date/time stamp changes, it removes the old modules from 'initrd.gz' and copies any detected new modules to 'initrd.gz'.

gyro
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 1799
Location: Brisbane, Australia

PostPosted: Sat 28 Mar 2020, 05:18    Post subject:  

I have uploaded 'initrdmodules_20.sfs' to http://www.mediafire.com/folder/0f33m6adukdgf/initrdmodules (8.0 KiB).

This is a "production" type sfs that contains the 2 utilities 'initrdmodules' and 'initrdfile'.
This corresponds to the 'initrdmodules' that is contained in "mio v20" (http://www.murga-linux.com/puppy/viewtopic.php?p=1053941#1053941).

If you use the 'initrdmodules' contained in this sfs to copy modules to 'initrd.gz',
these will be ignored unless your 'init' script has also been patched with the file 'mods.diff', attached above.

gyro
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 2.1142s ][ Queries: 13 (1.9662s) ][ GZIP on ]