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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-26-2004, 12:41 PM
|
#1
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Rep:
|
auto mount a network drive at boot
I have a linux box connetted t oa few other computers...and i dont have the space to store all the music they share. so i have to mount the drives they have shared in order to play em...its get annoying haing to do this after each reboot.
from what i have read i need to edit fstab in /etc
so i open that file up. but im not sure what i sould type
fstab looks like this:
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdc2 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
so at everyboot up i open up a terminal and enter this:
smbmount //gtp/Music /root/.gnome-desktop/Music
anyway i can have this happen on its own?
|
|
|
10-26-2004, 12:55 PM
|
#2
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Original Poster
Rep:
|
/root/.gnome-desktop/Music //gtp/Music smb defaults 0 0
this is the line i added....will this work? i totally pulled this outta the air...
|
|
|
10-26-2004, 01:06 PM
|
#3
|
Senior Member
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029
Rep:
|
I have:
\\server\share /mnt/point smbfs password=pass,username=user,noauto 0 0
Depending on your distro, for example in Slackware, there is a file called rc.local, in there i just have:
mount /mnt/point
as listed above and it works.
The rc.local file is the last script to run on a slackware boot up before login.
|
|
|
10-26-2004, 01:13 PM
|
#4
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Original Poster
Rep:
|
i have a distro just like RH...ne idea?
|
|
|
10-26-2004, 01:33 PM
|
#5
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Original Poster
Rep:
|
ok here is me restating it....
basically i have a clone of RH.
I have a folder on my desktop i have linked to a windows machine that has mp3s on it.
so i do this everytime i start up this linux box:
smbmount //windows/music /desktop/folder
password:
done
and then i can play that music.
how can i edit my /etc/fstab file so i dont need to do the above whenever i boot up. like have it to it on its own at startup?
|
|
|
10-26-2004, 02:09 PM
|
#6
|
Senior Member
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029
Rep:
|
did you search for a file called rc.local?
|
|
|
10-26-2004, 02:22 PM
|
#7
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Original Poster
Rep:
|
yeah its in /etc what do i do with it?
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
mount //gtp/Music <<<<line i added
is that it?
Last edited by Dr Gutiemouth; 10-26-2004 at 02:26 PM.
|
|
|
10-26-2004, 02:27 PM
|
#8
|
Senior Member
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029
Rep:
|
post your fstab and then i can tell you what to put in it
|
|
|
10-26-2004, 02:28 PM
|
#9
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Original Poster
Rep:
|
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdc2 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
|
|
|
10-26-2004, 02:37 PM
|
#10
|
Senior Member
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029
Rep:
|
add this to your fstab:
\\server\share /mnt/point smbfs password=pass,username=user,noauto 0 0
\\server\share = windows machine info
/mnt/point = location on linux machine to mount to
user= windows user
pass=windows user password
once that is in fstab, then you can add:
mount /mnt/point
to your rc.local file.
|
|
|
10-26-2004, 02:50 PM
|
#11
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Original Poster
Rep:
|
thanks for your help but it didnt work....
...i'll come back to this later, i need to goto work now...
thanks again....
after work i'll tell you what i put in, maybe i messed something up..
|
|
|
10-26-2004, 03:09 PM
|
#12
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
//windows/music /root/.gnome-desktop/Music smbfs username=<name>,password=<pass>,netdev,soft ,_intr1 0
I think this will work. Look in man mount and man fstab and man smbmount for more details and options. Mount it someplace else however, like /windows/music or /mnt/windows/music. And please don't log in as root. Su to root from inside a terminal, or even better, for one liners use sudo.
Also consider using uid=, gid=, and umask= options.
This may not be the best way to go anyway, because the userid and password are in your fstab file.
|
|
|
10-26-2004, 07:26 PM
|
#13
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Original Poster
Rep:
|
ok i did what both of you said and it didnt work. t his is how i did it
logged in as root i opend the file /etc/fstab with gedit
added in each of the lines at different times...with spaces under them
then saved it..
rebooted, logged in as root. opened the .gnomre desktop foler to see if it worked, and the music wasnt there
im streaming the files from //gtp/Music and when i use smbmount i have them goto /root/.gnome-desktop/Music
am i supposed to ad them in fstab with a terminal or something? i just edited the file with the first program that can edit it.
again...i then just saved it and rebooted.
im atotal noob. i know very very little about what im doing.
this stuff:
nd please don't log in as root. Su to root from inside a terminal, or even better, for one liners use sudo.
Also consider using uid=, gid=, and umask= options.
im sorry but this is jibberish to me! i dont know what that is...
|
|
|
02-27-2005, 06:28 AM
|
#14
|
LQ Newbie
Registered: Jun 2003
Location: Sweden
Distribution: Debian
Posts: 13
Rep:
|
try changing \\ to //
in fstab for exampel
//computer/share /mount/point smbfs username=$login,password=$pass
|
|
|
02-27-2005, 01:32 PM
|
#15
|
Member
Registered: Oct 2004
Location: ohio
Distribution: Whitebox, Gentoo, XP,
Posts: 57
Original Poster
Rep:
|
i got it to work but i dont remember how...and there was two icons on my desktop when i finally got it to work...oh well...i since nuked the drive and put gentoo on it...now if only i can get it to work
|
|
|
All times are GMT -5. The time now is 12:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|