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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-22-2005, 05:52 PM
|
#1
|
LQ Newbie
Registered: Nov 2004
Location: Ohio
Distribution: SuSE and Fedora Core
Posts: 3
Rep:
|
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
|
|
|
01-22-2005, 06:02 PM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
01-22-2005, 06:05 PM
|
#3
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep:
|
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.
|
|
|
01-24-2005, 08:16 PM
|
#4
|
LQ Newbie
Registered: Nov 2004
Location: Ohio
Distribution: SuSE and Fedora Core
Posts: 3
Original Poster
Rep:
|
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?
|
|
|
01-25-2005, 12:11 AM
|
#5
|
Member
Registered: May 2004
Location: Frisco, TX
Distribution: Debian Unstable
Posts: 73
Rep:
|
Can we get a dmesg to be sure of the hd assignments? Sounds like /dev/hdb is really your cdrom and not a hd.
|
|
|
01-25-2005, 06:12 AM
|
#6
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
01-25-2005, 06:20 AM
|
#7
|
Senior Member
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918
Rep:
|
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.
|
|
|
01-25-2005, 06:24 AM
|
#8
|
LQ Newbie
Registered: Nov 2004
Location: Ohio
Distribution: SuSE and Fedora Core
Posts: 3
Original Poster
Rep:
|
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?
|
|
|
01-25-2005, 06:47 AM
|
#9
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 09:17 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|