Linux - NewbieThis 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.
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.
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.
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.
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?
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.
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?
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..... )
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.