valid partition table

Posted on 2006-05-23
Last Modified: 2013-12-16
Hi I'm adding a second hard drive to a linux red hat 9.0 box. It's an IDE drive and I created it as /dev/hda. I'm having trouble mounting it. I get the mesage: "Disk /dev/hda doesn't contain a valid partition table". Can't think what I did wrong.

Question by:timothyking
    LVL 87

    Expert Comment

    You have to create partitions on that drive.

    fdisk /dev/hda

    then m will give you a list of all the options you have. p allows you to create a new partition. Once you are satisfied with the pratitions, you commit the changes with w. q leaves fdisk.

    Now you have partitions like /dev/hda1, /dev/hda5 etc., but these aren't formatted yet. Depending on the filesystem you want to use you now have to use different options to format the partitions.

    mkfs -j /dev/hda1

    will format /dev/hda1 to an ext3 filesystem. After that you can mount it.

    The gentoo has a pretty good document for that:

    Author Comment

    OK the plot thickens. I formatted and partitioned the drive. I then mounted the drive and it appears ok when I issue the command df -h . 2 problems arose.

    (1) the mount of the drive will not survive a reboot

    (2) the server gives lilo errors and won't boot up unless I use the floopy boot disk


    LVL 87

    Accepted Solution

    In order to mount a partition automatically, you need to add some entries to /etc/fstab.

    the entry might look something like this, but it depends on your setup:

    /dev/hda1   /mnt/hda1   ext3    defaults,auto   0  0

    As I  don't use lilo (I prefer grub because it is much easier to use and configure) I'm not sure what the problem is there. I can thingof the following:

    You have 2 disks with active primary partitions, this could confuse lilo and any other boot loader. I don't know what your other disk is...

    /dev/hda is normally the disk you boot from, as this is the first primary IDE HD. You were originaly probably booting from something else, but again that could mess up something with your boot loader.

    I have a further question:

    It seems this is a new installation you are experimenting with. If I'm correct with that assumption, why are you using such an old and officially unsupported version of redhat? I suggest you get something current, like fedora-core 5 which is the successor of RH9. It uses state of the art software...

    Author Comment

    I re-installed the RH9 to the other disk, changed the boot device in the BIOS, used GRUB, and it appears to boot ok. I will check out Fedora although it will take a while to download and create 5 CD's.

    LVL 87

    Expert Comment

    If I remember correctly (at least it was that way with FC4, I think), you don't need all CD's. With most linux distro's the first CD is enough. You can tell the installer to install directly from the download site. If you arent' installing all of the packages, that is usually faster. Particularly you only need some essential programs to start of with, then you run an update to get the newest versions from the internet, and after that you install the other packages, which if you do the install directly from the internet, are probably more uptodate than what you have on CD.

    But that is personal preference....

    Thanks anyway.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
    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.

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now