GNU bug report logs - #26214
parted miscalculates size of USB disk that has been written a raw ISO image

Previous Next

Package: parted;

Reported by: Bjørn Forsman <bjorn.forsman <at> gmail.com>

Date: Wed, 22 Mar 2017 08:29:02 UTC

Severity: normal

Merged with 25233

To reply to this bug, email your comments to 26214 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#26214; Package parted. (Wed, 22 Mar 2017 08:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bjørn Forsman <bjorn.forsman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Wed, 22 Mar 2017 08:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bjørn Forsman <bjorn.forsman <at> gmail.com>
To: bug-parted <at> gnu.org
Subject: parted miscalculates size of USB disk that has been written a raw ISO
 image
Date: Wed, 22 Mar 2017 09:28:23 +0100
Hi parted developers,

After having written an ISO image to my USB disk, parted gets really
confused. The USB disk is 64 GB, but parted thinks it's 257 GB! And
worse, when I try to reset the disk with "mklabel gpt" it throws
errors.

This issue is very much related to
http://lists.gnu.org/archive/html/bug-parted/2016-12/msg00016.html.

You can find the log of my parted session below my signature.

-- 
Best regards,
Bjørn Forsman


$ sudo dd if=ubuntu.iso of=/dev/sdb bs=1M

$ sudo parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Warning: The driver descriptor says the physical block size is 2048
bytes, but Linux says it is 512 bytes.
Ignore/Cancel? I
Model: Samsung Flash Drive (scsi)
Disk /dev/sdb: 257GB
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags:

Number  Start   End     Size    File system  Name   Flags
 1      2048B   6143B   4096B                Apple
 2      1479MB  1481MB  2425kB               EFI

(parted) mklabel gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all
data on this disk will be lost. Do you want to continue?
Yes/No? y
Error: Invalid argument during seek for write on /dev/sdb
Retry/Ignore/Cancel? I
Error: Invalid argument during seek for write on /dev/sdb
Retry/Ignore/Cancel? ^C
(parted) q

$ sudo parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Error: /dev/sdb: unrecognised disk label
Model: Samsung Flash Drive (scsi)
Disk /dev/sdb: 64.2GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
(parted)

So in the end it seemed like parted managed to reset the drive, but
why make it so difficult?




Merged 25233 26214. Request was from Phil Susi <psusi <at> ubuntu.com> to control <at> debbugs.gnu.org. (Wed, 19 Apr 2017 13:13:01 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 59 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.