Re: stopping dm-* modules and associated files from loading at boot
I don't know if this will help but here follows the lists of modules that are included in the initrd of two systems. The first system, Duo1, has a SATA disk and does not use LVM -- [r...@duo1 ~]# gunzip /boot/initrd-$(uname -r).img | cpio -it 2/dev/null | grep ko$ | sort lib/ahci.ko lib/ehci-hcd.ko lib/ext3.ko lib/jbd.ko lib/libahci.ko lib/libata.ko lib/ohci-hcd.ko lib/scsi_mod.ko lib/sd_mod.ko lib/uhci-hcd.ko [r...@duo1 ~]# The second system, stxsl, has two EIDE (PATA) disks logically combined together by LVM -- [r...@stxsl ~]# gunzip /boot/initrd-$(uname -r).img | cpio -it 2/dev/null | grep ko$ | sort lib/ata_generic.ko lib/ata_piix.ko lib/dm-log.ko lib/dm-mirror.ko lib/dm-mod.ko lib/dm-region-hash.ko lib/dm-snapshot.ko lib/dm-zero.ko lib/ehci-hcd.ko lib/ext3.ko lib/jbd.ko lib/libata.ko lib/ohci-hcd.ko lib/pata_acpi.ko lib/scsi_mod.ko lib/sd_mod.ko lib/uhci-hcd.ko [r...@stxsl ~]# Notice the six dm- modules that are included as a result of using LVM? Alan.
Re: stopping dm-* modules and associated files from loading at boot
On Tue, Aug 31, 2010 at 10:54 PM, g gel...@bellsouth.net wrote: On 09/01/2010 05:10 AM, Akemi Yagi wrote: snip I understand mkinitrd would not honor the options if the system sees certain hardware. from where do you get this? to my knowledge, i have in/on/around this system box to give any indication of raid. I don't remember where I saw the description about the omit options. In any event, that approach apparently did not work for you. The unpacking/repacking method is a sure way to remove modules from the .img file. Your system might fail to boot but it is worth a try if you wish to experiment. Akemi
Re: stopping dm-* modules and associated files from loading at boot
On 09/01/2010 03:17 PM, Akemi Yagi wrote: snip I don't remember where I saw the description about the omit options. ok. In any event, that approach apparently did not work for you. very true. The unpacking/repacking method is a sure way to remove modules from the .img file. Your system might fail to boot but it is worth a try if you wish to experiment. have never done such, but that is what i like about computers and linux. always something new to learn. boot failure is not a problem. i have 3 kernels loaded to fall back to. this is a triple boot box, so i can also use 1 of other 2 to restore old init*.img. yes, i always backup a file before fiddling. learned that in early s100 days. if manual removal does not work, i will probably use yum to remove raid software. just might be that is what i should have done to start. again, thanks for your help. -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On 08/31/2010 04:35 AM, Chris Stevens wrote: snip Some suggestions. First, I think that renaming the dm directory won't do what you want because a modprobe -a will rebuild the dependencies with the new directory names. sounds logical. That's just a theory of mine that's unproven. a good theory, but what would execute modprobe -a, other than doing so manually? while attempting to manually trouble shoot a problem, such as now, i would not with out as you suggest... To defeat this, you would need to move that directory completely out /lib/modules tree. However, I would make sure you have a backup kernel configured that you can boot from if this crashes your startup. i keep at least 3 old kernels in case of need to fall back that far. A less drastic measure to try would be to make a /etc/modprobe.conf file with something like this alias modulename off added; alias dm-mem-cache.ko off alias dm-mod.ko off alias dm-log.ko off alias dm-region.ko off alias dm-messages.ko off alias dm-raid45.ko off to /etc/modprobe.conf, then ran mkinitrd /boot/initrd-2.6.18-164.11.1.el5.img 2.6.18-164.11.1.el5 rebooted, above dm-* still loaded. blacklist modulename is there a difference than 'alias * off'? see http://wiki.xdroop.com/space/RedHat/Prevent+Module+Loading for the reference of this solution. read. I would think that a raid setup would need to put this stuff on the initial ram disk in case raid is needed to access the boot/root partitions. i have no raid installation. So a mkinitrd would probably need to be done after making /etc/modprobe.conf. which i did. i thank you for your help. i am open to other suggestions. even considering using yum to remove all raid files. i would rather leave as i may setup a raid system after next end of year. -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On Tue, Aug 31, 2010 at 3:49 PM, g gel...@bellsouth.net wrote: So a mkinitrd would probably need to be done after making /etc/modprobe.conf. which i did. i thank you for your help. i am open to other suggestions. Are you using LVM? If not, you might want to run mkinitrd with the following options: --omit-raid-modules --omit-lvm-modules Akemi
Re: stopping dm-* modules and associated files from loading at boot
On 08/31/2010 11:33 PM, Akemi Yagi wrote: snip Are you using LVM? no. i dislike lvm almost as much as ms bs os. If not, you might want to run mkinitrd with the following options: --omit-raid-modules --omit-lvm-modules it had been a while from last using mkinitrd, so i read man again. i will admit that i read right over those 2 arguments. will try and post back in an hour. [ NCIS just started on local tv. :) ] thank you for reply. -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On 08/31/2010 11:33 PM, Akemi Yagi wrote: thank you for reply. snip Are you using LVM? no. i dislike lvm almost as much as ms bs os. If not, you might want to run mkinitrd with the following options: --omit-raid-modules --omit-lvm-modules tried; # mkinitrd --omit-raid-modules --omit-lvm-modules \ /boot/initrd-2.6.18-164.11.1.el5.img 2.6.18-164.11.1.el5 dm-* modules load on boot. added blacklist dm-[module names] to modprobe.conf, 'dm-*' modules load on boot. any further suggestions? -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On Tue, Aug 31, 2010 at 8:06 PM, g gel...@bellsouth.net wrote: On 08/31/2010 11:33 PM, Akemi Yagi wrote: # mkinitrd --omit-raid-modules --omit-lvm-modules \ /boot/initrd-2.6.18-164.11.1.el5.img 2.6.18-164.11.1.el5 dm-* modules load on boot. added blacklist dm-[module names] to modprobe.conf, 'dm-*' modules load on boot. any further suggestions? I understand mkinitrd would not honor the options if the system sees certain hardware. If you are determined to removed those modules, you can do so by: (1) unpack the initrd.img file (use gunzip and cpio) (2) delete the modules of your target (3) repack the modified content into initrd.img Akemi
Re: stopping dm-* modules and associated files from loading at boot
On 09/01/2010 05:10 AM, Akemi Yagi wrote: snip I understand mkinitrd would not honor the options if the system sees certain hardware. from where do you get this? to my knowledge, i have in/on/around this system box to give any indication of raid. -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On 30 August 2010 12:45, g gel...@bellsouth.net wrote: running sl 5.4. i have never used raid drives and i am not using raid, so i want to stop dm-* modules and associated files from loading at boot. I would suggest that you consider using the boot line parameter nodmraid. To see what that parameter does, check the /etc/rc.d/rc.sysinit file and look at the block of code that begins with the test: if ! strstr $cmdline nodmraid [ -x /sbin/dmraid.static ]; then Alan.
Re: stopping dm-* modules and associated files from loading at boot
On 30 August 2010 18:12, Alan Bartlett a...@elrepo.org wrote: On 30 August 2010 12:45, g gel...@bellsouth.net wrote: running sl 5.4. i have never used raid drives and i am not using raid, so i want to stop dm-* modules and associated files from loading at boot. I would suggest that you consider using the boot line parameter nodmraid. To see what that parameter does, check the /etc/rc.d/rc.sysinit file and look at the block of code that begins with the test: if ! strstr $cmdline nodmraid [ -x /sbin/dmraid.static ]; then Also, I forgot to mention creating a noraid file in your /etc/sysconfig/mkinitrd/ directory with one line that reads: DMRAID=no Alan.
Re: stopping dm-* modules and associated files from loading at boot
alan, i thank you for your help. easy first: On 08/30/2010 06:00 PM, Alan Bartlett wrote: snip Also, I forgot to mention creating a noraid file in your /etc/sysconfig/mkinitrd/ directory with one line that reads: DMRAID=no created, raid loads. On 08/30/2010 05:12 PM, Alan Bartlett wrote: snip I would suggest that you consider using the boot line parameter nodmraid. did, raid loads. To see what that parameter does, check the /etc/rc.d/rc.sysinit file and look at the block of code that begins with the test: if ! strstr $cmdline nodmraid [ -x /sbin/dmraid.static ]; then commented out all of if to fi. raid loads. commented out all of; # RAID setup raid loads. also in; /etc/rc/d/init.d/functions commented out all of; resolve_dm_name() { to } raid loads. [i really did not think it would help, bwth.] so, to see what is loading modules, i have renamed; /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/md/ to /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/00.md/ this should/may/i hope, give an error message during boot. -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On 31 August 2010 01:37, g gel...@bellsouth.net wrote: easy first: On 08/30/2010 06:00 PM, Alan Bartlett wrote: snip Also, I forgot to mention creating a noraid file in your /etc/sysconfig/mkinitrd/ directory with one line that reads: DMRAID=no created, raid loads. Did you recreate the relevant initrd for the kernel? On 08/30/2010 05:12 PM, Alan Bartlett wrote: snip I would suggest that you consider using the boot line parameter nodmraid. did, raid loads. Ah, I've just noticed something. Initially your were referring to dmraid -- the device mapper RAID. Latterly you have been referring to the md RAID -- as in mdadm. They are two separate RAID entities. What I have shown you is how to configure the mkinitrd utility so that it creates an initrd without dmraid support and also how to ensure that the system comes up without referencing any dmraid (the nodmraid boot parameter). There is also another boot parameter that is closely linked to dmraid and that is nomapth. You will find that in the immediate block of conditional code prior to the one where you found the reference to nomdraid. Go back about half a screen in the /etc/rc.d/rc.sysinit file and you will find the section of code where any mdraid is started: [quote] # RAID setup update_boot_stage RCraid [ -x /sbin/nash ] echo raidautorun /dev/md0 | nash --quiet 2/dev/null if [ -f /etc/mdadm.conf ]; then /sbin/mdadm -A -s fi [/quote] This suggests to me that you should ensure there isn't a mdadm.conf file in your /etc/ directory . . . Perhaps that will help? Alan.
Re: stopping dm-* modules and associated files from loading at boot
On 08/31/2010 12:37 AM, g wrote: snip so, to see what is loading modules, i have renamed; /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/md/ to /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/00.md/ this should/may/i hope, give an error message during boot. why me Lord? why not g? thank you Lord. just thought i would ask. anytime g. in other words, no error messages, dm modules still loaded. any more suggestions? -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On 08/31/2010 01:24 AM, Alan Bartlett wrote: snip Did you recreate the relevant initrd for the kernel? no. you did no mention, and i did not think of it. [see bellow] snip Ah, I've just noticed something. Initially your were referring to dmraid -- the device mapper RAID. Latterly you have been referring to the md RAID -- as in mdadm. They are two separate RAID entities. md is from the path; /lib/modules/2.6.18-164.11.1.el5/kernel/drivers/md/ where the 'dm-*' modules that load are. modules loaded, in order, short form. i did not write down version numbers or full of 'device-mapper' messages; dm-mem dm-mod device-mapper device-mapper dm-log dm-reg dm-messages dm-raid device-mapper i can reboot and get full if you need. snip Go back about half a screen in the /etc/rc.d/rc.sysinit file and you will find the section of code where any mdraid is started: [quote] # RAID setup update_boot_stage RCraid [ -x /sbin/nash ] echo raidautorun /dev/md0 | nash --quiet 2/dev/null if [ -f /etc/mdadm.conf ]; then /sbin/mdadm -A -s fi [/quote] yes. when i had /etc/rc.d/rc.sysinit open to comment out what i wrote in other post, i did a 'find' to see where else had word 'raid'. i commented this out because i ran 'man mdadm' and did not believe that mdadm was active because there is no /etc/mdadm.conf along with fact that i commented out all of # RAID setup to help insure that nothing raid related was in file. in other words, *all* that relates to 'raid' is commented out. only thing i have not done is run 'mkinitrd'. so, should i run 'mkinitrd' or not? This suggests to me that you should ensure there isn't a mdadm.conf file in your /etc/ directory . . . # locate mdadm.conf /usr/share/doc/mdadm-2.6.9/mdadm.conf-example /usr/share/man/man5/mdadm.conf.5.gz # -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On 31 August 2010 03:18, g gel...@bellsouth.net wrote: big snip in other words, *all* that relates to 'raid' is commented out. only thing i have not done is run 'mkinitrd'. so, should i run 'mkinitrd' or not? As a scientist, I would perform the experiment but now, I suspect, it will not make any difference. :-/ I right out of ideas. Perhaps someone else may have a suggestion? Alan.
Re: stopping dm-* modules and associated files from loading at boot
On 08/31/2010 03:01 AM, Alan Bartlett wrote: snip As a scientist, I would perform the experiment but now, I suspect, it will not make any difference. :-/ i am not a scientist, but i do know how to 'swag'. ;) will give mkinitrd a run tomorrow. I right out of ideas. Perhaps someone else may have a suggestion? i do appreciate your help. you had me going in a good direction, but dm-* modules just do not want to go along 'with the program'. i do hope someone has an answer. i wanted to do an upgrade, but i wanted to get ride of raid first. there has to be a way. thanks again. -- peace out. tc,hago. g . in a free world without fences, who needs gates. ** help microsoft stamp out piracy - give linux to a friend today. ** to mess up a linux box, you need to work at it. to mess up an ms windows box, you just need to *look* at it. ** learn linux: 'Rute User's Tutorial and Exposition' http://rute.2038bug.com/index.html 'The Linux Documentation Project' http://www.tldp.org/ 'LDP HOWTO-index' http://www.tldp.org/HOWTO/HOWTO-INDEX/index.html 'HowtoForge' http://howtoforge.com/ signature.asc Description: OpenPGP digital signature
Re: stopping dm-* modules and associated files from loading at boot
On 8/30/2010 11:14 PM, g wrote: On 08/31/2010 03:01 AM, Alan Bartlett wrote: snip As a scientist, I would perform the experiment but now, I suspect, it will not make any difference. :-/ i am not a scientist, but i do know how to 'swag'. ;) will give mkinitrd a run tomorrow. I right out of ideas. Perhaps someone else may have a suggestion? i do appreciate your help. you had me going in a good direction, but dm-* modules just do not want to go along 'with the program'. i do hope someone has an answer. i wanted to do an upgrade, but i wanted to get ride of raid first. there has to be a way. thanks again. Some suggestions. First, I think that renaming the dm directory won't do what you want because a modprobe -a will rebuild the dependencies with the new directory names. That's just a theory of mine that's unproven. To defeat this, you would need to move that directory completely out /lib/modules tree. However, I would make sure you have a backup kernel configured that you can boot from if this crashes your startup. A less drastic measure to try would be to make a /etc/modprobe.conf file with something like this alias modulename off Or blacklist modulename see http://wiki.xdroop.com/space/RedHat/Prevent+Module+Loading for the reference of this solution. I would think that a raid setup would need to put this stuff on the initial ram disk in case raid is needed to access the boot/root partitions. So a mkinitrd would probably need to be done after making /etc/modprobe.conf. Regards, Chris