LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Failed to write disklabel. (https://www.linuxquestions.org/questions/linux-hardware-18/failed-to-write-disklabel-4175685250/)

n00b_noob 11-15-2020 05:21 AM

Failed to write disklabel.
 
Hello,
I have a SSD 120GB and when I want to fdisk it with "cfdisk" then it show me:
Code:

Failed to write disklabel.
And "dmesg" show me:
Code:

$ sudo dmesg
[17020.700937] Buffer I/O error on dev sdc, logical block 29305184, async page read
[17024.159216] Buffer I/O error on dev sdc, logical block 29305184, async page read

Any idea?

Thank you.

berndbausch 11-15-2020 09:48 AM

My first thought: Some piece of hardware is broken.
But there are other tools: fdisk, parted, ... Have you tried them?
I would also try to dd to that disk to see if the error persists.

computersavvy 11-15-2020 04:48 PM

Quote:

Originally Posted by berndbausch (Post 6185469)
I would also try to dd to that disk to see if the error persists.

Something I don't understand here.
What does dd have to do with cfdisk unable to write the label? and how would it help?

I can see the error with cfdisk as it is curses based and fdisk, gdisk, gparted, parted, etc are all designed to create partitions and write the labels, but (to me) dd just does not compute for that use.

berndbausch 11-15-2020 05:02 PM

Quote:

Originally Posted by computersavvy (Post 6185628)
What does dd have to do with cfdisk unable to write the label? and how would it help?

To check if there might be a hardware problem. If dd (or any other tool) can write to the device, the error is probably caused by something else than hardware.

n00b_noob 11-16-2020 12:11 PM

Thanks.
SSD plugged and unplugged frequently. I tried "dcfldd" on one of the SSD partitions and it completed, but when system detected SSD and I browse that partition then all files existed and nothing formatted!
Windows OS can't detect the disk too.

computersavvy 11-16-2020 12:36 PM

try gparted, parted, fdisk, or gdisk and see if there is any difference.

I wonder what makes you think that dcfldd has anything to do with formatting a device/filesystem????? Did you even read the man page??? Have you even read and tried what has been previously suggested???

Please start learning what you need to do (reading man pages, searching forums, searching with google, etc.) instead of asking repetitive sub-level questions that clearly show no effort on your part to learn.

Just as an FYI. Windows will never detect or mount a device that is formatted with anything other than fat32 or ntfs.

berndbausch 11-16-2020 02:49 PM

Quote:

Originally Posted by n00b_noob (Post 6185901)
I tried "dcfldd" on one of the SSD partitions and it completed, but when system detected SSD and I browse that partition then all files existed and nothing formatted!

Since we don't know what you tried with dcfldd, it's not possible to comment.
Quote:

Windows OS can't detect the disk too.
That indicates something is wrong with hardware. The disk itself, the connector, the cable (if there is one), the interface. Or perhaps you don't do the right thing to detect it:
Quote:

Windows will never detect or mount a device that is formatted with anything other than fat32 or ntfs.
The Windows 10 (and 7, if I am not wrong) computer management tool can deal with non-formatted disks.

computersavvy 11-16-2020 08:14 PM

Quote:

Originally Posted by berndbausch (Post 6185953)
Code:

Windows will never detect or mount a device that is formatted with anything other than fat32 or ntfs.
The Windows 10 (and 7, if I am not wrong) computer management tool can deal with non-formatted disks.

Correct. New and non-formatted drives the disk manager will detect and handle easily. It will not do the same for one that is already partitioned for a linux file system except by destroying any existing partitions and making new.

If Noob has his ssd formatted for linux then his windows cannot recognize it

n00b_noob 11-17-2020 11:47 AM

Quote:

Originally Posted by berndbausch (Post 6185953)
Since we don't know what you tried with dcfldd, it's not possible to comment.

That indicates something is wrong with hardware. The disk itself, the connector, the cable (if there is one), the interface. Or perhaps you don't do the right thing to detect it:

The Windows 10 (and 7, if I am not wrong) computer management tool can deal with non-formatted disks.

I did:
Code:

# dcfldd if=/dev/zero of=/dev/sdc
I installed https://www.diskinternals.com/linux-reader/ on Windows OS.

computersavvy 11-17-2020 01:42 PM

Quote:

Originally Posted by n00b_noob (Post 6186234)
I did:
Code:

# dcfldd if=/dev/zero of=/dev/sdc
I installed https://www.diskinternals.com/linux-reader/ on Windows OS.

If you used that command on an actual device then you wiped out the entire device access and will have to use a partitioning tool to create a new partition table and partitions with file systems before it can be seen as anything other than a raw device by any OS.

pan64 11-17-2020 02:21 PM

is your /dev/sdc a real device or just a file what you created?

berndbausch 11-17-2020 02:28 PM

There are other tools than cfdisk: fdisk, parted, ... Have you tried them?

computersavvy 11-17-2020 10:45 PM

Quote:

Originally Posted by berndbausch (Post 6186300)
There are other tools than cfdisk: fdisk, parted, ... Have you tried them?

I get the feeling that Noob has skipped over or ignored the several references to different tools. At least he has made no response here.


All times are GMT -5. The time now is 10:03 PM.