Discussion Locked

Adding a drive in Linux

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I just added a drive in a Red Hat 6.2 box. It is just a 3 gig drive. The bios as well as Linux found the drive just fine. I used cfdisk to make a primary partition as well as a logical partition, named hdb1 and hdb5, respectively. I also made hdb1 bootable.

My problem is that either I cannot mount the partitions or the size of the mount point is incorrect. Let me explain...

When I mount the primary partition, it only mounts 27MB of the partition regardless of how big I make it. I have tried to play around with the sizes.

It also seems that I cannot even mount the logical partition. It gives me some error like 'mount: wrong fs type, bad option, bad superblock on /dev/hdb5, or too many mounted file systems' I don't think I have too many mounted file systems...I only have 8. I tried unmounting a few and trying it then, and I got the same result.

I have tried MANY combinations of making just one primary partition and no logical ones, or having a swap partition in there, changing the sizes, making it non-bootable, etc., all with no luck. Am I missing something?? Obviously when I mount something, the directory exists. I am using the ext2 file system, type 83, as defined in cfdisk and fdisk. Why can I not mountmore than 27MB??? Thanks for any help you can provide me.

7 replies

by arokh

you must add your drive into /etc/fstab
insert the following line:
/dev/hdb5 /mountdir ext2 defaults 0 0
replace /mountdir with the your mount direktory
and after adding the drive into fstab you can mount it with:
mount /dev/hdb5

by cp409sd

I have tried to put it in the fstab, as well as mount it using the:

mount -t ext2 /dev/hdb5 /space

command. Neither seem to work when I try to mount the logical partition. I am curious what the two numbers at the end of the entry inthe fstab represent though. I have some entries with 'defaults 0 0' , and others with 'defaults 1 2' . I don't really know what they do. Thanks for the help though.

by dlinuxd

Some Bios hd autodetects give you different options for drive geometry. For example LBA, Normal, and CHS. If your Bios has those options, try changing them.
Dan Dofton

by jaolson40

After you ran cfdisk to create the partition, did you run mkfs to format the drive? The drive won't mount until you do. You may have to re-run cfdisk, or perhaps even just use fdisk if it's a basic partition, before you run mkfs.

by shanghai sam

Thanks!!! As you can tell, I have not played with Linux that much. Not sure why I didn't figure out I was only partitioning and not formatting when using cfdisk...Thanks for pointing this out.

This discussion is closed to new replies.