LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-22-2005, 03:42 AM   #1
teeno
Member
 
Registered: Jul 2001
Posts: 72

Rep: Reputation: 15
/etc/rc.sysinit: /bin/awk: Text file busy


Hi All,


My linux box is having problems booting. I get the following message twice as the system boots.

/etc/rc.sysinit: /bin/awk: Text file busy

Can anyone tell me what the problem could be. The system does boot up sometimes but I always get this error.

I am using RedHat 7.0


Thankyou for your help.

Peter
 
Old 02-22-2005, 04:06 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Read through the /etc/rc.sysinit file. Which lines use 'awk'?

Try
grep 'awk' -n /etc/rc.sysinit

The lines using awk are listed. Then check out the files that awk is changing.
 
Old 02-22-2005, 04:15 AM   #3
teeno
Member
 
Registered: Jul 2001
Posts: 72

Original Poster
Rep: Reputation: 15
Thank you for your reply. Here are the lines:


160: alias=`egrep -s "^alias[[:space:]]+usb-controller[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`

206:ROOTFSTYPE=`grep " / " /proc/mounts | awk '{ print $3 }'`

349:alias=`egrep -s "^alias[[:space:]]+sound[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`

354:alias=`egrep -s "^alias[[:space:]]+sound-slot-0[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`

359:alias=`egrep -s "^alias[[:space:]]+midi[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`

389: for i in `grep "^raiddev" /etc/raidtab | awk '{print $2}'`
 
Old 02-22-2005, 07:30 AM   #4
teeno
Member
 
Registered: Jul 2001
Posts: 72

Original Poster
Rep: Reputation: 15
Is it OK for me to comment out all these lines from my rc.sysinit?

# Initialize USB controller and HID devices
usb=0
if ! grep -iq "nousb" /proc/cmdline 2>/dev/null && ! grep -q "usb" /proc/devices 2>/dev/null ; then
alias=`egrep -s "^alias[[:space:]]+usb-controller[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
if [ -n "$alias" -a "$alias" != "off" ] ; then
action "Initializing USB controller ($alias): " modprobe $alias
[ $? -eq 0 ] && usb=1
fi
fi

if [ $usb = "1" ]; then
sleep 5
action "Mounting USB filesystem: " mount -t usbdevfs usbdevfs /proc/bus/usb
mouseoutput=`cat /proc/bus/usb/devices|grep -E "^I.*Cls=03.*Prot=02"`
kbdoutput=`cat /proc/bus/usb/devices|grep -E "^I.*Cls=03.*Prot=01"`
if [ -n "$kbdoutput" ] || [ -n "$mouseoutput" ]; then
action "Initializing USB HID interface: " modprobe hid 2> /dev/null
fi
if [ -n "$kbdoutput" ]; then
action "Initializing USB keyboard: " modprobe keybdev
fi
if [ -n "$mouseoutput" ]; then
action "Initializing USB mouse: " modprobe mousedev
fi
fi


# Load sound modules
#
# I think this now qualifies as over-engineered.
RETURN=0
alias=`egrep -s "^alias[[:space:]]+sound[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
if [ -n "$alias" -a "$alias" != "off" ] ; then
action "Loading sound module ($alias): " modprobe $alias
RETURN=$?
fi
alias=`egrep -s "^alias[[:space:]]+sound-slot-0[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
if [ -n "$alias" -a "$alias" != "off" ] ; then
action "Loading sound module ($alias): " modprobe $alias
RETURN=$?
fi
alias=`egrep -s "^alias[[:space:]]+midi[[:space:]]+" /etc/modules.conf | awk '{ print $3 }'`
if [ -n "$alias" -a "$alias" != "off" ]; then
action "Loading midi module ($alias): " modprobe $alias
fi

# Load mixer settings
if grep -q "\(sparcaudio\|sound\)" /proc/devices 2>/dev/null && [ $RETURN -eq 0 -a -f /etc/.aumixrc -a -x /bin/aumix-minimal ]; then
action "Loading mixer settings: " /bin/aumix-minimal -f /etc/.aumixrc -L
fi

if [ -f /proc/sys/kernel/modprobe ]; then
if [ -n "$USEMODULES" ]; then
sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1
else
# We used to set this to NULL, but that causes 'failed to exec' messages"
sysctl -w kernel.modprobe="/bin/true" >/dev/null 2>&1
fi
fi
 
Old 02-22-2005, 06:47 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I wouldn't recommend commenting you those lines. The 'Text file busy' probably means that another program is accessing the file. There may be several configuration programs running in parallel. Perhaps the file in question is produced by a kernel device and that device hasn't finished setting up. Because several of the lines you submitted read files under /proc, this is what makes me think this is the case. The files in /proc are not real files. They are produced by the kernel when requested. Except for an actual directory to mount /proc under, it isn't an actual file-system, but a virtual one.

Look at the line:
if [ $usb = "1" ]; then
sleep 5

If you change it to something like:
if [ $usb = "1" ]; then
sleep 10

do the "Text file busy" messages go away?

Last edited by jschiwal; 02-22-2005 at 06:51 PM.
 
Old 02-23-2005, 02:19 AM   #6
teeno
Member
 
Registered: Jul 2001
Posts: 72

Original Poster
Rep: Reputation: 15
Next time I boot the system I will see if the messages have gone. I can't reboot at the moment because it is our database server.

Thank you for your help.
 
  


Reply



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
scp text file busy error seran Linux - General 4 08-12-2021 03:36 PM
formating text thru awk slack66 Linux - Newbie 4 11-28-2005 11:20 AM
Help with a script to edit text file (awk? sed?) rickh Linux - Newbie 8 04-21-2005 08:24 PM
can i change the rc.sysinit file sibu_rajappan Programming 0 11-09-2004 04:27 AM
awk text that is on several lines homey Programming 2 10-31-2004 09:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:55 PM.

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