I have installed Ubuntu on the USB stick and afterwards tried to clean up the disc to install another version of Ubuntu.
I was not able to do it (even when tried to delete files by using
sudo -rm), because of the read-only files.
Trying to format the disk with
gparted: the disks has flags boot and lbs. After unmounting the disk I get the code in console:
/dev/sdb: unrecognised disk label Input/output error during write on /dev/sdb
After typing in the terminal
I receive this message:
Disk /dev/sdb: 8441 MB, 8441462784 bytes 64 heads, 32 sectors/track, 8050 cylinders, total 16487232 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x704e26c8 Disk /dev/sdb doesn't contain a valid partition table`
fdisk /dev/sdb o n (and than all default, so: primary, partition number 1, first sector 2048, last sector 16487231) w
and trying to write a new partition table I get this message:
The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks.
dmesg | tail
[ 8223.479979] Info fld=0x0 [ 8223.479984] sd 12:0:0:0: [sdb] [ 8223.479990] Add. Sense: Write protected [ 8223.479995] sd 12:0:0:0: [sdb] CDB: [ 8223.479998] Write(10): 2a 00 00 00 00 00 00 00 08 00 [ 8223.480043] end_request: critical target error, dev sdb, sector 0 [ 8223.480050] Buffer I/O error on device sdb, logical block 0 [ 8223.480054] lost page write due to I/O error on sdb [ 9080.052379] FAT-fs (sdb1): invalid media value (0x10) [ 9080.052389] FAT-fs (sdb1): Can't find a valid FAT filesystem
sudo dd if=/dev/zero of=/dev/sdX bs=512 count=1
1+0 records in 1+0 records out 512 bytes (512 B) copied, 0,011829 s, 43,3 kB/s
so I guessed it worked. Unmounted the disk, rebooted the system and the problem persist.
- Do you have some ideas how to repair it?
I would be thankful for help!