LinuxQuestions.org
Review your favorite Linux distribution.
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
 
LinkBack Search this Thread
Old 06-25-2004, 03:48 PM   #1
crc294
LQ Newbie
 
Registered: Mar 2003
Posts: 4

Rep: Reputation: 0
Question Segmentation fault when mounting from a bash script


Hi all, I am running RedHat 9.0 and I'm trying to mount a usb storage device (actually an external hard drive) using a shell script. I use this command to mount from bash shell:

mount -t ext3 /dev/sdc mnt/backup

This command works perfectly as is should; the drive is mounted at /mnt/backup and I can read/write files fine. However, I have a bash script that I want to run to automate this, and when I run it, it pauses for a bit then comes back with "Segmentation fault". I execute the exact same command that I do from the command line. Other commands that are executed in the script work fine, such as a cd and a case switch block. Any ideas as to what could be wrong?

Thanks.
 
Old 06-25-2004, 03:57 PM   #2
crc294
LQ Newbie
 
Registered: Mar 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Solved my own problem --
I was calling the function that calls the mount "mount." LOL

No wonder it wasn't working.
 
Old 06-25-2004, 03:59 PM   #3
veritas
Member
 
Registered: Aug 2003
Location: Dallas,TX
Distribution: Ubuntu Server, Slackware, Red Hat 6.1
Posts: 241

Rep: Reputation: 30
Looks like you're missing a slash, unless you're issuing this command from the / directory, it probably won't know where 'mnt/backup' is

mount -t ext3 /dev/sdc mnt/backup

Should be

mount -t ext3 /dev/sdc /mnt/backup
 
Old 06-25-2004, 04:00 PM   #4
veritas
Member
 
Registered: Aug 2003
Location: Dallas,TX
Distribution: Ubuntu Server, Slackware, Red Hat 6.1
Posts: 241

Rep: Reputation: 30
Ah, good to see you fixed it
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika Suse/Novell 2 12-02-2005 09:34 AM
segmentation fault itywygms Linux - Newbie 10 09-19-2004 08:25 PM
Segmentation fault.... lokizen Linux - Newbie 7 09-14-2004 12:40 AM
segmentation fault in c++ drigz Programming 10 06-16-2004 03:06 PM
Executing chat script aolnet.scm Segmentation fault degraffenried13 Linux - Software 0 11-16-2003 08:05 PM


All times are GMT -5. The time now is 06:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration