This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Disk /dev/mtdblock0 doesn't contain a valid partition table



Hi,

I'm using AM335x Linux.When I use the fdisk -l command I get the messages:

root@am335x:~# fdisk -l

Disk /dev/mtdblock0: 0 MB, 131072 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mtdblock0 doesn't contain a valid partition table

Disk /dev/mtdblock1: 0 MB, 131072 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0xffffffff

Disk /dev/mtdblock1 doesn't contain a valid partition table

Disk /dev/mtdblock2: 0 MB, 131072 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier:[ 40.804260] end_request: I/O error, dev mtdblock5, sector 0
[ 40.811248] Buffer I/O error on device mtdblock5, logical block 0
0xffffffff

D[ 40.818725] end_request: I/O error, dev mtdblock5, sector 8
[ 40.824829] Buffer I/O error on device mtdblock5, logical block 1
isk /dev/mtdblock2 doesn't contain a valid parti[ 40.834167] end_request: I/O error, dev mtdblock5, sector 0
[ 40.841186] Buffer I/O error on device mtdblock5, logical block 0
tion table

Disk /dev/mtdblock3: 0 MB, 131072 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 51[ 40.858184] end_request: I/O error, dev mtdblock5, sector 0
[ 40.864562] Buffer I/O error on device mtdblock5, logical block 0
2 = 8225280 byte[ 40.871917] end_request: I/O error, dev mtdblock5, sector 8
[ 40.878143] Buffer I/O error on device mtdblock5, logical block 1
s
Sector size (logical/physical): 512 bytes / 5[ 40.887481] end_request: I/O error, dev mtdblock5, sector 0
[ 40.894531] Buffer I/O error on device mtdblock5, logical block 0
12 bytes
Disk identifier: 0xffffffff

Disk /dev/mtdblock3 doesn't contain a valid partition table

Disk /dev/mtdblock4: 1 MB, 1966080 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0xe08ee009

Disk /dev/mtdblock4 doesn't contain a valid partition table

Disk /dev/mtdblock6: 5 MB, 5242880 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0xe1a03007

Disk /dev/mtdblock6 doesn't contain a valid partition table

Disk /dev/mtdblock7: 260 MB, 260571136 bytes
255 heads, 63 sectors/track, 31 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mtdblock7 doesn't contain a valid partition table

I want to remove the warnings.Can anyone give some advice?

Thanks 

Best Regards

John

  • There are not any partition tables as each mtd block is being used to store single images. These are being used to store MLO, U-Boot, kernel etc. From the board file for the AM335x is a listing of nand partitions.

    root@am335x-evm:~# cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00020000 00020000 "SPL"
    mtd1: 00020000 00020000 "SPL.backup1"
    mtd2: 00020000 00020000 "SPL.backup2"
    mtd3: 00020000 00020000 "SPL.backup3"
    mtd4: 001e0000 00020000 "U-Boot"
    mtd5: 00020000 00020000 "U-Boot Env"
    mtd6: 00500000 00020000 "Kernel"
    mtd7: 0f880000 00020000 "File System"

  • The warning can be removed by using the fdisk utility to put a partition on the mtd block.

  • I encounter the same issue. I use the mtdblockX as raw "partition" and don't want to put partitionn info on each part. How to remove the warning messages from fdisk -l ?

  • What is the point in removing the warning? There is nothing wrong with the output of fdisk -l.  

  • Renjith,

    I have 13 mtd partitions.  And now I have a USB stick (/dev/sda) attached to USB port.  When I run 'fdisk -l', many "Disk /dev/mtdblockX doesn't contain a valid partition table" appear.  Due to the fact that I use mtd partitions as RAW format (2 SPI FLASH, 16MB each) or UBIFS (mtd11/mtd12, NAND FLASH), I don't want the useless/boring "Disk /dev/mtdblockX doesn't contain a valid partition table" output. How can I accomplish this? 

    root@MPU-001:~# cat /proc/mtd
    dev: size erasesize name
    mtd0: 00080000 00001000 "SPL/MLO(Golden,RO)"
    mtd1: 00080000 00001000 "U-Boot (Golden,RO)"
    mtd2: 00400000 00001000 "Kernel (Golden,RO)"
    mtd3: 00080000 00001000 "U-Boot (Bank-A)"
    mtd4: 00080000 00001000 "U-Boot (Bank-B)"
    mtd5: 00080000 00001000 "U-Boot Env (Bank-A)"
    mtd6: 00080000 00001000 "U-Boot Env (Bank-B)"
    mtd7: 00400000 00001000 "Kernel (Bank-A)"
    mtd8: 00400000 00001000 "Kernel (Bank-B)"
    mtd9: 00100000 00001000 "Reserved (not used)"
    mtd10: 01000000 00001000 "RAMDISK"
    mtd11: 10000000 00020000 "UBIFS (Bank-A)"
    mtd12: 10000000 00020000 "UBIFS (Bank-B)"
    root@MPU-001:~#
    root@MPU-001:~# cat /proc/partitions
    major minor #blocks name

    31 0 512 mtdblock0
    31 1 512 mtdblock1
    31 2 4096 mtdblock2
    31 3 512 mtdblock3
    31 4 512 mtdblock4
    31 5 512 mtdblock5
    31 6 512 mtdblock6
    31 7 4096 mtdblock7
    31 8 4096 mtdblock8
    31 9 1024 mtdblock9
    31 10 16384 mtdblock10
    31 11 262144 mtdblock11
    31 12 262144 mtdblock12
    8 0 1970239 sda
    8 1 1970208 sda1

    root@MPU-001:~# fdisk -l

    Disk /dev/mtdblock0: 0 MB, 524288 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock0 doesn't contain a valid partition table

    Disk /dev/mtdblock1: 0 MB, 524288 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock1 doesn't contain a valid partition table

    Disk /dev/mtdblock2: 4 MB, 4194304 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock2 doesn't contain a valid partition table

    Disk /dev/mtdblock3: 0 MB, 524288 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock3 doesn't contain a valid partition table

    Disk /dev/mtdblock4: 0 MB, 524288 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock4 doesn't contain a valid partition table

    Disk /dev/mtdblock5: 0 MB, 524288 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock5 doesn't contain a valid partition table

    Disk /dev/mtdblock6: 0 MB, 524288 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock6 doesn't contain a valid partition table

    Disk /dev/mtdblock7: 4 MB, 4194304 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock7 doesn't contain a valid partition table

    Disk /dev/mtdblock8: 4 MB, 4194304 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock8 doesn't contain a valid partition table

    Disk /dev/mtdblock9: 1 MB, 1048576 bytes
    255 heads, 63 sectors/track, 0 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock9 doesn't contain a valid partition table

    Disk /dev/mtdblock10: 16 MB, 16777216 bytes
    255 heads, 63 sectors/track, 2 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock10 doesn't contain a valid partition table

    Disk /dev/mtdblock11: 268 MB, 268435456 bytes
    255 heads, 63 sectors/track, 32 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock11 doesn't contain a valid partition table

    Disk /dev/mtdblock12: 268 MB, 268435456 bytes
    255 heads, 63 sectors/track, 32 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Disk /dev/mtdblock12 doesn't contain a valid partition table

    Disk /dev/sda: 2017 MB, 2017525248 bytes
    255 heads, 63 sectors/track, 245 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 246 1970208 6 FAT16
    Partition 1 has different physical/logical endings:
    phys=(244, 254, 63) logical=(245, 72, 18)

  • Frisky,

    I don't have a proper solution for this. But still, have you tried different options in drivers/mtd/Kconfig related to partitions? Another way is to remove the list of partitions from the board file, where you declare partitions. Just list down only the partition that you want to use. Last but not recommended way out is to modify the fdisk implementation to ignore the unwanted partitions.

  • Hi Renjith,

    I can't find any option in config file and i would like not change fdisk code:(

    I found that my /sbin/fdisk  is from busybox. Then I built fdisk from util-linux-2.22 and run it, everything is ok.  Thank you!

    root@MPU-001:~# fdisk -l

    Disk /dev/mtdblock0: 0 MB, 524288 bytes, 1024 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock1: 0 MB, 524288 bytes, 1024 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock2: 4 MB, 4194304 bytes, 8192 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock3: 0 MB, 524288 bytes, 1024 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock4: 0 MB, 524288 bytes, 1024 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock5: 0 MB, 524288 bytes, 1024 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock6: 0 MB, 524288 bytes, 1024 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock7: 4 MB, 4194304 bytes, 8192 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock8: 4 MB, 4194304 bytes, 8192 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock9: 1 MB, 1048576 bytes, 2048 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock10: 16 MB, 16777216 bytes, 32768 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock11: 268 MB, 268435456 bytes, 524288 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/mtdblock12: 268 MB, 268435456 bytes, 524288 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes


    Disk /dev/sda: 2017 MB, 2017525248 bytes, 3940479 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x0ba248ac

    Device Boot Start End Blocks Id System
    /dev/sda1 * 63 3940478 1970208 6 FAT16