[Novalug] external hard drive questions (2)

Peter Larsen plarsen at famlarsen.homelinux.com
Fri Feb 16 15:17:05 EST 2007


Beartooth wrote:
> 
>     Last time I was in the local computer shop, I took a look at 
> external hard drives. They have a fair variety -- maybe a couple dozen; 
> you pick, and they put it into a housing for you, "but you have to 
> format it." Format?? Does that just mean you plug it into your PC, cd to 
> it, and stick an install disk into the disk drive??

"format" is a term from the DOS world. In unix/linux it's called 
file-systems, and just as you would create filesystems for your build in 
drives, you want to do the same on external drives. The linux command 
for making filesystems is logically enough, mkfs.  It comes in different 
shapes/forms for each filesystem. The ext3 filesystem is created by 
mkfs.ext3.

All you need to do, is point to the device/partition you want to keep 
the file-system on.

Before you can create a filesystem, you must (? not sure about must, in 
theory you should be able to do without it) create a partition for the 
filesystem, and then simply create the filesystem. Then you can mount it 
as anything else, and you're done.

The trick here is, that external drives (usually usb) doesn't show up as 
/dev/hda,b,c etc., it can show up in many different ways depending on 
what drivers you have; mine shows up as /dev/sda,b,c etc.  To find out, 
simply do: dmesg | less
Looks for a line with "usb-storage: device scan complete". After this 
should be the device on which your usb device has been assigned to. A 
few lines later you should see the partitions found. If none is found, 
you must create one first - use fdisk. On mine, the partition is on 
/dev/sda1 - so to create an ext3 file system there, I simply type (as 
root):  mkfs.ext3 /dev/sda1

And from then on, you simply mount it with:
mount -t ext3 /dev/sda1 /mnt/my_mount_point

If you attach the drive permanently, you may want to add an entry in 
/etc/fstab.

Once you have a partition, the drive SHOULD show up in gnome when you 
connect it. From there, you also have an option to "format" the drive.

>     Also, are these things like printers -- some good with linux and 
> some lousy? Or can I just pick a good deal for the size and price I want??

Yes - definately. Some USB devices work straight out, some don't. Some 
work, some work better. Depends on the features you're looking for. 
Problem is, that it's not very well documented what hardware works and 
doesn't. You may just look for what others are using, and look for that.

Regards
   Peter Larsen




More information about the Novalug mailing list