Skip regenerate ld.so.cache and modules.dep by cheat code
Hi everyone,
I've learned alot from this forum so I thought it time for me to conribute... I have seen this come up from time to time. .... On HD-Install systems knoppix-autoconfig regenerates ld.so.cache and modules.dep and each startup adding a fair amount of time to your boot sequence. If the hardware in the machine has not been changed since last boot then ld.so.cache and modules.dep doesnt HAVE to be regenerated..... SOooo...
1st backup your knoppix-autoconfig as root like so:
Code:
cp /etc/init.d/knoppix-autoconfig /etc/init.d/knoppix-autoconfig.BACKUP
Find this section in /etc/init.d/knoppix-autoconfig:
Code:
if [ -n "$INSTALLED" ]; then
echo -n "${BLUE}Running from HD, regenerate ld.so.cache and modules.dep...${NORMAL}"
# Regenerate ld.so.cache and module dependencies on HD
ldconfig ; depmod -a 2>/dev/null
# knoppix-installer bug workaround
chmod 1777 /tmp 2>/dev/null
echo ""
fi
Edit this section as follows:
Code:
if [ -n "$INSTALLED" ]; then
if ! checkbootparam "nomodregen"; then
echo -n "${BLUE}Running from HD, regenerate ld.so.cache and modules.dep...${NORMAL}"
# Regenerate ld.so.cache and module dependencies on HD
ldconfig ; depmod -a 2>/dev/null
# knoppix-installer bug workaround
chmod 1777 /tmp 2>/dev/null
echo ""
else chmod 1777 /tmp 2>/dev/null ; echo -n "${BLUE}Not regenerating ld.so.cache and modules.dep as per your request...${NORMAL}" ; echo ""
fi
fi
Then issuing the "nomodregen" cheat-code will allow you to skip this regeneration process.... Even on a static machine this should probably be done from time to time....so if you need to Regenerate ld.so.cache and module dependencies the following commads may be issued:
This ofcoarse may be added to a script like /usr/bin/knx-mod-regen
Code:
#!/bin/bash
echo Regenerating ld.so.cache and module dependencies.....
ldconfig ; depmod -a
I almost made a diff to patch knoppix-autoconfig but I figured showing it the long way might be helpfull to someone :) ...
Anyway, enjoy :)
-onemyndseye
Re: Can't get it to work!
Quote:
Originally Posted by Uncle Stinky
I can't get your procedure to work with Knoppix 5.1.1 after installing Knoppix 5.1.1 to my hda2 from live CD with the command "sudo knoppix-installer" I did NOT use the command "knoppix tohd=/dev/hda2" at the boot up prompt to install Knoppix 5.1.1 from live CD but, rather, used the command "sudo knoppix-installer" while being completely booted up and within the Knoppix 5.1.1 operating system that is on the Knoppix 5.1.1 live CD only!
Any further help will be delightful!
Blessings
US
It does work with Knoppix 5.11, I used the same install procedure as you. Modify knoppix-autoconfig as per Justin's notes.
In your /boot/grub/menu.lst file dont forget to append
nomodregen to the end of the line that boots knoppix.
Re: Can't get it to work!
Quote:
Originally Posted by hal8000
Quote:
Originally Posted by Uncle Stinky
I can't get your procedure to work with Knoppix 5.1.1 after installing Knoppix 5.1.1 to my hda2 from live CD with the command "sudo knoppix-installer" I did NOT use the command "knoppix tohd=/dev/hda2" at the boot up prompt to install Knoppix 5.1.1 from live CD but, rather, used the command "sudo knoppix-installer" while being completely booted up and within the Knoppix 5.1.1 operating system that is on the Knoppix 5.1.1 live CD only!
Any further help will be delightful!
Blessings
US
It does work with Knoppix 5.11, I used the same install procedure as you. Modify knoppix-autoconfig as per Justin's notes.
In your /boot/grub/menu.lst file dont forget to append
nomodregen to the end of the line that boots knoppix.
I do not know where to (or how to get to) "append 'nomodrgen' to the end of the line that boots knoppix." Give me a clue about what that line looks like? Then, please remind me how to edit that particular line in my "/boot/grub/menu.lst file? I did the procedure exactly as Justin suggested and it doesn't work on my HP SR1103WM computer. I've also done the procedure on three other computers and I have the same probglem with them. Thanks for your I/O in the matter!
US
This may also help you to shorten the time that it takes...
Sometimes, it may be necessary to allow this "regeneration of ld.so.cache and modules.dependencies" process to take as much time as it needs to complete without our hacking the process at all, except for adding a command named "dma".
And, if you don't want to go through the complete procedure that is described in my previous post that is dated Sat Dec 29, 2007 3:22 pm, you can type "dma" (without the quotation marks) after the "vga=791" (without the quotation marks) command so that it looks like this "vga=791 dma" (without the quotation marks) and then do not type in the command "nomodregen=true" (without the quotation marks) after the command "vga=791" (without the quotation marks) and this will very significantly shorten the time that it takes for the "regeneration of ld.so.cache and modules.dependencies" process to complete.
This "regeneration of ld.so.cache and modules.dependencies" process takes about 15 seconds to complete when I type in the "dma" command as described above, without going through ALL of that long procedure that is described in my previous post that was dated Sat Dec 29, 2007 3:22 pm.
I did previously load knoppix onto my hard drive after booting up to the KDE desktop while using the Knoppix 5.1.1 live CD by entering the "sudo knoppix-installer" command in the "Shell-Konsole" . Then, after the install was completed, I rebooted, and then, on the blue boot command screen, I arrowed down and highlighted the 2nd line that had the Kernel 2.6.19 and did NOT highlight the 1st line that has the Kernel 2.6.19 Default on it.
When I have the 2nd line highlighted, then I click the "e" key on my keyboard to edit the commands before the final boot screen initializes.
Then a new screen will appear and I arrow down and highlight the 2nd command line. When I have the 2nd command line highlighted, I click on the "e" key on my keyboard again.
Then, I type in "dma" (without the quotation marks) after the command "vga=791" so
that it reads "vga=791 dma" (without the quotation marks)
Then I click the "Enter" key on my keyboard.
Then I click the "b" key on my keyboard and the computer booted up much faster, indeed, without going through the remaining long process that I described in my previous post that was dated Sat Dec 29, 2007 3:22 pm.
I believe that this will significantly shorten the " ld.so.cache and modules.dependencies" process time without taking away any of the benefits that the "ld.so.cache and modules dependencies" process provides to our Knoppix 5.1.1 operating system.
US