Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
My PenDrive is broken?
My PenDrive is broken?
I recently used my PenDrive to install Debian (with rufus, on windows) and instead of looking for something to make it into a pendrive again, I formatted it using that pendrive thing on windows, DISKPART. Now it doesn't work! How do I fix it? I also tried GParted on Debian.
- Ardouos
- Posts: 1077
- Joined: 2013-11-03 00:30
- Location: Elicoor II
- Has thanked: 1 time
- Been thanked: 4 times
Re: My PenDrive is broken?
In a terminal, type:
Does it appear as a block device?
Code: Select all
lsblk
There is only one Debian | Do not break Debian | Stability and Debian | Backports
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀
Re: My PenDrive is broken?
Most likely you partitioned or formatted it somehow wrong and it is fixable. Please, in addition to showing the output rrequested above, discribe what you mean with "does not work ". How? In windows? In linux? Cannot accept data? Cannot read from it? What?
Re: My PenDrive is broken?
It does show up there, yes. in case that helps:Ardouos wrote:In a terminal, type:
Does it appear as a block device?Code: Select all
lsblk
Code: Select all
└─sdb1 8:17 1 14.7G 0 part
Last edited by grenc on 2019-02-14 18:51, edited 1 time in total.
Re: My PenDrive is broken?
I can't mount if with GParted and I cant put anything into it. It shows up in files but I cant put anything insidepylkko wrote:Most likely you partitioned or formatted it somehow wrong and it is fixable. Please, in addition to showing the output rrequested above, discribe what you mean with "does not work ". How? In windows? In linux? Cannot accept data? Cannot read from it? What?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: My PenDrive is broken?
Not sure what you mean by "files" but try this and post any errors:grenc wrote:It shows up in files but I cant put anything inside
Code: Select all
# mount /dev/sdb1 /mnt
# touch test.file && mv test.file /mnt
# ls /mnt # is it there?
deadbang
Re: My PenDrive is broken?
with "files" I presume you mean the standard Gnome desktop file manager (apparently not any more called "nautilus" but "gnome files".
It might be that your drive has either gone into a read only mode or that it mounted in such a state. You should read any possible errors with respect to it in dmesg or journalctl.
something like
(only root can do this on debian)
can you also run the lsblk command again with the f flag?
It might be that your drive has either gone into a read only mode or that it mounted in such a state. You should read any possible errors with respect to it in dmesg or journalctl.
something like
Code: Select all
dmesg | grep -i usb
can you also run the lsblk command again with the f flag?
Code: Select all
lsblk -f
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: My PenDrive is broken?
What do you mean ? It never ceased to be a pendrive.grenc wrote:I recently used my PenDrive to install Debian (with rufus, on windows) and instead of looking for something to make it into a pendrive again
Diskpart is not a "pendrive thing". It is a generic disk partitioning and formating tool.grenc wrote:I formatted it using that pendrive thing on windows, DISKPART.
Gparted cannot handle the non-standard partition table of Debian's ISO-hybrid images.grenc wrote:I also tried GParted on Debian.
I guess the OP means that the device appears as a volume in the GUI file manager.Head_on_a_Stick wrote:Not sure what you mean by "files"
If I were the OP I would first identify meta-data on the drive with
Code: Select all
blkid /dev/sdb*
file -sk /dev/sdb*
Re: My PenDrive is broken?
Head_on_a_Stick wrote:Not sure what you mean by "files" but try this and post any errors:grenc wrote:It shows up in files but I cant put anything insideCode: Select all
# mount /dev/sdb1 /mnt # touch test.file && mv test.file /mnt # ls /mnt # is it there?
Code: Select all
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
Re: My PenDrive is broken?
I did mean that. The commands you sent ran with no errors so I guess it's a success? By "turn it into a pendrive again" I meant be able to use all of it's space for something other than installing Debian, again.p.H wrote:What do you mean ? It never ceased to be a pendrive.grenc wrote:I recently used my PenDrive to install Debian (with rufus, on windows) and instead of looking for something to make it into a pendrive again
Diskpart is not a "pendrive thing". It is a generic disk partitioning and formating tool.grenc wrote:I formatted it using that pendrive thing on windows, DISKPART.
Gparted cannot handle the non-standard partition table of Debian's ISO-hybrid images.grenc wrote:I also tried GParted on Debian.
I guess the OP means that the device appears as a volume in the GUI file manager.Head_on_a_Stick wrote:Not sure what you mean by "files"
If I were the OP I would first identify meta-data on the drive withCode: Select all
blkid /dev/sdb* file -sk /dev/sdb*
Re: My PenDrive is broken?
For command 1, I got some really long thing and it did detect a "USB Mass Storage" which was my pendrive. for the second command I got this:pylkko wrote:with "files" I presume you mean the standard Gnome desktop file manager (apparently not any more called "nautilus" but "gnome files".
It might be that your drive has either gone into a read only mode or that it mounted in such a state. You should read any possible errors with respect to it in dmesg or journalctl.
something like(only root can do this on debian)Code: Select all
dmesg | grep -i usb
can you also run the lsblk command again with the f flag?
Code: Select all
lsblk -f
Code: Select all
└─sdb1 iso9660 d-live 9.6.0 gn amd64 2018-11-10-11-54-00-00
Re: My PenDrive is broken?
h-how? I tried gparted but I can never do anything decent with it, Usually I just make a fat32 partition and cant mount the damn thingwizard10000 wrote:The problem is the iso9660 filesystem. Use gparted to partition and format the drive.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: My PenDrive is broken?
Wipe the USB stick with
Be very careful typing /dev/sdb though, if you get it wrong you'll wipe your system's partition table. And check it is assigned to /dev/sdb before running the command.
Code: Select all
# apt install gdisk
# sgdisk --zap-all /dev/sdb
deadbang
Re: My PenDrive is broken?
The iso9660 is a read-only file system, which most likely came from a disk image that you put on the stick when you made a bootable live operating system drive. What probably happened is that you failed to reformat the drive using diskpart some how.└─sdb1 iso9660 d-live 9.6.0 gn amd64 2018-11-10-11-54-00-00
If you want to use the stick as a storage for files under windows, you need to format the drive and put there a Fat32 fs. In Gnome you can uses "disks" to do this. Make sure you select the correct drive from the left panel (it shows all the drive and their sizes, most likely your pendrive has a smaller size than the harddrive on your computer, and it might say something like "generic flash disk" under it... but make sure it is the correct one) Then from the upper menu (three bars on top of each other) select "format disk"). Then select "don't overwrite" and "compatible with all systems and devices (MBR/DOS). This will write a partition table (a sort of index of what is on the disk that Windows/Linux/MacOS can all understand). After that make sure that the entire space on the disk is filled with a Fat32 partition (in the graph representing the drive below, in blue) if not select the cogwheel under it and select "create partition" and make sure it is "Fat32").
Re: My PenDrive is broken?
Thank you so much, my friend. I knew it had something to do with the "iso" but I didn't know how to fix it! Is there some way to give you fake internet points in this site or should I leave with just my sincere "thank you"?pylkko wrote:The iso9660 is a read-only file system, which most likely came from a disk image that you put on the stick when you made a bootable live operating system drive. What probably happened is that you failed to reformat the drive using diskpart some how.└─sdb1 iso9660 d-live 9.6.0 gn amd64 2018-11-10-11-54-00-00
If you want to use the stick as a storage for files under windows, you need to format the drive and put there a Fat32 fs. In Gnome you can uses "disks" to do this. Make sure you select the correct drive from the left panel (it shows all the drive and their sizes, most likely your pendrive has a smaller size than the harddrive on your computer, and it might say something like "generic flash disk" under it... but make sure it is the correct one) Then from the upper menu (three bars on top of each other) select "format disk"). Then select "don't overwrite" and "compatible with all systems and devices (MBR/DOS). This will write a partition table (a sort of index of what is on the disk that Windows/Linux/MacOS can all understand). After that make sure that the entire space on the disk is filled with a Fat32 partition (in the graph representing the drive below, in blue) if not select the cogwheel under it and select "create partition" and make sure it is "Fat32").