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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-09-2020, 03:15 PM
|
#1
|
Member
Registered: Nov 2020
Location: Australia
Distribution: Debian
Posts: 55
Rep:
|
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.
|
|
|
11-09-2020, 04:35 PM
|
#2
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,955
|
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.
|
|
|
11-09-2020, 05:12 PM
|
#3
|
Member
Registered: Nov 2020
Location: Australia
Distribution: Debian
Posts: 55
Original Poster
Rep:
|
Ok. I'm using 16GB drives. The image files are typically no larger than 4GB. dd if=distro.iso of=/dev/sdb bs=4M
|
|
|
11-09-2020, 05:21 PM
|
#4
|
Senior Member
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,975
|
Use gparted to resize the partition to the size of the drive.
|
|
2 members found this post helpful.
|
11-09-2020, 05:43 PM
|
#5
|
Moderator
Registered: Aug 2002
Posts: 26,799
|
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.
|
11-09-2020, 05:52 PM
|
#6
|
Moderator
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,955
|
Does the result boot? If so, use gparted to expand that partition to the max size. Need help with that?
|
|
|
11-09-2020, 06:13 PM
|
#7
|
Member
Registered: Nov 2020
Location: Australia
Distribution: Debian
Posts: 55
Original Poster
Rep:
|
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.
|
11-09-2020, 07:51 PM
|
#8
|
Senior Member
Registered: Aug 2016
Posts: 3,345
|
Quote:
Originally Posted by Allen_B
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.
|
|
|
11-09-2020, 09:56 PM
|
#9
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
"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.
|
All times are GMT -5. The time now is 02:45 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|