Bug 498765 - Refuses to reformat pendrive and doesn't say why
Summary: Refuses to reformat pendrive and doesn't say why
Status: REPORTED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-16 21:14 UTC by php4fan
Modified: 2025-01-16 22:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
error screenshot (63.38 KB, image/png)
2025-01-16 21:14 UTC, php4fan
Details
error when opening in Partition Manager (64.46 KB, image/png)
2025-01-16 21:24 UTC, php4fan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description php4fan 2025-01-16 21:14:22 UTC
Created attachment 177436 [details]
error screenshot

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY


STEPS TO REPRODUCE
1. Insert a USB pendrive which seems to contain a live Manjaro installation/installer
2. open it in Partition Manager
3. Create a new partition table
3. Create a NTFS partition occupying all the space
4. Apply

OBSERVED RESULT
It gives an error. Under "details" it says this, which basically only says "error":
```
Create a new partition table (type: gpt) on ‘/dev/sdb’ 
Job: Create new partition table on device ‘/dev/sdb’ 
Command: sfdisk --wipe=always /dev/sdb 
Create new partition table on device ‘/dev/sdb’: Error
Create a new partition table (type: gpt) on ‘/dev/sdb’: Error
```

I have no idea if there's anything actually wrong with the pendrive justifying the error, but the fact that the only information under "Details" is literally "Error" is insulting.

EXPECTED RESULT
should explain in detail what's wrong; and it's pretty likely that there's no good reason for this to work in the first place.


SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.1
Kernel Version: 6.6.65-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i7-1255U
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Vivobook_ASUSLaptop X1502ZA_F1502ZA
System Version: 1.0
Comment 1 php4fan 2025-01-16 21:24:41 UTC
Created attachment 177438 [details]
error when opening in Partition Manager

There's also this error that shows up every time I open the pendrive in Partition Manager, and also after the failed attempt to reformat it.
At least here it says "unrecognized partition 'sdb1'" which is slightly better than "Error", but still way too vague. What do you mean "unrecognized partition 'sdb1'"? If you can't recognize it, where did you get the name from? If I had asked you to do something on a partition "xxx", and there was no such partition, then the message "unrecognized partition "xxx" would make sense. But I haven't brought up partition sdb1, you have. Does it mean that there is a partition called sdb1 of a type you can't recognize? If so, it should say something like "Partition sdb1 is of an unknown type" or "Unable to determine the type of partition sdb1" or whatever. If the partition table lists a partition with that name but it cannot be found at the place where it's expected to be, then it should say something like "..." well, what I've just said.
Comment 2 php4fan 2025-01-16 21:28:52 UTC
BTW when I mount this pendrive (through the Disks and Devices tray-area widget), I can see the folders and files, but I cannot delete or write into them (which is why I'm trying to reformat it in the first place). It seems to get mounted readonly, I don't know why. I don't know if that's because of the same issue that Partition Manager encounters.
Comment 3 Andrius Štikonas 2025-01-16 22:16:07 UTC
What happens if you run sudo sfdisk --wipe=always /dev/sdb from the command line?

Also does dmesg indicate anything about drive being read only?