LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-24-2006, 05:20 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
how to mount usb floppy drive automatically


Hi guys,

I have a usb floopy drive attached to my Debain (stable) system(base install). Whenever I have to mount my USB floppy drive I have to give the command

#mount /dev/sda

and the floppy drive mounts at /media/usb0 fine, since my fstab contains the following line as shown below
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hdb        /media/cdrom0   iso9660 ro,user,auto    0       0
/dev/sda	/media/usb0	vfat	rw,user,auto	1	2
How can I achieve this automatically i.e. whenever I log in as the user(regular/root) my usb floppy drive should get mounted automatically.

Bascially, auto executing the command
#/dev/sda


thanks
 
Old 01-24-2006, 05:26 PM   #2
mushroomboy
Member
 
Registered: Jan 2006
Distribution: Debian Testing ALWAYS!!!
Posts: 363

Rep: Reputation: 43
With newer kenrel and udev systems it should automatically load it if you have the right modules loaded into the kernel. Though I'm not sure, you could run a script during your startup of your xsession. That would essentially do it.
 
Old 01-24-2006, 05:32 PM   #3
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by mushroomboy
With newer kenrel and udev systems it should automatically load it if you have the right modules loaded into the kernel. Though I'm not sure, you could run a script during your startup of your xsession. That would essentially do it.
I am not using GNOME/KDE or any graphical environment so I do not have the xsession file. Also the module usb-storage is properly loaded.
 
Old 01-24-2006, 06:02 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by kushalkoolwal
I am not using GNOME/KDE or any graphical environment so I do not have the xsession file. Also the module usb-storage is properly loaded.
Code:
cd ; echo mount /dev/sda >> .bash_profile
In other words, add "mount /dev/sda" to .bash_profile.
 
Old 01-24-2006, 06:30 PM   #5
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by Matir
Code:
cd ; echo mount /dev/sda >> .bash_profile
In other words, add "mount /dev/sda" to .bash_profile.

Thnaks Matir for the tip. Also, in continuation of this topic, I would like to ask one more question.

often I need to give the command
#dhclient eth0

to get the IP address from the DHCP server to connect to internet. can you tell me where I can put this command during the boot up process so that I don;t have to give it manually. Is there anything like autoexec.bat in Debian Linux. If there is, can anyone point out a proper resource, where I can read it in detail.

Thanks
 
Old 01-24-2006, 06:54 PM   #6
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 126Reputation: 126
Yes, it would be in /etc/rc.d/ on Debian.
 
Old 01-24-2006, 07:09 PM   #7
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by Matir
Yes, it would be in /etc/rc.d/ on Debian.
There is not /etc/rc.d/ directory, but there are /etc/rc.S,1,2,3,4,5,6/ directory? I n those directory, in which file should I put it.

Thanks for your help once again.

Last edited by kushalkoolwal; 01-24-2006 at 07:30 PM.
 
Old 01-24-2006, 09:18 PM   #8
LeftyAce
Member
 
Registered: Oct 2005
Distribution: Debian
Posts: 69

Rep: Reputation: 15
the numbers refer to the various runlevels (single user, reboot, shutdown, multiuser, etc) The runlevel for a standard graphical login is runlevel 5.
 
  


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
My cd drive doesn't mount automatically in Slack thorney Linux - Newbie 3 08-03-2005 08:14 PM
Can't mount floppy drive crudux_cruo Linux - Laptop and Netbook 1 11-25-2003 04:40 AM
mount usb module then mount usb hard drive guanyu Linux - Hardware 1 10-08-2003 12:50 PM
My floppy drive is not mount. m_pahlevanzadeh Linux - Hardware 2 06-20-2003 10:30 AM
Can not mount my floppy drive. drfeelgood Linux - Newbie 4 10-22-2001 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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