Ubuntu – “physical block size is 2048 bytes, but Linux says it is 512” when formatting USB – How to create a bootable USB without this error

filesystemgpartedpartitioning

I was using:

dd  if=/path/to/my/ubuntuiso/ubuntu.iso  of=/dev/sdb1  bs=4M  &&  sync

In order to create bootable Ubuntu USB drives on older Ubuntu versions. It was working perfectly. Sometimes I used the Startup Disk Creator program, which worked well.

But when I use the same methods on Ubuntu 16.04 LTS, I get some warnings while formatting it afterwards.

The installation media works as expected, but when I try to format that USB stick after my work is done, I get the following warning :

enter image description here

The partitioning of that Pendrive looks strange :

enter image description here

And it also shows my 16GB pendrive as 64GB.

After struggling a lot with Gparted, I will somehow format it. But Why is it happening like this ?? Is there any better methods of creating bootable Ubuntu in 16.04 ?

EDIT : there is a related question here. But my question is not about how to format it properly. My question is "How to create a bootable USB without that errors." & "Wht are the causes of that error"

Best Answer

A command-line method to make a live USB for UEFI systems

Please note: this deletes all data on the target device.

Install prerequisite:

sudo apt-get install p7zip-full

Assuming the target USB is at /dev/sdb

(please check first with lsblk or gnome-disks or sudo fdisk -l and be sure you know what you are formatting)

Make sure the device has no mounted filesystem and unmount it if necessary, for example:

udisksctl unmount -b /dev/sdb1

Destroy existing partition table:

sudo sgdisk --zap-all /dev/sdb

Create new GPT:

sudo sgdisk --new=1:0:0 --typecode=1:ef00 /dev/sdb

Format as FAT32:

sudo mkfs.vfat -F32 /dev/sdb1

Check it:

sudo fdisk -l /dev/sdb

Should output something like:

Device     Start      End  Sectors  Size Type
/dev/sdb1   2048 15663070 15661023  7.5G EFI System

Mount the drive and extract iso onto it, replacing 'name-of-iso' with the actual filename of the iso you downloaded earlier

sudo mount -t vfat /dev/sdb1 /mnt
sudo 7z x name-of-iso -o/mnt/

Unmount

sudo umount /mnt

Now reboot & enjoy Ubuntu ^_^

(Here's where I originally learned to do this.)

Related Question