LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /dev/hda does not contain a valid partition table (https://www.linuxquestions.org/questions/linux-newbie-8/dev-hda-does-not-contain-a-valid-partition-table-4175444279/)

puntino 01-05-2013 12:32 PM

/dev/hda does not contain a valid partition table
 
Hello,
the fdisk -l command prompts the message
/dev/hda does not contain a valid partition table

Despite I tried the following commands (their execution is error free):
$PREFIX=/home/work/mysql

sudo /sbin/mkfs.ext3 -L MYSQL_TEST -F -q /dev/hdb

sudo mount -L MYSQL_TEST $PREFIX/testdir

after the former command the partition dev/hdb appears among mounted devices (I checked it up with "mount").

Thank you in advance

eSelix 01-05-2013 01:54 PM

Once you use /dev/hda and another /dev/hdb, I assume you mean /dev/hda. Message you get is correct. /dev/hda is not partitioned. By doing mkfs.ext3 on hda you only formated whole drive, by using -F you should known what you are doing. To partition disk, you first need to use partitioning tool, for example
Code:

fdisk /dev/hda
and then, after creating partition, format it (/dev/hda1 for example) by mkfs. Do not use -F to if you do not want that behavior.

michaelk 01-05-2013 04:33 PM

As already stated you formatted the entire drive vs a partition i.e hdb vs hdb1. There is nothing wrong except if the drive was previously partitioned and contains other data.


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