LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Blacklisting hardware?? (http://www.linuxquestions.org/questions/slackware-14/blacklisting-hardware-279977/)

Jeebizz 01-19-2005 11:39 PM

Blacklisting hardware??
 
I have a Canon MP700 Printer , and it is not supported under linux, and until recently I have discovered that it is whats causing me trouble when I am trying to reinstall lilo after a kernel recompile, and so the only way around that I know of is to shut it off before going into linux, of course, thats annoying, so I need to know two things. Under linux how do i tell what port my printer is detected under (it is conntect to a usb2.0 pci card on my pc) , and how do I blacklist it, so that linux doesn't even recognize that there is a printer hooked up.

If you wanted know exactly why it is giving me trouble, it is because this multifunction printer has card slots, and so under linux it shows up as /sda , and when I try to run /sbin/lilo when my printer is on I get an error stating that it was unable to update /dev/sda, and i don't even know why the hell it is even trying to mess with /dev/sda when i don't have any scsi hard drives, only ide.

cythrawll 01-20-2005 12:30 AM

I know you can blacklist modules with hotplug in /etc/hotplug/blacklist. and I believe /dev/sda is used for usb storage as well as scsi. I really don't understand what your problem is. when exactly does it give the error? when the system is booting? before you see the penguin? (which is lilo). or maybe doing a hotplug scan? is sda being mounted in /etc/fstab or /etc/mtab??

scuzzman 01-20-2005 12:30 AM

It reads the card slots as mountable drives. Because they're USB, it names them like SCSI drives.

Jeebizz 01-20-2005 12:35 AM

I can boot just fine, the only time I get an error is when i try to update lilo , the error is like 'cannot write to /sda , read-only' and there is nothing in my fstab that indicates I have /sda mounted

Jeebizz 01-20-2005 12:46 AM

ok this is what is mounted so far when I start up normally

Code:

root@hideyoshi:/home/samurai# mount
/dev/hda2 on / type reiserfs (rw)
proc on /proc type proc (rw)
/dev/hda1 on /ntfs-c type ntfs (ro,noexec,nosuid,nodev,umask=0000)
/dev/hda4 on /fat32-d type vfat (rw,noexec,nosuid,nodev,umask=0000)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
root@hideyoshi:/home/samurai#

and this is what happens when I run lilo when the printer is on

Code:

root@hideyoshi:/home/samurai# lilo -v
LILO version 22.5.9, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 08-Apr-2004 and compiled at 00:18:50 on May 21 2004.

Warning: LBA32 addressing assumed
Reading boot sector from /dev/hda2
Fatal: open /dev/sda: Read-only file system
root@hideyoshi:/home/samurai#

and this is what happens when it is off...

Code:

root@hideyoshi:/home/samurai# lilo -v
LILO version 22.5.9, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 08-Apr-2004 and compiled at 00:18:50 on May 21 2004.

Warning: LBA32 addressing assumed
Reading boot sector from /dev/hda2
Warning: Partition 2 on /dev/hda is not marked Active.
Using MENU secondary loader
Calling map_insert_data

Boot image: /boot/vmlinuz -> vmlinuz-ide-2.4.26
Added Linux2.4.26 *

Writing boot sector.
/boot/boot.0302 exists - no boot sector backup copy made.
root@hideyoshi:/home/samurai#

and as for the warning about Partition 2 not being marked as active, thats cause partition 2 is my reiserfs partition, and for some reason I can't install lilo on the mbr, so lilo resides on root of reiserfs, and ntfs obviously marked as active, since i use win2kpro and i use NTLDR to invoke either windows or linux

cythrawll 01-20-2005 01:00 AM

what does lilo.conf look like, im curious?

Jeebizz 01-20-2005 01:07 AM

Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda2
#compact        # faster, but won't work on all systems.
#prompt
#timeout = 5
# VESA framebuffer console @ 800x600x64k
vga = 788
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0    # paranoia setting
# End LILO global section
# Linux bootable partition config begins
#image = /boot/vmlinuz
#  root = /dev/hda2
#  label = Linux2.4.26
#  read-only
image = /boot/vmlinuz
  root = /dev/hda2
  label = Linux2.4.26
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
#image = /boot/vmlinuz
#  root = /dev/hda2
#  label = Linux2.6.10
#  read-only
# Linux bootable partition config ends

in case you are wondering why i have the last part commented out, it is because I am still not quite ready to install the new kernel yet, i still have some more settings to adjust, so this is more of a test.

Jeebizz 01-20-2005 01:13 AM

Oh, I found out where my printer is connected, lsusb (duh jeebizz!!!)

Code:

oot@hideyoshi:/usr/src/linux# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 005 Device 002: ID 045e:0029 Microsoft Corp. IntelliMouse Optical
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 003 Device 002: ID 04a9:2630 Canon, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

so isn't there any way i can get linux to just ignore whats on Bus 003??

cythrawll 01-20-2005 01:23 AM

what if you tried booting up to 2.6 really quick? i know for a fact that the newer kernel often fixes problems with usb, because of better usb support :)

Jeebizz 01-20-2005 01:27 AM

hmm, thats an idea, but how am I supposed to do that, if i can't get /sbin/lilo to update the boot record in the first place? :-P

cythrawll 01-20-2005 01:33 AM

well why don't you unplug the printer? :p just for the second it takes to update lilo.

eelriver 01-20-2005 01:59 AM

Yeah, unplugging the printer is probably the easiest thing to do. I was going nuts one day trying to reload lilo after a kernel update. The damn thing just worked minutes ago...!
Then I googled and found out lilo has problems reloading when there's a usb-storage device attached. Doohh, reach around the back of the laptop, unplug the flashdrive and I was in business.


All times are GMT -5. The time now is 06:51 PM.