0

I recently had a strange error while trying to partition removable usb drives. lsblk correctly reported the drive configuration. However when I tried to dd an image to the drive dd error'd, reporting the (8GB) drive as being just 2GB. gdisk reported the same result, as did KDE partitionmanager. However, I could write zeros to the drive partitions, eg /dev/sdb1. I tried another drive with exactly the same result. I ran partprobe which had no result. I also received an error at some point stating that /dev/disk/by-label/sdb did not exist. I rebooted and the error disappeared, so no harm. I was wondering if anybody knows what might have happened, and how to recover from the error without rebooting?.

gryphonB
  • 139
  • 4
  • what is the format of the USB is it Fat or Fat32 .. If I remember correctly Fat only will handle up to 2GB check the format and if its just FAT then format it as FAT32 – John Orion Dec 16 '17 at 22:48

1 Answers1

0
  • Often the kernel {is not/cannot be} updated, when the partition table of a drive is modified.

  • Sometimes it helps to run

    sudo partprobe
    

    (to fix such issues without rebooting).

  • I too have noticed that lsblk is often better than other tools to report the correct data about drives.

  • As you noticed already, rebooting is a good method to get the data about partition tables correct.

    But sometimes it is a good idea to avoid rebooting, as illustrated by the following link,

    Accidentally did dd /dev/sda

sudodus
  • 46,324
  • 5
  • 88
  • 152