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?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
grenc
Posts: 8
Joined: 2019-02-14 16:05

My PenDrive is broken?

#1 Post by grenc »

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.

User avatar
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?

#2 Post by Ardouos »

In a terminal, type:

Code: Select all

lsblk
Does it appear as a block device?
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: My PenDrive is broken?

#3 Post by pylkko »

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?

grenc
Posts: 8
Joined: 2019-02-14 16:05

Re: My PenDrive is broken?

#4 Post by grenc »

Ardouos wrote:In a terminal, type:

Code: Select all

lsblk
Does it appear as a block device?
It does show up there, yes. in case that helps:

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.

grenc
Posts: 8
Joined: 2019-02-14 16:05

Re: My PenDrive is broken?

#5 Post by grenc »

pylkko 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?
I can't mount if with GParted and I cant put anything into it. It shows up in files but I cant put anything inside

User avatar
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?

#6 Post by Head_on_a_Stick »

grenc wrote:It shows up in files but I cant put anything inside
Not sure what you mean by "files" but try this and post any errors:

Code: Select all

# mount /dev/sdb1 /mnt
# touch test.file && mv test.file /mnt
# ls /mnt # is it there?
deadbang

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: My PenDrive is broken?

#7 Post by pylkko »

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

Code: Select all

dmesg | grep -i usb
(only root can do this on debian)

can you also run the lsblk command again with the f flag?

Code: Select all

lsblk -f

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: My PenDrive is broken?

#8 Post by p.H »

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
What do you mean ? It never ceased to be a pendrive.
grenc wrote:I formatted it using that pendrive thing on windows, DISKPART.
Diskpart is not a "pendrive thing". It is a generic disk partitioning and formating tool.
grenc wrote:I also tried GParted on Debian.
Gparted cannot handle the non-standard partition table of Debian's ISO-hybrid images.
Head_on_a_Stick wrote:Not sure what you mean by "files"
I guess the OP means that the device appears as a volume in the GUI file manager.

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*

grenc
Posts: 8
Joined: 2019-02-14 16:05

Re: My PenDrive is broken?

#9 Post by grenc »

Head_on_a_Stick wrote:
grenc wrote:It shows up in files but I cant put anything inside
Not sure what you mean by "files" but try this and post any errors:

Code: 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.
idk if I did anything wrong but I got that

grenc
Posts: 8
Joined: 2019-02-14 16:05

Re: My PenDrive is broken?

#10 Post by grenc »

p.H wrote:
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
What do you mean ? It never ceased to be a pendrive.
grenc wrote:I formatted it using that pendrive thing on windows, DISKPART.
Diskpart is not a "pendrive thing". It is a generic disk partitioning and formating tool.
grenc wrote:I also tried GParted on Debian.
Gparted cannot handle the non-standard partition table of Debian's ISO-hybrid images.
Head_on_a_Stick wrote:Not sure what you mean by "files"
I guess the OP means that the device appears as a volume in the GUI file manager.

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*
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.

grenc
Posts: 8
Joined: 2019-02-14 16:05

Re: My PenDrive is broken?

#11 Post by grenc »

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

Code: Select all

dmesg | grep -i usb
(only root can do this on debian)

can you also run the lsblk command again with the f flag?

Code: Select all

lsblk -f
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:

Code: Select all

 └─sdb1 iso9660 d-live 9.6.0 gn amd64 2018-11-10-11-54-00-00 

grenc
Posts: 8
Joined: 2019-02-14 16:05

Re: My PenDrive is broken?

#12 Post by grenc »

wizard10000 wrote:The problem is the iso9660 filesystem. Use gparted to partition and format the drive.
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 thing

User avatar
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?

#13 Post by Head_on_a_Stick »

Wipe the USB stick with

Code: Select all

# apt install gdisk
# sgdisk --zap-all /dev/sdb
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.
deadbang

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: My PenDrive is broken?

#14 Post by pylkko »

└─sdb1 iso9660 d-live 9.6.0 gn amd64 2018-11-10-11-54-00-00
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.

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").

grenc
Posts: 8
Joined: 2019-02-14 16:05

Re: My PenDrive is broken?

#15 Post by grenc »

pylkko wrote:
└─sdb1 iso9660 d-live 9.6.0 gn amd64 2018-11-10-11-54-00-00
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.

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").
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"?

Post Reply