Unknown partition table error

Posted in Linux/Unix/BSD -

I have a Linux machine which I use to burn CDs and DVDs for my Linux CD Mall website. It has two hard drives in it (one for the operating system etc and the other to store the CD and DVD ISO files) and 6 DVD recorders. I needed to copy some files from a machine that had been part of a software RAID setup so removed the DVD drive at /dev/hdh and put the hard drive in its place. After I'd finished copying what I needed from it, I decided I'd use that drive in place of the hard drive containing all the ISO images because it had more room on it, and my existing drive was a bit low on space.

I  re-partitioned the /dev/hdh hard drive by removing all existing partitions and creating a single primary parition which takes up the entire disk. I formatted this partition as ext3, mounted it at /mnt/hdh and copied all the ISO images across from the exsting ISO drive.

Once everything was copied over and the files verified, I shut the machine down, took out the hard drive currently plugged in as the primary slave and plugged this new drive into its place.

To my surprise the disk wouldn't mount automatically, despite having checked the /etc/fstab settings before rebooting, so I tried to mount it manually:

# mount /dev/hdb1 /iso
mount: special device /dev/hdb1 does not exist

That's an odd error. It should exist, so I checked dmesg:

# dmesg | grep hdb
    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:DMA, hdb:DMA
hdb: ST3300622A, ATA DISK drive
hdb: max request size: 1024KiB
hdb: 586072368 sectors (300069 MB) w/16384KiB Cache, CHS=36481/255/63, UDMA(33)
hdb: cache flushes supported
 hdb: unknown partition table

Even stranger, it doesn't seem to like the hard drive at all. I decided I'd better try checking fdisk:

# fdisk /dev/hdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 36481.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/hdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help):

Naturally I didn't dare do anything that might destroy the data on the hard drive, so I quickly quit out of fdisk.

After a lot of messing around, I tried mounting it without the partition number like so:

mount /dev/hdb /iso

and it worked just fine. I'm not sure what exactly has gone wrong with this disk, because there's obviously something wrong with the partition table, but at least it's still possible to mount, you just do it with eg /dev/hdb insetad of /dev/hdb1




Comments