LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-13-2012, 05:41 AM   #1
naveenscs
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Rep: Reputation: Disabled
Reg. Disabling the Serial ports in RHEL


Hi All,

I need a mechanism to disable the serial ports.
i have already tried setserial command, but it always throws the below
error:
setserial /dev/ttyS0 uart none port 0x0 irq 0
Cannot set serial info: Device or resource busy

Can i get to know different ways of disabling the serial port in RHEL
 
Old 01-13-2012, 05:46 AM   #2
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
Its easier to disable the ports in the BIOS than from software IMO.
 
Old 01-13-2012, 05:48 AM   #3
naveenscs
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
sorry for not being descriptive, i have to do it from the application and also i want it to be done using linux utilities which
are already present.
 
Old 01-13-2012, 09:00 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by naveenscs View Post
Hi All,
I need a mechanism to disable the serial ports. i have already tried setserial command, but it always throws the below
error:
setserial /dev/ttyS0 uart none port 0x0 irq 0
Cannot set serial info: Device or resource busy

Can i get to know different ways of disabling the serial port in RHEL
Are you running that command as root, because if you're not, it won't work. If you are running it as root, then something else is using that port, and has it locked. Find that process and kill it.
 
1 members found this post helpful.
Old 01-15-2012, 10:32 PM   #5
naveenscs
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Is there any other to disable the serial port(ex: grub...)?
 
Old 01-15-2012, 11:16 PM   #6
naveenscs
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
I tried it as root user only, but disable is not happening.

is it possible to disable it from grub or is there any way to disbale the interrupt lines of the serial port itself.
 
Old 01-16-2012, 10:46 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by naveenscs View Post
I tried it as root user only, but disable is not happening.

is it possible to disable it from grub or is there any way to disbale the interrupt lines of the serial port itself.
Grub is the bootloader, so no, you can't do it through grub.

Again, if you have a process running, you will have to kill that process first, before disabling the port. As I said, find that process, and kill it. Check your /etc/inittab for anything that references the serial port(s) you're interested in. You could also blacklist the serial port modules in /etc/modules.conf, so they won't be loaded at system boot time, and reload them manually if they're needed later. You can also (the best method) disable them in BIOS.

Since you're using RHEL, though, you are paying for RHEL support, right?? Why don't you call them, and they can help you?
 
Old 01-16-2012, 11:09 PM   #8
naveenscs
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks for the reply.

I have a doubt, will it not affect any other process/module(ex: PPP, SLIP) if i blacklist/unload the serial module.
 
Old 01-17-2012, 09:16 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,553

Rep: Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946Reputation: 7946
Quote:
Originally Posted by naveenscs View Post
Thanks for the reply.
I have a doubt, will it not affect any other process/module(ex: PPP, SLIP) if i blacklist/unload the serial module.
The word "doubt" and the word "question" mean different things.

And it will only affect something if it tries to USE the serial port. But your question is kind of pointless, since your originally stated goal is to DISABLE the serial ports anyway. If they're disabled, that will also cause any programs that try to access them problems, just as effectively as if you unloaded the serial modules.

AGAIN...you're using RHEL, so you're paying for RHEL support, right?? What you're paying for is support...have you called RHEL yet?
 
Old 01-17-2012, 03:10 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,937

Rep: Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619Reputation: 3619
Delete the /dev files for it.

But, RH does charge and you should contact them.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reg: LOOP BACK SETTINGS OF SERIAL PORT shankar.489 Linux - Newbie 1 08-19-2011 10:19 AM
Serial ports, USB-Serial adapters, and Linux Daravon Linux - Newbie 3 09-09-2010 06:53 AM
reg: c compiler for rhel 4.0 lx4all Linux - Newbie 2 01-21-2009 04:19 AM
disabling serial ports on RHEL3 update 3 hodgsonjk Linux - Enterprise 3 04-15-2005 06:21 AM
A few commnds i need to know (disabling a few ports) Optyx Slackware 6 01-24-2004 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration