LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-22-2005, 05:52 PM   #1
elliottlake
LQ Newbie
 
Registered: Nov 2004
Location: Ohio
Distribution: SuSE and Fedora Core
Posts: 3

Rep: Reputation: 0
Mounting a new IDE drive.


I've got a really dumb question. I have a 40GB IDE disk, hdb by Linux. I am trying to add it and format the drive. This is a Fedora Core 2 system I'm using to learn Linux. So the obvious questions are:

How do I mount the new drive and how do I format it? I've tried a couple of articles I've found on the topic with not luck. They have suggested using sfdisk, however I get errors that the device cannot be opened. Trying to mount the device hasn't worked either. If I'm remembering correctly I've been using variations of the command mount -t ext3 /dev/hdb /mnt/hdb. I don't have any luck with this either.

After I get this done I'll be looking to create shares and allow access for both Windows systems and Linux systems. Any advice as to good articles to read for this will be greatly appreciated.

Thanks
 
Old 01-22-2005, 06:02 PM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
well...you can only mount filesystems, so without formatting it won't be mountable.
try to use " fdisk "

-----
#fdisk /dev/hdb
-----

make one or more partitions.

then format them. ( see " man mkfs " on available commands )

egag
 
Old 01-22-2005, 06:05 PM   #3
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Quote:
How do I mount the new drive and how do I format it?
1. Drive is installed with correct jumper settings.
2. Create partitions. I like cfdisk. "cfdisk -Ps" should list your drives. "cfdisk /dev/hdb" to partition.
3. Format the partitions. To create a Reiser filesystem "mkreiserfs", for ext3 "mkfs.ext3".
4. Mount the partitions. Create the desired mount points. Add to /etc/fstab if desired.
 
Old 01-24-2005, 08:16 PM   #4
elliottlake
LQ Newbie
 
Registered: Nov 2004
Location: Ohio
Distribution: SuSE and Fedora Core
Posts: 3

Original Poster
Rep: Reputation: 0
formatting and mounting new hdd

I've been trying fdisk and sfdisk. I'm getting errors telling me that the drive is read only. I didn't think you could do that with an IDE drive.

I'm still looking for a download of cfdisk to try. I'll get back to that approach after I download and install it.

As far as the physical setup is concerned, I have the following: /dev/hda is a Western Digital 3.2GB IDE HDD, primary master. /dev/cdrom is a Samsung sc-152l, primary slave. /dev/hdb (the one I want to mount) is a Western Digital 40GB IDE HDD, secondary master and /dev/hdc is also a Western Digital 40GB IDE HDD, as the secondary slave.

The jummpers have been checked and they are set properly for each controller. Is there something above that I missed?

Out of curiousity, I thought that fdisk would overwrite anything on the HDD. Is there a difference I don't know about when using it in Linux?
 
Old 01-25-2005, 12:11 AM   #5
Draygo
Member
 
Registered: May 2004
Location: Frisco, TX
Distribution: Debian Unstable
Posts: 73

Rep: Reputation: 15
Can we get a dmesg to be sure of the hd assignments? Sounds like /dev/hdb is really your cdrom and not a hd.
 
Old 01-25-2005, 06:12 AM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
that's correct:

prim. master = hda
prim. slave = hdb
sec. master = hdc
sec. slave = hdd

that also expains the error-message " drive = readonly " as hdb is a cdrom.

try " fdisk /dev/hdc "

egag
 
Old 01-25-2005, 06:20 AM   #7
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Quote:
Out of curiousity, I thought that fdisk would overwrite anything on the HDD.
Fdisk utilities can be used to show partition data as well as create partitions.
"How do I mount the new drive and how do I format it?" seems to be asking for information on setting up a bare drive from scratch for use rather than a drive with wanted data on it. Is that correct?
You would not change partitions with fdisk tools when there are existing partitions with needed data. You would also not format existing partitions with needed data.
 
Old 01-25-2005, 06:24 AM   #8
elliottlake
LQ Newbie
 
Registered: Nov 2004
Location: Ohio
Distribution: SuSE and Fedora Core
Posts: 3

Original Poster
Rep: Reputation: 0
hdb is cd-rom

Believe it or not, I thought of that at one point, however I dismissed it when reading a howto on this topic. There was a command to list the IDE drives (unfortunately I don't remember the command) connected to the system. It threw me to see devices hda, hdb, hdc and hdd listed. I know the system is using devices hda and hdc. So my suspicion, after what you've said, is that I'm actually after hdd. What's your take on that thought? Am I off in left field again?
 
Old 01-25-2005, 06:47 AM   #9
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
well...i think you just have to look if the new drive is master or slave ( hdc or hdd )

first do " # fdisk -l /dev/hdd "
if nothing is listed, there are no partitions and that will be your new drive.
( compare the output with " # fdisk -l /dev/hdc " ; you will see partitions there..... )

egag
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting IDE TapeDrive morph26 Linux - Hardware 1 08-17-2005 09:20 PM
Difference between IDE drive and IDE to CF adaptor? 2kman Linux - General 0 12-21-2004 05:45 PM
brainfart: mounting a new ide drive dkw Linux - Newbie 6 07-27-2004 01:51 AM
IDE ZIP and mounting it santiagosilva Linux - Hardware 2 03-11-2004 12:18 PM
Mounting a hard-drive on secondary ide linuxjuggler Linux - Newbie 1 12-16-2003 12:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration