I have an Ubuntu server that I wanted to add an external USB hardrive to. The external drive is a standard Western Digital MyBook 250gb drive. I plugged it into the back of my server in a free usb port and figured it would be plug an play... no dice!


To add the drive I searched around and ended up doing the following.

First I needed to identify the drive.
in shell
fdisk -l

this will return something like this

Disk /dev/hda: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 3890 31246393+ 83 Linux
/dev/hda2 3891 4863 7815622+ 82 Linux swap / Solaris

Disk /dev/hdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 60801 488384001 83 Linux

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 30401 244196001 7 HPFS/NTFS

from here I can see my new external drive is in /dev/sda1

next I want to mount the drive, i will need to first create a local directory to mount the external drive to
in shell
mkdir /media/sda1

next I want to mount / attach the external drive to the local folder
in shell
mount -t ntfs /dev/sda1 /media/sda1

now Ill test to make sure my drive is mounted
in shell
df -h

which will return

/dev/hda1 30G 1.2G 27G 5% /
varrun 315M 92K 315M 1% /var/run
varlock 315M 4.0K 315M 1% /var/lock
udev 315M 112K 315M 1% /dev
devshm 315M 0 315M 0% /dev/shm
/dev/hdb1 459G 4.5G 431G 2% /home
/dev/sda1 233G 24G 210G 10% /media/sda1

from here i can see the last record is my mounted drive.

Popularity: 74% [?]


  • BROWSE / IN Subversion Ubuntu Unix
  • RELATED / YOU MIGHT FIND THESE INTERESTING
  • No related posts

SPEAK / ADD YOUR COMMENT
Comments are moderated.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Return to Top