4

I used this USB to install Ubuntu on this machine (So it was a bootable USB, created with some program I can't remember), and I tried to format it using gparted. I deleted all partitions that I could, there's only one remaining, but whenever I try to create a new partition, it says:

Invalid argument during seek for write on /dev/sdb 

Also, upon opening it, it also says:

The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.

But I can simply click "Ignore" on those.Gparted seems to think that the device is 60GB large, when in reality it's 16Gb; here is the Print:

Device Info on gparted (this is after trying to create a new partition)

I have no idea what is causing this problem, I thought of simply booting in Windows to try and format through there, But now the USB doesn't even show on the "normal GUI" anymore.(I'm assuming this was due to my "all-partitions-erasal" policy earlier).

All I want is to format it to fat32, but if you could tell me what caused it I would be even more grateful.

Edit: I have the logs from gparted:

This is from trying to create a partition of 14Gb:

        GParted 0.25.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2

Create Primary Partition #1 (fat32, 13.67 GiB) on /dev/sdb  00:00:04    ( ERROR )

create empty partition  00:00:01    ( SUCCESS )

path: /dev/sdb2 (partition)
start: 1024
end: 7169023
size: 7168000 (13.67 GiB)
clear old file system signatures in /dev/sdb2  00:00:01    ( SUCCESS )

write 512.00 KiB of zeros at byte offset 0  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 67108864  00:00:00    ( SUCCESS )
write 512.00 KiB of zeros at byte offset 14679539712  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 14679998464  00:00:00    ( SUCCESS )
write 8.00 KiB of zeros at byte offset 14680055808  00:00:00    ( SUCCESS )
flush operating system cache of /dev/sdb  00:00:00    ( SUCCESS )
set partition type on /dev/sdb2  00:00:02    ( SUCCESS )

new partition type: fat32
create new fat32 file system  00:00:00    ( ERROR )

mkfs.fat -F32 -v -I -n " " /dev/sdb2  00:00:00    ( ERROR )

mkfs.fat 3.0.28 (2015-05-16)
/dev/sdb2: No such file or directory
libparted messages    ( INFO )

The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
========================================

Also, I saw somewhere that I should "Unmount" the 126KB partition, but that option is grayed out on the right click menu.

Output after re-creating bootable USB (as suggested by comments):

        GParted 0.25.0 --enable-libparted-dmraid --enable-online-resize

Libparted 3.2

Create Primary Partition #1 (ntfs, 11.72 GiB) on /dev/sdb  00:00:05    ( ERROR )

create empty partition  00:00:02    ( SUCCESS )

path: /dev/sdb2 (partition)
start: 1024
end: 6145023
size: 6144000 (11.72 GiB)
clear old file system signatures in /dev/sdb2  00:00:01    ( SUCCESS )

write 512.00 KiB of zeros at byte offset 0  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 67108864  00:00:00    ( SUCCESS )
write 512.00 KiB of zeros at byte offset 12582387712  00:00:00    ( SUCCESS )
write 4.00 KiB of zeros at byte offset 12582846464  00:00:00    ( SUCCESS )
write 8.00 KiB of zeros at byte offset 12582903808  00:00:00    ( SUCCESS )
flush operating system cache of /dev/sdb  00:00:01    ( SUCCESS )
set partition type on /dev/sdb2  00:00:02    ( SUCCESS )

new partition type: ntfs
create new ntfs file system  00:00:00    ( ERROR )

mkntfs -Q -v -F -L "" /dev/sdb2  00:00:00    ( ERROR )

Failed to access '/dev/sdb2': No such file or directory
The device doesn't exist; did you specify it correctly?
libparted messages    ( INFO )

The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
========================================

This is the output if I try to right-click format:

This partition cannot be modified because it contains a partition table; please reinitialize layout of the whole device. (udisks-error-quark, 11)

Screenshots of the info in gparted AFTER re-creating bootable USB and using gdisk to change from MRB to GPT;

NTFS, correct size, but still not working... What am I missing?

  • Use tool : mini tool partition wizard iso file... make it bootable with another pendrive and try recreating partition – minigeek Sep 22 '16 at 13:38
  • @sardapv I used Ubuntu's "Startup disk creator" to re-create the bootable USB (with Ubuntu 16.04), so I guess I can open it with the "normal GUI" and maybe format from a Windows machine, but this doesn't solve the problem 100%, just puts everything back to square one. – Jirobow Sep 22 '16 at 15:07
  • Yes u can..format it back to ntfs format – minigeek Sep 22 '16 at 15:11
  • @sardapv Sorry, I don't see how.I tried creating a new partition of 14 GB, will edit question to now include new outputs of gparted.(Still can't format from the GUI for the same reason as before) – Jirobow Sep 22 '16 at 15:34
  • Post it with screenshots – minigeek Sep 22 '16 at 15:39
7

Some of the installers use hybrid flash/DVD configurations, which then may leave random data in expected location of partition table info in MBR.

I might zero out MBR, make triple sure sdX is correct drive like sdb with parted -l note el, not 1 nor capital I.

sudo parted -l
sudo dd if=/dev/zero of=/dev/sdX bs=512 count=1 

Possibly also use fixparts or gdisk to fix backup gpt partition table at end of drive. I do use gpt for all new larger flash drives

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.