How to add a hardisk and make it accessible in Linux ?

I'm currently running Linux Redhat 7.1 and have 2 hardisks (hda & hdb).
I tried to add another hardisk (hdc). However, it is not accessible because its not mounted. It was not allowed to mount because fs not supported.

How should I do it, as in windows, just add a new hardisk, and you will see it, and can use it as any other current drive.

(I'd need to copy something from hda to hdc, and use hdc to transfer to another pc somewhere else.)

Can someone pls tell me what should I do (b'cos I'm very new to Linux).

Thankx. :)
Who is Participating?
So, the only issue left is that you can't mount your windows partition on /dev/hdc5 (?). So...

1. how was this partition formatted? (mkfs, mkdosfs, windows) I would suggest mkdosfs.
2. do you have msdos and vfat support in your kernel?
3. if the support is not built into the kernel, do you
   have the kernel module loaded (/sbin/lsmod)?
You should be able to get this to work.  If the other machine is a linux box do the following:

1 - Put in drive.
2 - Boot up
3 - "fdisk /dev/hdc"
4 - If thier are nore partitions, add one.  If there are partitions, note thier type and number.
5 - Exit fdisk.
6 - "mkdir /newdrive"
7 - mount -t 'fstype' /dev/hdc? /newdrive"  If you created your own partition, type  "mount -t ext2 /dev/hdc1 /newdrive".  If thier was already a FAT partition there type "mount -t msdos /dev/hdc1 /newdrive"

Good luck and please post any issues that need clarification.

     If you add a brand new hard disk under a windows (3.11, 95, 98, NT) system, you cannot see it either, you have to do at least a fdisk to see it and create a file system with the format command or equivalent.

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

After you have added a drive, you should boot messages
that give you clues that the drive was properly recognised.

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: 40088160 sectors (20525 MB) w/1961KiB Cache, CHS=2651/240/63, UDMA(33)
hdd: ATAPI 50X CD-ROM drive, 128kB Cache

Note, it is quite likely that you have added this third drive to the secondary ide controller. Depending on whether it was configured as a primary or a slave, it may be seen as 'hdd' (like my cdrom above) instead of 'hdc'.

If the boot messages zoom past too fast (gee I wish I had that problem!), you can see them at the command prompt with the 'dmesg' command.

Next, you need to create partitions on the drive. On drives that are to contain just data (no os), I usually first create one single 'extended' primary partition to cover the whole disk, and then carve out partitions I need from this extended partition. This gets around the 4 primary partition limitation.

Of course, the next step is to format you partiton. Something like: 'mke2fs /dev/hdc6' (formats the first partition inside the extended partition).

The mount point must exist. Simply make a directory where you want the partition mounted. Finally: 'mount /dev/hdc6 /www'. Note - ext2 is automatically recognosed by mount, so there is no need to use the '-t' parameter, unless the filesystem was built as something other than ext2.

Finally, you might want to add an entry to you /etc/fstab to automatically mount this filesystem at boot. add a line like....

/dev/hdc6      /www         ext2        defaults   1   1

Hope this helps!
shchong2Author Commented:
Hi, just wanna clarify something :-

I've 3 HARDISK i.e. hda, hdb and hdc
hda is installed with Linux Redhat 7.1 and Windows 2000 with dual-boot
hdb with 3 partition but all Win FAT32
hdc is 2GB with 1GB (hdc1) of Linux ext2 fs and 1GB (hdc5) of Win FAT32

1. when I type "mkdir /batigol" , then "mount -t ext2 /dev/hdc1 /batigol", it works
   but for "mkdir /owen", then "mount -t msdos /dev/hdc5 /owen", it can't recognise it ?

2. After mounting hdc1, I see the directry /batigol , but there are some files in there :
     module -info
     module -info-2.2.14-5.o
     os2 d.b

Sorry I don't mean to be long-winded.
Just want to clear some doubts.
Thankx for the help of experts
thankx for teaching me so many new stuff and make my learning of linux an enjoyable one
shchong2Author Commented:
what are those files in the /batigol actually means

are they system files ?
Can I do anything to them ?

The files listed on /batigol is the contents of a /boot partition. Did you run the redhat install on the hdc partition? Anyway, to get a list of what partitions are on that drive you should run 'fdisk /dev/hdc' and enter 'p' to print the partition table. Post that, and I can probably be more help.

As far as 'mount -t msdos ....', in order to mount an msdos partition you need to have msdos filesystem support in your kernel. Try... 'modprobe msdos', or 'modprobe vfat' before you run the mount command.
shchong2Author Commented:
In hda, I have some mount points :-

In hdb, no "linux partition", all are "Win FAT32"

In hdc,
--> hdc1 is "Win FAT32" (1 GB)
--> hdc5 is "Linux native" (1GB)

(hdc is totally empty initially. It contains no OS nor data)

Well, now you got me confused. You say that "mount -t ext2 /dev/hdc1 /batigol" works. But above you say it is formatted as fat32?? I Assume you ment to say that hdc5 is a fat32. How did you format this partition? Did you use mkfs or was it formatted with windows?
shchong2Author Commented:
sorry, sorry, my mistake
--> hdc1 is "Linux native"
--> hdc5 is "Win FAT32"

really sorry
shchong2Author Commented:
Really thank you very much, moonbeam.

You are really a Linux expert !!!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.