LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2006, 08:54 AM   #1
linqz
LQ Newbie
 
Registered: May 2005
Posts: 6

Rep: Reputation: 0
Force mount, SuSe


Hi,

Dont know if the topic describes what im out to get, but almost. Anyhow, Im on Suse 10.1 and want my usb to mount when i goto one specific catalog.

Exemple:
cd /media/usbstorage
(mounting the usb-drive)
ls
(showing the files on usb-drive)

So i need to get /etc/mtab to always have '/dev/sda1 on /media/usbstorage' mounted.

I have edited /etc/fstab correctly as i want it. When i use 'mount /media/usbstorage' it mounts perfect. But i want it to mount when im doing 'cd /media/usbstorage'.

B.t.w. no graphic stuff involved, just plain console.

How can i manage this ? Grateful for all help.
 
Old 11-08-2006, 09:05 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,884

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Don't know if this will work, but you could try editing your user .bashrc (scroll down to the aliases) and add

alias cd /media/usbstorrage="mount /media/usbstorage", or
alias cd\ /media/usbstorage="mount /media/usbstorage"

note the space between \ /.

Save .bashrc, then run the command 'source ~/.baxhrc' to reload .bashrc. then try 'cd /media/usbstorage' to see what happens.
 
Old 11-08-2006, 09:25 AM   #3
linqz
LQ Newbie
 
Registered: May 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bigrigdriver
Don't know if this will work, but you could try editing your user .bashrc (scroll down to the aliases) and add

alias cd /media/usbstorrage="mount /media/usbstorage", or
alias cd\ /media/usbstorage="mount /media/usbstorage"

note the space between \ /.

Save .bashrc, then run the command 'source ~/.baxhrc' to reload .bashrc. then try 'cd /media/usbstorage' to see what happens.
Didn't work.

When i run 'source ~/.bashrc'
With alt.1 i get:
-bash: alias cd: not found
-bash: alias: 'cd /media/usbstorage':invalid alias name


With alt.2 i get:
-bash: alias: 'cd /media/usbstorage':invalid alias name

Best regards for giving me the time.

#Edit
And that solution aren't exactly what im looking for. More like auto-mounting, just like it is in the WM (Gnome/KDE). When you put in the usb it mounts it right away in /media. I want it like what but in console-mode. I have this function from a old red hat installation, but i cant find a way to sync. the settings into Suse.. Dont even know what to look for. Or, it works like this: The settings for the mounting point /media/usbstorage is all ready in /etc/mtab and wait for to be used and the 'cd /media/usbstorage' triggers it to mount, or something..

Last edited by linqz; 11-08-2006 at 02:45 PM.
 
  


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
Broadcom Air Force One not workin under suse 10 chrisshort Linux - Wireless Networking 5 02-12-2006 01:12 PM
mount:not a directory. Suse dvd mount problem tzanis Linux - General 8 11-06-2005 11:30 AM
SuSE 9.2 Pro: How to force -default install? longtex SUSE / openSUSE 5 07-23-2005 01:38 PM
auto-mount in suse milad126 SUSE / openSUSE 1 03-14-2005 04:00 AM
Suse 8.0 pcmcia mount hGuard Linux - Distributions 1 09-25-2002 12:39 PM


All times are GMT -5. The time now is 07:36 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