3

I have a server that I hooked up an external USB drive. It was formatted in windows and has files on it already.

I'm new to Ubuntu so please be patient...

I have two questions:

  1. Will Ubuntu see the drive since it was formatted in windows?
  2. How do I mount this drive or rather, how do I know it's seen by Ubuntu?

Thanks!

I did fdisk -l and this is what I have but I don't see it. It's a 1tb drive:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001eb47

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   625141759   312320001    5  Extended
/dev/sda5          501760   625141759   312320000   8e  Linux LVM

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/mapper/ubuntu-root: 316.6 GB, 316577677312 bytes
255 heads, 63 sectors/track, 38488 cylinders, total 618315776 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu-root doesn't contain a valid partition table

Disk /dev/mapper/ubuntu-swap_1: 3217 MB, 3217031168 bytes
255 heads, 63 sectors/track, 391 cylinders, total 6283264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

this is an external USB hard drive not a thumb drive :)

4
  • Sry I didn't make it clear, this is a USB external hard drive not a flash drive.
    – ErocM
    Aug 25, 2012 at 5:01
  • Good question. Usually Ubuntu mounts these types of drives in the /media/ dir. I set my machine to RUNLEVEL=3 and tried it, but I also get nothing. It automounts with a desktop GUI, but not in text-only mode.
    – Aaron
    Aug 27, 2012 at 13:11
  • 1
    Can you post the output of dmesg | tail -n 50, issued 2-3 seconds after connecting the drive to the server?
    – pgschk
    Aug 27, 2012 at 13:20
  • Once I figured out what everyone was getting at or rather what these commands did, they pretty much all helped me get the answer I needed. I gave the +50 since it was the most direct answer but I appreciate everyone's input.
    – ErocM
    Aug 27, 2012 at 16:58

7 Answers 7

3

Ok, I just got this to work...albeit with a USB flash drive. I know you're trying to get a USB hard drive to work, but give this a shot.

I took Jeremy and pgschks' advice and ran a dmesg | tail -n 50:

enter image description here

I noticed the 3rd line from the bottom mentioned "sdb: sdb1." I then tried the following:

sudo mount -t vfat /dev/sdb1 /media/usb

I can now cd to the /media/usb dir, and see the files that are on my flash drive.

1
  • That looks right for a 1TB hard disk, tested on a Seagate FreeAgent Goflex.
    – nanofarad
    Aug 27, 2012 at 15:27
3

Flash drives don't usually have a partition table. They are usually just formatted as one lump.

Your desktop should find it automatically and mount it for you.

Failing that, try plugging in the device and running dmesg -- that will give you details about what you just plugged in, including device info and any partition tables. From that point, you should be able to do execute a sudo mount /dev/XXX /media/YYY with XXX being the device and YYY being an existing directory.

2
  • this is a server, I have no desktop. Also, it's a external usb hard drive. Sry, I didn't make that clear.
    – ErocM
    Aug 25, 2012 at 5:02
  • I didn't read yours thorough enough... I'll try the latter steps on this.
    – ErocM
    Aug 27, 2012 at 16:21
2
+50

It is possible that ntfs-config is missing.

You can install it with

sudo apt-get install ntfs-config

and then try once more to see your drives with:

sudo fdisk -l | grep NTFS | awk '{print $1}'
1
  • this was a great addition. It allowed me to see the drive once it was mounted. Tyvm!
    – ErocM
    Aug 30, 2012 at 13:37
2

First, you can try to see if the USB device is detected, then we'll check about partition table.

To do this, you can try the lsusb command (it works as a regular user, no need to be root).

Run this command before and after plug-in your external drive; then compare results.

In my case, I have a new line at the bottom :

Bus 002 Device 018: ID 059f:100d LaCie, Ltd

If you got the same list before and after plugging your device, that may be hardware related (not enough power on USB connector, USB disabled in BIOS, etc...).

As said Jeremy, the dmesg command can be helpful to track what is going on when you plug your drive.

2
  • This helped me the most, it's not seeing it. Not sure why though...
    – ErocM
    Aug 27, 2012 at 16:56
  • What version of Ubuntu server are you using ? On which machine ?
    – D1don
    Aug 30, 2012 at 11:39
1

It will be mounted automatically when plugged-in. If not, boot into Windows and try to browse it on Windows and try it again on Ubuntu. (Remember Safety Remove Device on Windows!)

1
  • I tried this and it had no affect.
    – ErocM
    Aug 27, 2012 at 11:57
0
  1. I think that if you formatted it in FAT32, your Ubuntu will see it. If it is an NTFS drive then install ntfs-3g. Install it using sudo apt-get install ntfs-3g
  2. For the "mounting the drive" part, you can have a look at https://help.ubuntu.com/community/Mount/USB. Instructions: First of all, after you installed ntfs-3g, check the device is there using sudo fdisk -l Then create a mount point using sudo mkdir /media/external. If the drive is formatted in NTFS, use sudo mount -t ntfs-3g /dev/sdb1 /media/external. If if is in FAT32 or FAT16, use sudo mount -t vfat /dev/sdb1 /media/external -o uid=1000,gid=1000,utf8,dmask=027,fmask=137. If you want to unmount it use sudo umount /media/external. More info about it in https://help.ubuntu.com/community/MountingWindowsPartitions
0

It was my cable. Simple as that.

I replaced the cable and I used your answers to mount my drive.

Your answers help me learn a lot about Ubuntu that is why I went ahead +50 the most useful answer.

Thanks for the help everyone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .