You are not logged in.

#1 2019-06-16 18:30:01

ampe00
Member
Registered: 2019-06-16
Posts: 8

dd shrank my drive

Hi, I was using dd the same standard way I have in the past to create bootable drives from .iso files, like so:

# dd if=Win10_1903_V1_English_x64.iso of=/dev/sdb status=progress oflag=sync

Never failed me, works smoothly, it's my go to option but this time something terrible has happened. I have a 16GB drive trying to create a win10 installation drive because my SSD died recently after less than 2 years (don't buy sandisk), and at 2GB worth of copying it says the drive is full, it's an empty drive with 16GB capacity so I 'lsblk' it reports what I expect (16gb) with 2 partitions (200M & 14.6G) but I inspect with fdisk, gparted etc. they all see 2GB maximum capacity and now the drive gets mounted twice in thunar with the 'lsblk' capacity, so where do I go from here, I just want to reset the drive to its true 16GB and rip an .iso onto it which is proving more difficult than it should be due to the confusion, my machine seems just as confused about this as I do. I haven't had this problem with dd in the past. Thanks.

Last edited by ampe00 (2019-06-16 18:41:02)

Offline

#2 2019-06-16 19:05:20

seth
Member
Registered: 2012-09-03
Posts: 51,225

Re: dd shrank my drive

Post the actual output of

uname -a
lsblk -f
fdisk -l /dev/sdb # assuming it's still sdb

Also please your punctuation - you need more full stops.

Online

#3 2019-06-16 19:15:43

ampe00
Member
Registered: 2019-06-16
Posts: 8

Re: dd shrank my drive

seth wrote:

Post the actual output of

uname -a
lsblk -f
fdisk -l /dev/sdb # assuming it's still sdb

Also please your punctuation - you need more full stops.

uname -a:

Linux lenovo 5.1.9-arch1-1-ARCH #1 SMP PREEMPT Tue Jun 11 16:18:09 UTC 2019 x86_64 GNU/Linux

lsblk -f:

NAME   FSTYPE LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                     
├─sda1 vfat         4071-81B3                             510.8M     0% /boot/efi
├─sda2 ext4         100eb1f8-593f-489d-8c3e-35386d602fe0    9.7G    45% /
├─sda3 swap         38e2c4f0-d67a-4a3b-8f25-3abc591fe00e                [SWAP]
└─sda4 ext4         d2ed4b00-2dc9-44c6-b083-a929362178d2  216.9G    14% /home
sdb                                                                     
├─sdb1 vfat   USBA  6AB0-6F18                                           
└─sdb2 ntfs   USBA  D05A79D65A79BA34                                    

fdisk -l /dev/sdb:

Disk /dev/sdb: 1.9 GiB, 1998581760 bytes, 3903480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 61A0BCDB-9463-4A0A-8AFE-69DA02C461DB

This output is hilarious, I have no idea how it happened. Thanks for the help.

a normal lsblk (just to be clear about the capacity):

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 298.1G  0 disk 
├─sda1   8:1    0   512M  0 part /boot/efi
├─sda2   8:2    0    20G  0 part /
├─sda3   8:3    0     4G  0 part [SWAP]
└─sda4   8:4    0 273.6G  0 part /home
sdb      8:16   1  14.9G  0 disk 
├─sdb1   8:17   1   200M  0 part 
└─sdb2   8:18   1  14.6G  0 part 

And finally the .iso file is 4.6gb

Last edited by ampe00 (2019-06-16 19:44:53)

Offline

#4 2019-06-16 20:15:16

seth
Member
Registered: 2012-09-03
Posts: 51,225

Re: dd shrank my drive

Defective partition table, nuke it ("dd if=/dev/zero of=/dev/sdb count=10") and re-check (partprobe, re-plug the drive or reboot in doubt)

Is that a usb key (or SD card)?
If not and/or it (still) has S.M.A.R.T. capabilities, it's time for a check. If it's a dumb usb key, try to fully dd it w/ /dev/zero or /dev/urandom and watch "dmesg -w" for I/O errors…
https://wiki.archlinux.org/index.php/SMART

Online

Board footer

Powered by FluxBB