Operating System - Linux
1828667 Members
2183 Online
109984 Solutions
New Discussion

Disable usb & check hard disk size

 
SOLVED
Go to solution
mjsunil
Advisor

Disable usb & check hard disk size

Hi,
I need to disable USB device in redhat linux and also check the hard disk size

rgds-mjs
5 REPLIES 5
Roberto Polli
Trusted Contributor
Solution

Re: Disable usb & check hard disk size

to disable USB you have to
1) disable kudzu for automatic detection
2) edit modules.conf and remove usb-related lines, so linux kernel won't load the usb modules.
3) to check hd size: cat /proc/partitions
or search in this forum. Already been answered.

Peace, R.
Mark Grant
Honored Contributor

Re: Disable usb & check hard disk size

Disabling USB isn't actually possible except for the obvious case where you compile it out of the kernel. However, if your usb support is via modules (which I doubt) you could unload the modules with "rmmod".

THe size of the disk is given somewhere in the output of "dmesg". If you have an ide disk, you can also get the size with "cat /proc/ide/hdX/capacity" where "X" is replaced with the letter the for the drive you wish to query.
Never preceed any demonstration with anything more predictive than "watch this"
Stuart Browne
Honored Contributor

Re: Disable usb & check hard disk size

Isn't there a boot-string called 'nousb'?

On RH boxes, this forces the 'rc.sysinit' not to install drivers etc..
One long-haired git at your service...
James Saffer_1
New Member

Re: Disable usb & check hard disk size

Disabling USB on servers is always a good idea, but with RH Advanced Server 3 I've had problems with the USB modules, causing kernel panics in slab.c if someone cat's the wrong file in /proc

The best way I've found to disable USB, is to alias them off in /etc/modules.conf and depmod, or reboot.

In modules.conf remove / comment out current USB lines.
add (I can't remember if all three are needed, but they don't hurt)
alias usb-controller off
alias usb-ohci off
alias usbcore off

verify with a lsmod on reboot, you shouldn't see any usb modules, no manipulation of kudzu required.
Sajeesh O.K
Advisor

Re: Disable usb & check hard disk size

Hi

cat the file /proc/driver/cciss/cciss0 file to find out the Hard Disk Size

Regards
Sajeesh