You are not logged in.

#1 2016-12-03 14:03:39

kama
Member
Registered: 2016-11-25
Posts: 10

[SOLVED] usb stick size reduced to 10 mb after dd

Hello.
I've recently updated BIOS using this tuorial. I've created custom image and made a bootable pendrive using this:

sudo dd if=freedos.img of=/dev/sdb

Now when I try to:

dd if=KaOS-2016.11-x86_64.iso of=/dev/sdb bs=4M; sync

I get:

dd: error writing '/dev/sdb': No space left on device
3+0 records in
2+0 records out
10485760 bytes (10 MB) copied, 0.0105674 s, 992 MB/s

I tried to fix it using GParted but I can't change the partition size over 10 Mb no matter what i do. It was 16Gb before that. What can I do with it?

Last edited by kama (2016-12-03 19:44:09)

Offline

#2 2016-12-03 14:20:12

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] usb stick size reduced to 10 mb after dd

Try:

sudo hdparm -r 0 /dev/sdb

If that doesn't change the situation, plug in the stick and post the output of:

sudo parted -l

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2016-12-03 14:30:51

kama
Member
Registered: 2016-11-25
Posts: 10

Re: [SOLVED] usb stick size reduced to 10 mb after dd

sudo hdparm -r 0 /dev/sdb

/dev/sdb:
 setting readonly to 0 (off)
 BLKROSET failed: Inappropriate ioctl for device
 BLKROGET failed: Inappropriate ioctl for device
sudo parted -l
Model: ATA CT240BX200SSD1 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  15,7GB  15,7GB  primary   ext4         boot
 2      15,7GB  230GB   214GB   extended
 5      15,7GB  230GB   214GB   logical   ext4


Error: Can't have a partition outside the disk!
Ignore/Cancel? i                                                          
Model:  (file)
Disk /dev/sdb: 10,5MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start  End     Size    Type     File system  Flags
 2      113kB  32,6MB  32,5MB  primary  fat16        esp

Thanks for a quick response! wink

Last edited by kama (2016-12-03 14:31:29)

Offline

#4 2016-12-03 16:31:59

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] usb stick size reduced to 10 mb after dd


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#5 2016-12-03 17:39:38

kama
Member
Registered: 2016-11-25
Posts: 10

Re: [SOLVED] usb stick size reduced to 10 mb after dd

sudo fdisk -l -u /dev/sdb

Disk /dev/sdb: 10 MiB, 10485760 bytes, 20480 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: dos
Disk identifier: 0x00000000
Model:  (file)
Disk /dev/sdb: 10,5MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      57,3kB  15,5GB  15,5GB  primary               lba

Almost there! The full result of:

sudo sfdisk -C 1889 -H 255 -S 63 --force /dev/sdb < sdb-backup.txt

is:

sfdisk: Warning: /dev/sdb is not a block device
sfdisk: Disk /dev/sdb: cannot get geometry

Disk /dev/sdb: 1889 cylinders, 255 heads, 63 sectors/track
Old situation:
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1   *      0     226-    227-   1822464    0  Empty
		end: (c,h,s) expected (226,225,63) found (1016,111,32)
/dev/sdb2          0+      3-      4-     31744   ef  EFI (FAT-12/16/32)
		start: (c,h,s) expected (0,3,32) found (1023,254,63)
		end: (c,h,s) expected (3,246,15) found (1023,254,63)
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
sfdisk: Warning: given size (30361488) exceeds max allowable size (20368)
New situation:
Units: sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/sdb1           112  30361599   30361488   c  W95 FAT32 (LBA)
/dev/sdb2             0         -          0   0  Empty
/dev/sdb3             0         -          0   0  Empty
/dev/sdb4             0         -          0   0  Empty
sfdisk: Warning: partition 1 extends past end of disk
Successfully wrote the new partition table


sfdisk: If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)

Offline

#6 2016-12-03 18:34:06

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] usb stick size reduced to 10 mb after dd

Has it worked then?

Do you need to wipe the MBR?

sudo dd if=/dev/zero of=/dev/sdb bs=512 count=1

“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#7 2016-12-03 19:43:43

kama
Member
Registered: 2016-11-25
Posts: 10

Re: [SOLVED] usb stick size reduced to 10 mb after dd

For some magical reason it has worked now. I could've sword I wiped out the MBR many times using this command, testdisk and whatnot. Tt's solved. Sorry for making so many topics about very basic things. Thank you.

Offline

Board footer

Powered by FluxBB