Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mount a local directory

Status
Not open for further replies.

bearvalley

Programmer
Jan 31, 2006
151
0
0
GB
Hi,

I have a Centos server and I need to upgrade an application remotely with just SSH access, when upgrading, the application wants the new media/software to be on a removable device i.e. CD/DVD or USB.

As I am not local to the server I can't plug in a USB stick, so is there anyway I can spoof a folder to mount as removable storage or the like?

Waiting in anticipation.........
 
Haven't done this in awhile, but if you have the CD/DVD image;

1. Create a directory ex) /appinst
2. Mount the CD drive as follows;
mount -t iso9660 -ro /dev/cdrom /appinst
3. If you cd /appinst, the contents of the cd should be there.
 
Do you have (remote) console access? if so, check to see if it supports virtual media. I use that option to "map" an ISO to the cd/dvd device when I need to boot from an ISO when the server is a few thousand miles away and no local hands are available.

Alternatively, you could do this:

Copy your update files to /some/location
Then mount /some/location via bind: mount --bind /some/location /cdrom
And when you are done: umount /cdrom

it is somewhat odd, though, that the update requires it to be removable media.
 
Thanks for the expert advise, but the trap I fall into now is the server does not have a CD drive!

Think a site visit is going to be required.

(This is a custom build of centos hence the requirement of physical media, darn)

 
Do you have an ISO image instead? Copy the ISO image to the remote server and perform a mount loop (google the syntax). This will load the ISO image for you in the new directory
 
thanks again, I tried the loop but broke the server! Had to go to site and run fsck to get it back.

Looks like site visits with USB media is the only way to go
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top