LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-09-2020, 03:15 PM   #1
Allen_B
Member
 
Registered: Nov 2020
Location: Australia
Distribution: Debian
Posts: 55

Rep: Reputation: 1
Unbricking a usb flash drive after dd an iso


After putting an install image onto a drive, there is no space in the filesystem for files. Later, trying to put another larger iso image onto the same drive shows insufficient space on the entire drive. However the drive itself is much larger than the image files.

The drives become locked at the smaller capacity of the iso image. How can I reset them?

Last edited by Allen_B; 11-09-2020 at 03:18 PM.
 
Old 11-09-2020, 04:35 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,955
Blog Entries: 13

Rep: Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986
A USB drive does not "brick", you seem to have tried to write data to it which exceeds it's size. As far as the situation where the drive now matches the iso file size, you can expand the partitions.

Note that if a drive says it is 4 gig, that's not a guarantee, so if you have a 4 gig image, it may exceed the drive available space.

Perhaps you can share the sizes of the drive and the files you are trying to write to it.

Also please share the commands or application you're using to write this drive.

Note also that you can use partition utilities like fdisk and gparted to inspect and clear, plus setup drive partitions, including adjusting their sizes.

More information is needed to be able to help you further.

Last edited by rtmistler; 11-09-2020 at 04:36 PM.
 
Old 11-09-2020, 05:12 PM   #3
Allen_B
Member
 
Registered: Nov 2020
Location: Australia
Distribution: Debian
Posts: 55

Original Poster
Rep: Reputation: 1
Ok. I'm using 16GB drives. The image files are typically no larger than 4GB. dd if=distro.iso of=/dev/sdb bs=4M
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-11-10 10-08-19.png
Views:	12
Size:	70.2 KB
ID:	34540   Click image for larger version

Name:	Screenshot from 2020-11-10 09-59-50.png
Views:	12
Size:	39.7 KB
ID:	34541   Click image for larger version

Name:	Screenshot from 2020-11-10 10-00-43.png
Views:	12
Size:	78.5 KB
ID:	34542  
 
Old 11-09-2020, 05:21 PM   #4
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,975

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Use gparted to resize the partition to the size of the drive.
 
2 members found this post helpful.
Old 11-09-2020, 05:43 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,799

Rep: Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333Reputation: 6333
The install image is a hybrid ISO i.e. ISO9660 filesystem which is basically a CD/DVD that can run from a USB drive. By definition an ISO9660 filesystem is read only. Since the flash drive is basically a DVD image it will look exactly like a real optical drive with the same size.

To "restore" the flash drive you need to use gparted or any partition tool to delete the partition table and create a new one.

To add files to the image it needs to be remastered.

https://wiki.debian.org/DebianInstaller/Modify/CD

Last edited by michaelk; 11-09-2020 at 05:45 PM.
 
1 members found this post helpful.
Old 11-09-2020, 05:52 PM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,955
Blog Entries: 13

Rep: Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986Reputation: 4986
Does the result boot? If so, use gparted to expand that partition to the max size. Need help with that?
 
Old 11-09-2020, 06:13 PM   #7
Allen_B
Member
 
Registered: Nov 2020
Location: Australia
Distribution: Debian
Posts: 55

Original Poster
Rep: Reputation: 1
Ok, I've succeeded in re-partitioning (and theorising how I got it into my head that this wouldn't work).

Adding install files to the image is interesting, but maybe another time.. I'm looking at using the repositories.
 
1 members found this post helpful.
Old 11-09-2020, 07:51 PM   #8
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quote:
Originally Posted by Allen_B View Post
Ok, I've succeeded in re-partitioning (and theorising how I got it into my head that this wouldn't work).

Adding install files to the image is interesting, but maybe another time.. I'm looking at using the repositories.
One thing to keep in mind with dd -- The output file will always be the exact copy of the input, complete with partition table if appropriate; and regardless of the physical details of the destination.
 
Old 11-09-2020, 09:56 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,361

Rep: Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692Reputation: 3692
"After putting an install image onto a drive, there is no space in the filesystem for files."
Yes, typically on first review. However the remaining space could be used.

If a new iso using dd failed and then gparted works it could be some oddity of the drive/controller/locked geometry??

I've seen flash drives where you have to play with them a bit with other tools.

Flash drives seem to suffer in that they don't always work like a hard drive might.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cloning bootable USB flash drive onto larger flash drive - best method? cilbuper Linux - General 5 02-26-2014 09:51 AM
[SOLVED] Installing linux .iso without dvd disk drive from flash drive on laptop. How? LinuxPadawan1230 Linux - Laptop and Netbook 10 05-30-2012 01:14 PM
[SOLVED] If I dd copy a bootable usb drive to an iso will the iso be bootable? mgallatin Linux - Software 5 03-23-2011 04:46 PM
FLASH FLASH XP Home and Samba Fix FLASH FLASH zollodav Linux - Networking 1 02-19-2006 01:16 AM
Does anyone Know how to open either .iso.rz or these .iso.xdelta,.iso.bz2,.iso.lzma?? maximalred Debian 5 06-09-2004 06:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration