Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Exclamation fdisk warning: Re-reading the partition table failed with error 22: Invalid argument.


    Hi,

    I am preparing sdcard as my boot device to some another platform. For that I made a partition using fdisk.

    sudo fdisk /dev/sdd1

    Command (m for help): o

    Building a new DOS disklabel with disk identifier 0x3ea88d86.
    Changes will remain in memory only, until you decide to write them.
    After that, of course, the previous content won't be recoverable.
    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

    Command (m for help): x
    Expert command (m for help): h
    Number of heads (1-256, default 4): 255

    Expert command (m for help): s
    Number of sectors (1-63, default 62): 63
    Warning: setting sector offset for DOS compatiblity

    Expert command (m for help): c
    Number of cylinders (1-1048576, default 1015): 240

    Now I am creating a bootable 64MB FAT partition and a Linux partition to fill the rest of the space.

    Expert command (m for help): r
    Command (m for help): n
    Command action e extended p primary partition (1-4) p
    Partition number (1-4): 1
    First cylinder (1-y, default 1): 1
    Last cylinder or +size or +sizeM or +sizeK (x-y, default y): +64M
    Command (m for help): a
    Partition number (1-4): 1
    Command (m for help): t Selected partition 1 Hex code (type L to list codes): c Changed system type of partition 1 to c (W95 FAT32 (LBA))

    Command (m for help): n
    Command action e extended p primary partition (1-4) p
    Partition number (1-4): 2
    First cylinder (x-y, default x): <Press enter for default>
    Using default value x
    Last cylinder or +size or +sizeM or +sizeK (x-y, default y): <Press enter for default> Using default value y

    Committing the partition changes to the card

    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.

    WARNING: Re-reading the partition table failed with error 22: Invalid argument.
    The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks.

    I reboot the system as well, but not make any difference.

    When I am doing again to check -
    sudo fdisk /dev/sdd1

    Command (m for help): p

    Disk /dev/sdd1: 1977 MB, 1977545216 bytes
    255 heads, 63 sectors/track, 240 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x23f5ecb3

    Device Boot Start End Blocks Id System

    /dev/sdd1p1 * 1 9 72261 c W95 FAT32 (LBA)
    /dev/sdd1p2 10 240 1855507+ 83 Linux

    but partition table is not altered yet. Could anyone of you please tell me, what is the wrong here.

    ls /dev/sdd*

    /dev/sdd /dev/sdd1


    Thanks.

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    878
    sudo fdisk /dev/sdd1
    You want to open the disk sdd, not partition sdd1.

  3. #3
    Quote Originally Posted by Segfault View Post
    You want to open the disk sdd, not partition sdd1.
    oh yes, correct. Problem solved

    Thanks a lot.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •