LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-30-2004, 10:11 AM   #1
bobbens
Member
 
Registered: Sep 2004
Location: Barcelona
Distribution: Debian, FreeBSD, Gentoo
Posts: 586

Rep: Reputation: 30
external HDD mount command


i would like to make a script to mount and unmount an external 200 GB hard driver. I have no problem mounting it as superuser with "mount -t vfat /dev/sda1 /mnt", but i can't unmount it ("umount /mnt") it just says "device is busy" twice.

So i have two questions:
1. How can i unmount the hard driver if when it's not in use it just says it's busy.
2. What mount command makes it so it mounts with read/write privilages for all?

Thanks.
 
Old 12-30-2004, 10:17 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,793

Rep: Reputation: 4248Reputation: 4248Reputation: 4248Reputation: 4248Reputation: 4248Reputation: 4248Reputation: 4248Reputation: 4248Reputation: 4248Reputation: 4248Reputation: 4248
Make sure that no application or console window is accessing the drive when trying to unmount.

For read/write if the drive is formatted FAT32 then add the option umask=000 to the fstab entry.
 
Old 12-30-2004, 10:22 AM   #3
bobbens
Member
 
Registered: Sep 2004
Location: Barcelona
Distribution: Debian, FreeBSD, Gentoo
Posts: 586

Original Poster
Rep: Reputation: 30
The things is that i don't want to use the hard drive 24/7 so i just want to be able to mount it with a script giving full read/write access. I don't want to modify the fstab because if it's off at boot time, i'll get an error.
Right now, i don't have any program actively controlling the hard drive, but could gkrellm do something to it?
Thanks.
 
Old 12-30-2004, 10:28 AM   #4
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
if you add the noauto option to the fstab entry then the OS wouldn't try to mount it at start up. Then you could just use the mount command to mount it when you need it.
 
Old 12-30-2004, 10:30 AM   #5
bobbens
Member
 
Registered: Sep 2004
Location: Barcelona
Distribution: Debian, FreeBSD, Gentoo
Posts: 586

Original Poster
Rep: Reputation: 30
didn't know that, so once you do that, you just do mount /dev/sda1 /mnt and it will mount there, even though you wrote it on the fstab right?
Thanks i'll try that.
 
Old 12-30-2004, 11:45 AM   #6
joel112
Member
 
Registered: Apr 2003
Distribution: Debian
Posts: 169

Rep: Reputation: 30
Thats how it works, noauto specifes not ot mount it at boot, but you can still mount it the old fashoned way, you could probably use hotplug to detect the device and mount it when its inserted.

Joel
 
Old 12-30-2004, 12:13 PM   #7
bobbens
Member
 
Registered: Sep 2004
Location: Barcelona
Distribution: Debian, FreeBSD, Gentoo
Posts: 586

Original Poster
Rep: Reputation: 30
ok thanks i got it working, i'll look into using hotplug, i know you can modify the detect scripts to make it do what it wants. I still have problems unmounting though, it will rarely unmount, so i just power the hdd off most of the time if i'm sure it's not in use. Thanks.
 
  


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
Dual boot XP(internal IDE HDD) Debian(external USB-IDE HDD) using boot.ini PolarDog Linux - Laptop and Netbook 2 07-01-2005 09:50 PM
Bootable partion on external HDD? 40 gb firelight hdd. Trebile34 Linux - Hardware 1 03-14-2005 11:50 AM
How do I mount a external HDD cyborg_jt Mandriva 9 03-12-2005 07:07 PM
10.1 and external HDD skadub Mandriva 0 10-23-2004 06:36 AM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:30 PM.

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
Open Source Consulting | Domain Registration