LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 01-15-2007, 10:41 AM   #1
tripled2006
LQ Newbie
 
Registered: Jan 2007
Posts: 10

Rep: Reputation: 0
manual mount - External usb hard drive (in ubuntu)


Hi all,

I am running the ubuntu linux OS in a vmware workstation within the windows xp OS. I have disabled the automatic mounting of my usb external hdd by some vmware processes at windows startup as it was causing my whole system to come to a standstill for about 20 minutes (note: This has only caused the external hdd to not be advance mounted at starup for ubuntu within the vmware workstation environment; The external hdd works grand within the win xp environment at all times). So, im wondering if there is any way in which I can manually setup and mount my usb external hdd in ubuntu?

(Any other suggestions also will be helpful)

Thank you to everyone, in advance, for reading/replying to my query.



Dan.
 
Old 01-15-2007, 11:40 AM   #2
b0uncer
Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Well, you could add an fstab entry to speed things up. The "manual way" from console, if your HD isn't visible at Ubuntu's "Computer" (or whatever the place is called; well, you should see it from within Nautilus anyway, the button in the toolbar), is
Code:
mount -t vfat /dev/sda1 /mnt/sda1
In the above example it is assumed that the device file for the 1st partition of the external harddisk is /dev/sda1 (that's usually for usb sticks, for example), and that you want to mount it to /mnt/sda1 (and that the location exists) and that the drive has a FAT (vfat) filesystem on it. Change when needed.

You could also add an fstab entry like this, to your /etc/fstab (following the previous example):
Code:
/dev/sda1 /mnt/sda1 vfat defaults 0 0
for a basic setup. Then you could just
Code:
mount /mnt/sda1
to get the drive mounted; remember to change the information according to your own setup. You can also give more options like
Code:
/dev/sda1 /mnt/sda1 vfat defaults,exec,umask=022 0 0
here exec allows running executables from the harddisk (if needed; otherwise don't add) and umask=022 adds an user mask, which should make it readable and writable by other users than root too.

More information:
Code:
man fstab
man mount
EDIT: after adding a correct fstab entry it is possible that the drive is shown as an icon either in your desktop or in some other place you can see in Nautilus. If settings and permissions are okay, then you should be able to mount and umount the drive using the icon, too.

Last edited by b0uncer; 01-15-2007 at 11:42 AM.
 
Old 01-15-2007, 12:14 PM   #3
tripled2006
LQ Newbie
 
Registered: Jan 2007
Posts: 10

Original Poster
Rep: Reputation: 0
reply

First of all, thanks for replying to my query.

Regarding, the first command line you quoted me:

"mount -t vfat /dev/sda1 /mnt/sda1"

The file system of my external hdd is ntfs.

I tried the above just to see what happens and i got a response of "the mount point '/mnt/sda1' does not exist."

How do I get around this?
 
Old 01-26-2007, 01:30 PM   #4
gasykel
LQ Newbie
 
Registered: Sep 2005
Location: France
Distribution: redhat 6.2/7.3/9
Posts: 4

Rep: Reputation: 0
What "senior member" really means ?

Quote:
Originally Posted by b0uncer
Well, you could add an fstab entry to speed things up. The "manual way" from console, if your HD isn't visible at Ubuntu's "Computer" (or whatever the place is called; well, you should see it from within Nautilus anyway, the button in the toolbar), is
Code:
mount -t vfat /dev/sda1 /mnt/sda1
In the above example it is assumed that the device file for the 1st partition of the external harddisk is /dev/sda1 (that's usually for usb sticks, for example), and that you want to mount it to /mnt/sda1 (and that the location exists) and that the drive has a FAT (vfat) filesystem on it. Change when needed.

You could also add an fstab entry like this, to your /etc/fstab (following the previous example):
Code:
/dev/sda1 /mnt/sda1 vfat defaults 0 0
for a basic setup. Then you could just
Code:
mount /mnt/sda1
to get the drive mounted; remember to change the information according to your own setup. You can also give more options like
Code:
/dev/sda1 /mnt/sda1 vfat defaults,exec,umask=022 0 0
here exec allows running executables from the harddisk (if needed; otherwise don't add) and umask=022 adds an user mask, which should make it readable and writable by other users than root too.

More information:
Code:
man fstab
man mount
EDIT: after adding a correct fstab entry it is possible that the drive is shown as an icon either in your desktop or in some other place you can see in Nautilus. If settings and permissions are okay, then you should be able to mount and umount the drive using the icon, too.
You should use first of all the command
# fdisk -l
And in the case of ubuntu drapper in vmware as guest of winxp, your advice is
completely dangerous and might lead to a pretty dangerous loop especially when
root / is /dev/sda1 mounted.
As far as I've tried on any windows box, this was the case.
So please, please, don't give any automation trick if you've never tried to get
a VM ubuntu on a Winbox !
You're only right when ubuntu is running in its own partition (physical).
The problem with our case is caused by the interception of our usb device by windows prior its vmware guest.
The fix (howto) is setting VMware workstation/server removable Devices:
1) Menu -> VM -> Removable Devices -> USB Devices -> your_usb_device
2) WindowsXP then unmount its own usb device and runs -if it is the first time you set VM removable devices - and installs what it likely calls VMware USB driver.
3) when done, the icon of USB device appears at the lower right corner of your VMware workstation window.
Eventually you can mount inside your ubuntu guest (or other linux flavor) your usb device with this command
# mount /dev/sdb1 /media/usbflash
Of course you have to adjust the mounting point to your machine filesystem.
I didn't invent the /dev/sdb1 param, it comes directly from
- either: fdisk -l
- or dmesg during usb scanning
- or on your console standard io....
That's all.
PS: your VMware workstation release must be over 5.5

Last edited by gasykel; 01-27-2007 at 01:46 AM.
 
Old 07-20-2008, 09:28 AM   #5
mainhoonteja
LQ Newbie
 
Registered: Jul 2008
Posts: 4

Rep: Reputation: 0
Unmount

Hi I am using Ubuntu.. and this is the first time i am using a linux system.. when i try to access any of my drives namely D:\ or E:\. it gives me an error unable to mount device,,, can you please help to overcome this error .... I dont have windows ...thnx


Quote:
Originally Posted by b0uncer View Post
Well, you could add an fstab entry to speed things up. The "manual way" from console, if your HD isn't visible at Ubuntu's "Computer" (or whatever the place is called; well, you should see it from within Nautilus anyway, the button in the toolbar), is
Code:
mount -t vfat /dev/sda1 /mnt/sda1
In the above example it is assumed that the device file for the 1st partition of the external harddisk is /dev/sda1 (that's usually for usb sticks, for example), and that you want to mount it to /mnt/sda1 (and that the location exists) and that the drive has a FAT (vfat) filesystem on it. Change when needed.

You could also add an fstab entry like this, to your /etc/fstab (following the previous example):
Code:
/dev/sda1 /mnt/sda1 vfat defaults 0 0
for a basic setup. Then you could just
Code:
mount /mnt/sda1
to get the drive mounted; remember to change the information according to your own setup. You can also give more options like
Code:
/dev/sda1 /mnt/sda1 vfat defaults,exec,umask=022 0 0
here exec allows running executables from the harddisk (if needed; otherwise don't add) and umask=022 adds an user mask, which should make it readable and writable by other users than root too.

More information:
Code:
man fstab
man mount
EDIT: after adding a correct fstab entry it is possible that the drive is shown as an icon either in your desktop or in some other place you can see in Nautilus. If settings and permissions are okay, then you should be able to mount and umount the drive using the icon, too.
 
Old 07-20-2008, 07:44 PM   #6
Kiwi944
Member
 
Registered: Jan 2008
Location: Auckland
Distribution: Ubuntu
Posts: 31

Rep: Reputation: 15
Appologies if I am informing you of something you already know, I too am new to Linux and have asked similar questions.

I would suggest posting some code examples of what you are typing to mount your devices. Linux uses the base naming convention for HDD like

hdx for IDE devices
sdx for SATA devices

note "x" is the device number a,b,c,d etc.

If you could post a little more on your setup I am sure the people here will be more than happy to assist (probably better than I can).

Hope this helps.
 
Old 10-01-2009, 08:35 PM   #7
jackal7
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 1
How do you tell?

How do you tell what name your usb hard drive is using? / What ubuntu is calling it? And what do you do if it is not in/part of the /dev directory?


Thanks guys I love this site for linux help!


Edit: Use dmesg | tail to find the name assigned to a usb device.

Last edited by jackal7; 10-03-2009 at 04:20 AM. Reason: found my own answer
 
1 members found this post helpful.
Old 09-27-2010, 03:28 PM   #8
Sathia44
LQ Newbie
 
Registered: Sep 2010
Posts: 1

Rep: Reputation: 0
my usb drive not detecting ? any one please tell ?

dmesg | tail
[22847.647041] operapluginwrap[7319]: segfault at 0 ip (null) sp bfe8e32c error 4 in libX11.so.6.3.0[110000+119000]
[22847.656303] operapluginwrap[7322]: segfault at 0 ip (null) sp bff78cac error 4 in libXext.so.6.4.0[110000+e000]
[22847.662443] operapluginwrap[7323]: segfault at 0 ip (null) sp bfd31b5c error 4 in libdl-2.11.1.so[110000+2000]
[22847.668497] operapluginwrap[7324]: segfault at 0 ip (null) sp bf910aec error 4 in libuuid.so.1.3.0[110000+3000]
[22847.674717] operapluginwrap[7325]: segfault at 0 ip (null) sp bfbd4a8c error 4 in libSM.so.6.0.1[110000+7000]
[22847.680805] operapluginwrap[7326]: segfault at 0 ip (null) sp bfc4369c error 4 in libdl-2.11.1.so[110000+2000]
[22847.687382] operapluginwrap[7327]: segfault at 0 ip (null) sp bfe9436c error 4
[22847.694199] operapluginwrap[7328]: segfault at 0 ip (null) sp bfd1576c error 4 in libgcc_s.so.1[110000+1d000]
[24559.326755] FAT: bogus number of reserved sectors
[24559.326761] VFS: Can't find a valid FAT filesystem on dev sdc1.


this is message i am getting ?
any one have idea ?



when i am mounting the usbdrive ..
pls tell me what is problem ?$ sudo mount -t vfat /dev/sdc1 /mnt/usbd
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

this is my error message
pls tell me what will be the problem ? ?

Last edited by Sathia44; 09-27-2010 at 03:32 PM.
 
Old 05-28-2011, 06:13 AM   #9
iluminameluna
LQ Newbie
 
Registered: Aug 2010
Posts: 9

Rep: Reputation: 0
Thumbs up USB won't automount in Ubuntu 10.04LTS, Solution

Quote:
Originally Posted by Sathia44 View Post
[24559.326761] VFS: Can't find a valid FAT filesystem on dev sdc1.


this is message i am getting ?
any one have idea ?



when i am mounting the usbdrive ..
pls tell me what is problem ?$ sudo mount -t vfat /dev/sdc1 /mnt/usbd
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

this is my error message
pls tell me what will be the problem ? ?
If you still have this problem (I'd been looking for a solution since Aug, 2010) you can find the simple solution here:

http://ubuntuforums.org/showpost.php...95&postcount=7

Sorry, this solution is only for Desktop, personal version, of Ubuntu, not the Server install. :-/

Last edited by iluminameluna; 05-28-2011 at 06:18 AM. Reason: My post relates to Desktop Ubuntu install, not Server version
 
Old 06-14-2011, 04:51 PM   #10
aehare70
LQ Newbie
 
Registered: Jun 2011
Posts: 1

Rep: Reputation: Disabled
I realize this may be an old post, but it still seems active and I also know this may sound like a silly question, but didn't you say your file system was NTFS? If so, change the option on your command from "vfat" to "ntfs".

Using /dev/sdb1 as your USB Drive - the fdisk -l command will reveal what device your USB drive is assigned to. Remember to replease /dev/sdb1 with the one assigned to your device/drive;

Code:
# The comments appended with the "#" need not be pasted to your command line
# List your devices (drives)
fdisk -l

# Create the directory for the mount
mkdir /mnt/sdb1

# Create a backup copy of the /etc/fstab file
cp /etc/fstab /etc/fstab.bak

# This sends an edit line to the /etc/fstab file from the command line
printf "\n/dev/sdb1 /mnt/sdb1 ntfs defaults 0 0\n" >> /etc/fstab

# The mount -a command will mount your drive utilizing the /etc/fstab
mount -a

Let us know if that works for you.

Last edited by aehare70; 06-14-2011 at 04:56 PM.
 
Old 10-10-2011, 04:36 PM   #11
pouldney
LQ Newbie
 
Registered: Oct 2011
Posts: 16

Rep: Reputation: Disabled
Heres what worked with a USB floppy drive on an Acer Aspire 1551
and Ubuntu 10.04 LTS


To mount a floppy
Make somewhere to mount it: (unless this is all ready done)
# sudo mkdir /media/USBfloppy
Mount it manually: (first make sure the USB disk is called "sdc" using Disk Utility)
# sudo mount -t msdos -o uid=1000,gid=1000 /dev/sdc /media/USBfloppy (for msdos disk)
# sudo mount -o uid=1000,gid=1000 /dev/sdc /media/USBfloppy (without specifying type)
-o means options follow. user IDs and group IDs of a 1000 and up refer to ordinary users.
this will mount the disk with usage by uid=1000
Go to Administration - Users and Groups to see your uid and gid

# sudo umount USBfloppy or # sudo umount /media/USBfloppy to unmount
 
  


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
ubuntu partitioning tool does not see external usb hard drive when installing ubuntu fakie_flip Linux - Software 2 07-30-2006 01:44 AM
disable automatic mount of external USB hard drive pixellany Linux - General 8 07-10-2006 05:05 PM
how do I mount an external USB hard drive hykhoshn Linux - Hardware 1 06-01-2006 11:14 AM
New to RH9 please help me to mount? a external usb hard drive ginda Linux - Newbie 7 05-29-2006 08:11 PM
How to mount external USB hard drive? zyzyis Linux - Newbie 6 02-01-2006 10:37 PM


All times are GMT -5. The time now is 07:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration