?
Solved

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

Posted on 2001-08-23
11
Medium Priority
?
771 Views
Last Modified: 2008-02-01
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. :)
0
Comment
Question by:shchong2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 3

Expert Comment

by:iharding
ID: 6419346
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.
0
 
LVL 2

Expert Comment

by:olidel
ID: 6419839
Hi,

     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.

Bye.
0
 
LVL 5

Expert Comment

by:moonbeam012200
ID: 6425880
After you have added a drive, you should boot messages
that give you clues that the drive was properly recognised.
eg:

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!
0
Python: Series & Data Frames With Pandas

Learn the basics of Python’s pandas library of series & data frames and how we can use these tools for data manipulation.

 

Author Comment

by:shchong2
ID: 6426057
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 :
     /lost+found
     boot.b
     chain.b
     kernel.h
     module -info
     module -info-2.2.14-5.o
     os2 d.b
     system.map
     system.map-2.2.14-5.o
     vmlinux-2.2.14-5.o
     vmlinuz
     vmlinuz-2.2.14-5.o

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
:)
0
 

Author Comment

by:shchong2
ID: 6426064
what are those files in the /batigol actually means

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

:)
0
 
LVL 5

Expert Comment

by:moonbeam012200
ID: 6427131
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.
0
 

Author Comment

by:shchong2
ID: 6428690
Actually
In hda, I have some mount points :-
   /
   /boot
   /usr
   /home
   /tmp
   /var
   <swap>

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)

:)
0
 
LVL 5

Expert Comment

by:moonbeam012200
ID: 6429740
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?
0
 

Author Comment

by:shchong2
ID: 6430097
sorry, sorry, my mistake
:)
actually
--> hdc1 is "Linux native"
--> hdc5 is "Win FAT32"

really sorry
:)
0
 
LVL 5

Accepted Solution

by:
moonbeam012200 earned 200 total points
ID: 6430187
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)?
0
 

Author Comment

by:shchong2
ID: 6457839
Really thank you very much, moonbeam.

You are really a Linux expert !!!

:)
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month12 days, 1 hour left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question