LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-11-2008, 08:15 PM   #1
dougkdp76
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
mount -o loop command failing in startup script for RH 5


Hi,

I'm automating some testing which requires me to mount an internal ISO image and run a script. I've written a startup script which mounts the ISO image and runs the script during boot. The issue i'm having is RHEL 5 will not mount the local iso image, it returns permission denied. Using the exact same startup script, the mount command is successful in RHEL 4U6. Also, if I run the script at the OS level for RH5 it mounts fine.

I did have issue's in the PXE post install script for RHEL 5 mounting an NFS share where I had to add the "-o nolock". RH5 isn't making it easy on me Below is the mount command that returns permission denied in the startup script:

mkdir /root/foo
chmod 777 /root/foo
mount -o loop tools.iso /root/foo

Thanks in advance,

Doug
 
Old 01-11-2008, 10:51 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
What is the filesystem you are trying to mount. Your mount command doesn't include it. Also, do you have permission to read the iso file? If you can't read it you can't mount it. Also, make sure that you have access to the loop device. Do you have more than 1 loop device? You might try the option "loop=/dev/loop1" or "loop=/dev/loop2" for example.
 
Old 01-12-2008, 01:31 AM   #3
dougkdp76
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Original Poster
Rep: Reputation: 0
The fact the startup scirpt runs on RHL4, and runs at the OS level of RHEL5 would tell me the permissions/commands are correct? Something changed in the RH5 distro, i'll have to run some more tests monday.
 
Old 01-12-2008, 12:04 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Could the script be running before more loop devices are created or the only one created is for initrd?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to loop over text file lines within bash script for loop? johnpaulodonnell Linux - Newbie 9 07-28-2015 04:49 PM
Startup script failing at bootup, works when logged on cmowl Linux - Enterprise 1 10-20-2005 11:22 PM
how to implement an endless loop in a rc startup script garba Linux - General 6 05-03-2005 12:30 PM
Startup script to mount windows shares? Higs Linux - Networking 1 05-30-2004 10:28 AM
execute mount (or any) command on startup frieza Linux - Software 3 04-29-2003 07:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration