LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   After formatting hard disk, invalid partition table (https://www.linuxquestions.org/questions/linux-newbie-8/after-formatting-hard-disk-invalid-partition-table-825512/)

windstory 08-11-2010 05:09 AM

After formatting hard disk, invalid partition table
 
After formatting hard disk, "fdisk -l" shows "invalid partition table".

Quote:

[root@centos-vb backup_script]# mkfs.ext3 -j /dev/sdb
mke2fs 1.39 (29-May-2006)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
122109952 inodes, 244190646 blocks
12209532 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
7453 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@centos-vb backup_script]# fdisk -l

Disk /dev/sda: 146.8 GB, 146815737856 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 2 14 104422+ 83 Linux
/dev/sda2 15 17849 143259637+ 8e Linux LVM
/dev/sda3 * 1 1 8001 12 Compaq diagnostics

Partition table entries are not in disk order

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table
Please let me know how to fix this error.

Thanks in advance.

i92guboj 08-11-2010 05:12 AM

Quote:

Originally Posted by windstory (Post 4062766)
After formatting hard disk, "fdisk -l" shows "invalid partition table".

Not a mistery, since you are formmating a whole device, and not a partition, hence destroying everything inside that device (and that includes the partition table).

You can read it yourself on the output you posted:

Code:

[root@centos-vb backup_script]# mkfs.ext3 -j /dev/sdb
mke2fs 1.39 (29-May-2006)
/dev/sdb is entire device, not just one partition!
Proceed anyway? (y,n) y

The solution is easy: repartition the device with fdisk, then format one partition (i.e. /dev/sdb1).

hurryi 08-11-2010 05:15 AM

there is no partition on /dev/sdb
so make one
fdisk /dev/sdb #there is help
dont forget to save it after u modified the table with w

and when its done u could use mkfs.xxxx /dev/sdb1

windstory 08-11-2010 05:37 AM

Thanks for replies, I made "mount"!


All times are GMT -5. The time now is 09:37 PM.