WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: trying to maintain changes to modprobe.conf after reboot  (Read 6584 times)

Offline med458

  • Newbie
  • *
  • Posts: 22
trying to maintain changes to modprobe.conf after reboot
« on: February 06, 2013, 03:21:54 AM »
Hello my friends.  Please help me.

I am trying to blacklist a driver, by adding "blacklist smsc75xx" to modprobe.conf.  I found that the change would not remain after a reboot.
Searching these forums, I found that I must create a tcz extension that performs this task.  This is my first extension, I am not an expert at this.
In /home/tc, I created a directory "blacklist".  In this directory, I "mkdir etc", "cp /etc/modprobe.conf etc", and added "blacklist smsc75xx" to the modprobe.conf file.
I then "tce-load -i tcztools.tcz", and "tce-pack blacklist".  This returns:

Packing blacklist from ./blacklist into /tmp/tcztools/blacklist...
Exit: Count not find tce directory

In /tmp/tcztools/blacklist, I find a blacklist.tcz, blacklist.tcz.list, blacklist.tcz.md5.txt, and a ./blacklist directory like the one I created in the /home/tc directory.
I copied all to /mnt/sda1/tce/optional.  I added "blacklist.tcz" to /mnt/sda1/tce/onboot.lst

However, when I reboot, /etc/modprobe.conf remains empty without my blacklist edit.
Would someone please tell me what I am doing wrong?  Thank you!



Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: trying to maintain changes to modprobe.conf after reboot
« Reply #1 on: February 06, 2013, 04:05:19 AM »
- for saving files, you usually use backup instead of custom extensions
- in your specific case (blacklisting), neither of these will work, since they are loaded after udev. Use the blacklist bootcode instead.
The only barriers that can stop you are the ones you create yourself.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: trying to maintain changes to modprobe.conf after reboot
« Reply #2 on: February 06, 2013, 08:50:33 PM »
thank you for helping me curaga, i will certainly give this a try.
there is a different old thread that suggests making an extension to acheive this goal.  I replied to that thread, directing readers here.

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: trying to maintain changes to modprobe.conf after reboot
« Reply #3 on: February 07, 2013, 03:10:03 AM »
Outdated information there I'm afraid.
The only barriers that can stop you are the ones you create yourself.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: trying to maintain changes to modprobe.conf after reboot
« Reply #4 on: February 08, 2013, 03:46:49 AM »
Curaga:

Thank you for recommending I use a bootcode to blacklist.

However, I am having a hard time blacklisting the driver using the bootcode.  I added "blacklist=smsc75xx" to the APPEND line of extlinux.conf.  However, upon reboot, the screen shows: "Missing parameter in configuration file, keyword: "blacklist=smsc75xx" and lsmod shows that the driver gets loaded by usbcore when I plug the device in. I am unfamiliar with this "missing parameter" error and do not know how to correct my addition to extlinux.conf.  I was wondering if you had any ideas about the proper way to blacklist the driver using extlinux.conf.

I found the driver in question at /lib/modules/3.0.21-tinycore/kernel/drivers/net/usb/smsc75xx.ko.gz.  As an alternative to blacklisting the driver, I attempted to delete the driver and also tried to overwrite the driver, but the original driver is restored to that directory upon reboot.

I read a faq that suggested pressing F3 or F4 to invoke bootcodes.  However, I installed TC to harddisk so I could make customizations permanent and enjoy fast boots without entering bootcodes each time.  Thus, if you had any additional advice for me, I would be grateful to hear it.  I would be very happy if I could do any of the following: 1) make a permanent edit to blacklist.conf; 2) overwrite the smsc75xx driver in a permanent fashion; 3) blacklist the driver permanently without having to press the F key each time I reboot.  Please let me know if you have suggestions my friend.
Thank you!

« Last Edit: February 08, 2013, 02:29:18 PM by med458 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: trying to maintain changes to modprobe.conf after reboot
« Reply #5 on: February 08, 2013, 09:18:39 PM »
I found the driver in question at /lib/modules/3.0.21-tinycore/kernel/drivers/net/usb/smsc75xx.ko.gz.  As an alternative to blacklisting the driver, I attempted to delete the driver and also tried to overwrite the driver, but the original driver is restored to that directory upon reboot.
You'd have to delete it in the initrd.
As a quick and dirty method you could make a cpio archive containing only a zero byte file with same path and have extlinux load it after core.gz
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: trying to maintain changes to modprobe.conf after reboot
« Reply #6 on: February 09, 2013, 10:33:14 AM »
Maybe post your edited extlinux.conf. Likely some syntax error.
The only barriers that can stop you are the ones you create yourself.

Offline med458

  • Newbie
  • *
  • Posts: 22
Re: trying to maintain changes to modprobe.conf after reboot
« Reply #7 on: February 09, 2013, 05:40:47 PM »
Thank you again for taking the time to assist me, my friends.
As it turns out, it was a syntax error.  I was blindly following the examples on this webpage regarding blacklisting: http://tinycorelinux.net/faq.html
However, after reading the above 2 posts, I decided to look at other bootcodes after the APPEND line in the extlinux.conf file.  I noticed all bootcodes included quotes after the "=".
In following the examples in the faq, I failed to include quotes around the module name.  However, after reviewing the extlinux.conf file, I changed blacklist=smsc75xx (with no quotes) to blacklist="smsc75xx" (with quotes around the module name, and everything worked perfectly.
Thanks again my friends!!  Have a nice weekend!
« Last Edit: February 09, 2013, 05:43:52 PM by med458 »